Friday, November 25, 2005

Friday 25th

Spent the last couple of days back in Editor Land, specifically, finishing off the animation system; the Anim panel functionality was developed in conjunction with test variables while I deliberated on the best way to store animations (and, if truth be told, until I fully got my head around using Types).

Thankfully, it dawned on me that I didn't necessarily have to use Types to store the data - simple arrays and DataBanks would be equally effective (and quicker to check when it came to developing the actual screen animation code), and so I decided to get the animation system wiped off my To-Do list for good.

Yesterday's session was pretty mundane, and involved setting up the variables, arrays, and DataBanks, as well as replacing all references to temporary variables with proper ones. With that out of the way, today I set about making sure all the frame addition/removal/import code had the desired effect (this involved tweaking several bits of code, as the test data used arrays while the new system uses a DataBank).

After methodically working through each routine, I finally had the system in and working (I may revisit the code at some point, however, as the logistics of adding a frame seem a bit cumbersome now that I've used it for more than a couple of minutes).

Thus, the next step was to write a routine that animates all of the tiles (ie. increments the frame index variables and triggers loops if appropriate), followed by a graceful way of reading each map tile, checking if it's an animation, and if so, plotting the next tile in the sequence instead of the one stored in the map data.

This was the part I'd been dreading the most, but thankfully it took mere seconds to write; indeed, the hardest part was tracking down why all of the animations wouldn't run at the same time - it suddenly dawned on me that I wasn't actually calling the animation routine (and lo, there was much slapping of the forehead).