Sometimes you start on a project, and get far enough into it, that it just seems like it shouldn’t be that hard. For me, this was precisely the case with recreating a child past-time favorite game of mine: Elevator Action. This started off in Flash 7, and the reasoning behind it at the time was to create a complex environment scroller and to release the source for other developers to see how things like this are programmed. Getting bogged down by work, and generally life itself, not to mention the frustrating limitations of AS2 at the time; I put it down for awhile thinking I’d get back to it.

Well, Flash 9 is now here and it’s probably been 2 years or so since I last touched this (like dogs, it’s at least 14+ programming years). AS3 has finally brought us more into line with what the rest of the OOP world expects with new initializers, additional accessors and the such, but this now means I’m faced with the same problem everyone else has in revisiting old projects: Do I try to monkey patch the old code, or start over?

The old one got this far. Feel free to play it, but understand that I didn’t get around to writing the physics engine for the main character or the AI for the enemy agents. Essentially you can do just about everything that you could in the original, except getting off the elevator is a bit tricky in interacting with the document doors.

The main problem with writing code for the AS2 platform was at the time, there were restrictions on what clips could be added or removed from the stage, and the biggest memory resource for this is obviously the environment tiles (which should only have enough on stage), along with the other resources like bullets and agents which need to be removed at certain times.

However with that lifted (since attachMovie no longer exists), and displayList now in the mix, it becomes infinitely easier to determine not only what belongs where, but with additional methods, even if game is segregated in layers it’s relatively easy to determine what characters are on what environment tile (in this case: floor). So basically it looks like I’ll end up keeping some of the code that still makes sense and is relatively to port, however others I’ll end up re-writing to overcome earlier limitations.