Wednesday, December 7, 2005

Wednesday 7th

Decided to kick off tonight's session by tackling the Zoom function, something which I've tried to do on numerous occasions. However, as is typical for programmers, the best way of approaching the routine came to me while I was doing something mundane, as opposed to thinking about the problem in hand.

Essentially, all I need to do is shrink the tileset when the zoom is initiated, and display the map using the shrinky dinky tiles instead of the regular ones.

After a bit of furious typing, the code was working but with unexpected results; I wrongly assumed that every tileset would be the same dimension, so a couple of tweaks later and everything was working propery. With that in place, I also added the animation code to ensure that even the Zoomed map will still animate.

This, rather handily, highlighted a couple of bugs in the Animation routine which only showed themselves because the Debugger was turned on (errors with Databanks rarely crash the PC, but always show themselves in Debug mode).

With the bugs fixed, all that remained was to tweak the control routines and map-boundary checks to ensure that the Zoomed map can be scrolled safely. Amazing that a routine I regarded as a huge task took merely a couple of hours to implement. :)