Library

Monday, May 26, 2014

I hope you all are having a happy long weekend holiday! I've spent the past week playing around with programming animation techniques in App Inventor, finding one of the biggest changes between App Inventor Classic (AI1) and App Inventor 2 is how MIT Media lab decided to handle how "loops" work. And, the complexity of translating the 2 different approaches these versions take is probably why they haven't yet released a strategy to allow you to migrate projects created in AI1 to AI2.

A quick "geek" moment to explain: as you probably know, the foundation of animating motion is "looping" sprites, meaning, getting an image to do something over and over using a sequences of images ("costumes") that display at some speed over time. You can take 2 approaches, which when you use Scratch, isn't obvious, since Scratch hides all the programming in "blocks". But, in App Inventor, you can see the programming logic which gives you a better idea as a programmer, what is what. AI1 uses "lists" and "indexes" from which you build "image +1" logic after you've written a simple program to evaluate how many images are involved, telling AI to go back to the first image once it determines you're at the last one. AI2 uses "join" to consolidate this approach, a basic database programming principle, where you create a shortcut ("alias") to stand for where your images are located ("a" = images) and you can do this because you find something they all share ("primary key"), and then use the "image +1" logic.

So, both "loop" approaches work, you'll just find that looping using "join" is easier for a database on a server to process (meaning: faster), though it's a bit more complex concept for first time programmers. And tricky to integrate the 2 approaches so that AI1 loop programming is compatible run in the AI2 environment. Fortunately, I program using "join" logic every day in my database programming world, so looking forward to teaching it. And check out this cool animation project that mixes loops using flip animation and video. I'm working on translating this kind of project to make in App Inventor, so stay tuned ;)

No comments:

Post a Comment

sepinventors@gmail.com

My photo
Charlottesville, VA, United States
I'm a freelance ed tech consultant involved with learning labs throughout the Charlottesville area. M.Ed with 10+ yrs programming experience in private industry, loving reconnecting to the fun teaching animation programming.