Back in July 2008, there was quite a bit of work done that I didn’t have time to discuss or demo (last year I put the project on hold for 5 months to work on the Obama for America campaign website – and ended up adding another 5 months because of talks with potential publishers). I did spent some of that time working on the website back end, so a lot of that is done as well.
What’s Done
- input handler: command bindings > state machine > entity (command stream input for the state machine could eventually be: an AI, a network player, or demo playback)
- world cycle: graphics & basic physics – auto adapting frame rate independent from game tick, client-render-prediction-capable
- animation system: vector & bitmap, automatic cacheing, adapts to frame rate
- original map import: to faux-3d tiles, layered parallax rendering
- basic gui & menu system
- asset loading & management system
- flash platform: source encryption system, security wrapper, preloader
- website: improved template/page module system, nice request routing system, smooth deploy system
What’s New
Physics Engine
I’m tinkering with the Box2d physics engine for ActionScript 3, and I’m very impressed with its power and flexibility. It has many more features than I need, and I’m just hoping it turns out to be fast enough on slow computers. We’ll be able to have much more realistic effects without any extra work as long as this library turns out to be fast enough. I’ll be releasing a demo soon.
Refactoring (warning, serious programmer-speak ahead)
In the last couple weeks, I’ve refactored a good chunk of the code to accomodate some ideas I’ve been exposed to – the benefits of dependency injection and service locators. These two patterns may seem to be at odds, but I think each has benefits in different circumstances. By focusing on using DI as much as possible without major inconvenience, I have increased the logic and readability of my code. By falling back on a service locator to avoid bending over backwards to be 100% DI, I’ve kept the code clear and the configuration centralized. The result is, the code is a lot better organized and easier to work with.
I’ve also decided to abstract the platform. Initially I didn’t bother, since Actionscript is so intertwined with Flash/Flex, and I’m only targeting one platform, but I think abstraction is worth it for two reasons: logical code separation and future portability. The basics like Math functions I’m leaving in place, but I’m wrapping input devices, graphical objects, and certain platform-specific functionality like event handling. It makes the code a lot clearer to have most of the obscure Flash specifics in one place, and it will be that much easier to port the code if it’s ever needed. Also, it brings a great feeling of inner peace to look at code and not see a single reference to MovieClip.


June 25th, 2009 at 8:44 am
Thanks for the update, Adam. Very much looking forward to the release.
June 27th, 2009 at 5:47 pm
damn thats cool!
June 29th, 2009 at 11:14 pm
That is alot that has been done.
> Your account will be automatically imported to JetpackHQ when the time comes.
By chance, does this mean there’s going to be a forum? That would be pretty great as there isn’t any central place to my knowledge that people who play Jetpack socialize on the net.
June 30th, 2009 at 8:10 am
Possibly, I want to at least have a wall on your profile where people can talk about your levels etc, but forums are a pain to manage. I guess it will depend on the demand and the number of people who buy Jetpack. Most of the features of the site will be for game owners only.
July 5th, 2009 at 7:29 am
Platform abstraction, nice.
That’s how code should be done, I’ve just realized that in a recent project. Porting it between OSes is way easier now, and things can be changed a lot faster in the code.
July 6th, 2009 at 5:48 am
We now have a facebook page: http://www.facebook.com/pages/Jetpack/112056207128
This has a forum and some video and some previously unreleased screenshots.