Jetpack on Facebook
JetpackHQ | Blog Home | Users | Register | Log in    


Jetpack is a classic DOS-based platform game released in 1993. This blog is a chronicle of the development of the long-awaited sequel, Jetpack 2. Please register to be notified about the progress of Jetpack 2!

15 Years

October 5th, 2009 - filed under Miscellaneous

Something happened shortly after the release of Jetpack in 1993 that changed my life, and not in a good way.  A combination of high stress and I’m guessing food poisoning or a stomach virus, gave me severe stomach pains and ulcers.  I didn’t have health insurance so I did not go to a doctor.  I took massive amounts of Maalox and Rolaids for a month until the pain settled from acute to chronic.  I eventually paid to see a doctor but I couldn’t afford any expensive tests so not much came of it.  Eventually the pain went away during the day – it only happens when I’m lying down now, usually around 3am.

Back in 1992 I would sleep 10 hours (generally from 2am to noon) and code 12+ hours every day.  I created Jetpack in 4 months.  I wrote Squarez Deluxe in 1 month.  Now, and for the last 15 years, I have been getting 4-5 hours sleep per day and suffering constantly from chronic fatigue.  My short term memory and concentration are shot.  I’ll be excited about a project and fired up to work, but when I try to code my abilities slip away and I’ll forget everything that was in my head.  I usually end up zoning out on TV or playing video games.  It’s a constant struggle to get things done, except on the rare days, maybe 1 or 2 a month, when my brain decides to work.

A couple years after this started, I finally got a job with health insurance (in Seattle), and over a year I saw 5 different doctors.  They were all completely useless – one actually listened for 3 minutes then told me to take Metamucil for the rest of my life – he spent more time asking me computer questions than trying to diagnose my problem.

  • I’ve had these tests: upper gi, small bowel series, endoscopy, colonoscopy, food sensitivity test, fat absorption test, ultrasound.  The only abnormality in my blood tests was elevated Gliadin IgG
  • I’ve tried 10 different diets, including vegetarian, no lactose, no fat, no salt, & celiac for 3 months
  • I’ve been to 10+ doctors, including gut and back specialists, chiropractors, massage, and acupuncture
  • I’ve taken countless drugs and herbal remedies, acid reducers, antibiotics, glutamine, hyoscyamine, etc, etc, etc.  Once I took a bad combination of anti-yeast herbals, went a little loopy, and ended up in the hospital.

Now I’m in Boston and the doctors seem a little better here.  Recently, thanks mostly to the internet and in part to my doctors, I’ve found 2 things that help my pain about 50% – Sucralfate/Carafate (bonds with hydrochloric acid to form a paste that allows intestinal ulcers to heal) and Dicyclomine/Bentyl (smooth muscle antispasmodic, stops intestinal cramping).  Now I find it easier to sleep, but after 15 years of this I have a sleep habit of waking up after 4-5 hours.  My latest doctor has also found that my gallbladder has some serious issues – but most of my pain is on the sides, not near the gallbladder.  I may have it removed soon, and I hope that turns out to be the cause.

In conclusion, I want to make 2 points:

  • This is why there is no Jetpack 2 yet
  • Universal health care is a basic human right.  No one should be excluded because of preexisting conditions, or have their insurance canceled when they get sick.  A friend of mine recently had her coverage revoked after being diagnosed with cancer – the reason?  She hadn’t disclosed a high blood pressure test 5 years earlier.  The decision to deny care should not be made by people whose jobs depend on maximizing profit – it’s just that simple.

Actionscript Caveats, Gotchas, & WTF – Part 1

September 16th, 2009 - filed under Programming

This is what I would like to do to the designers of Actionscript:

There are very few good large scale games written for Flash, and there’s a good reason why: Actionscript is chock full of undocumented problems that Adobe is either unaware of or unwilling to fix.  I feel bad for anyone who was introduced to programming with this language.  I wish I had documented all the roadblocks I’ve had to work around, but I’ve only got a small sample of the most heinous or recent ones that are causing headaches.  I don’t have any saved up for part 2 of this series, but I’m confident that won’t be a problem.

Mysterious Arrow & Numeric Key Issue

Recently, on one of my computers, arrow and number keys are firing key-up immediately after key-down, so you can’t tell if one of the keys is held down.  Many flash games never catch the key-down event at all, so most flash games are unplayable for me on this computer.  I have no idea why – I’ve tried several recent versions of the Flash player and both the debug/release versions, both in-browser and standalone.

Mysterious Faint Box

On another one of my computers, whenever an object is rotated a very faint solid rectangle appears behind it.

The Registration Point Problem

Most graphical objects in Actionscript have a registration point (or “center”) at the object’s center, meaning when you set an object’s position you are saying where the center of the object should be.  This also means that rotation occurs more or less as you would expect.  Bitmaps don’t work this way – the registration point is the top left of the object.  There is no way to move the registration point.  What you have to do – and all this is completely undocumented – is hack a solution by applying an offset via matrix transformation, and never again using the object’s x, y, or rotation properties.  There are many many people asking about this problem on the web, and only a few partial solutions are out there.  I wasted an entire day and pulled out a lot of hair figuring this out.

Alpha / ColorTransform is slow

If you change the opacity of your visuals, you’ll notice a significant drop in performance.  I was suprised by this, because I’m also importing graphics with an alpha channel, and those don’t have the slowdown.  I’m guessing that Flash’s drawing algorithm must be applying the alpha as a separate step before the blit, rather than doing it during the blit.  To get around this and other suboptimal behavior, I’ve written a system to automatically cache a graphic after all the effects are applied, and mark the cache dirty when an effect changes.  Also, when opacity is set to zero the processing continues unabated – you need to manually set the graphic’s visibility off when this happens.

More Reading

There used to be some other websites with more Actionscript issues, but they seem to be gone.  If you find any more, please share them.

Iconara’s Architectural Atrocities
Choice quote:

The ActionScript 3.0 API:s have a few interfaces, in general it’s a good thing, it shows that the Macromedia/Adobe developers actually understand something, which hasn’t been obvious in the past.
The decision to include interfaces in AS2 was probably a manager or marketing executive saying “hey, all the other languages have something called ‘interfaces’, why don’t we?”, and the developers quietly obeyed.

Don’t Phase Me, Bro

July 29th, 2009 - filed under Input Requested

While I think shooting would add some interesting gameplay elements to Jetpack, I’m reluctant to add weapons for several reasons:

  1. We have this cool, nonviolent vibe going on – at least, the violence only happens TO you.
  2. It seems like over 95% of games have guns.  This bugs me – its been done to death.
  3. Really creative, original, groundbreaking games like M.U.L.E., Lemmings, and Katamari Damacy don’t need shooting.  There are plenty of unique gameplay elements to explore if you think outside the box.

On the other hand, shooting is fun.  What do you think – no weapons, lots of weapons, or a few limited options like a freeze ray?

As for other carried items, how important is the Phase Shifter to gameplay?  Obviously it was originally inspired by Lode Runner, but is this aspect of gameplay still necessary to Jetpack?  Here are a few of the ideas I have for carried items.  You will probably be limited to only holding one item at a time.

  • Keys – for opening doors
  • Flashlight – for dark locations
  • Proximity Locator – for finding hidden objects
  • Bomb – for destroying bricks
  • Shield – for temporary immunity

Can you think of any other fun usable items?

Other News

  • I’ve unsubscribed everyone from all blog posts except releases.  If you want to subscribe to other/all posts, please do so manually from the dashboard.  The dashboard is available to all registered users – there are a couple other interesting features there for now.
  • There’s a new “contact us” page if you need to write to me privately.
  • If you’re on Facebook, join our Jetpack Facebook Group
  • We have a new users page which shows the bio & web page of all our users.  It isn’t much, but you can find posts by certain users.  Your email is private – if you want other users to be able to contact you, add contact info to your biography in the dashboard page.  I recommended obscuring email addresses somehow to avoid spammers.
  • I’d like to send thanks out to TIGSource for posting about Jetpack 2TIGSource is a cool site for independent gaming news.

Protecting Flash Source Code

July 26th, 2009 - filed under Programming

Imagine spending months or years creating a game, only to have several remarkably similar games appear on the market at the same time.  If your source code is leaked or stolen, you could easily find yourself in the position of competing for income with your own work.  Languages like C++ are compiled into machine code, but a major downside of Actionscript is that your source code is maintained virtually intact in your released SWF.  While the few flash decompilers out there are admittedly very buggy, the opporunity exists for a dastardly thief to spend minimal effort to produce a game very similar to your own.  Legal options are often available, but its much easier to avoid the expense and hassle by protecting your code.  This is why SWF obfuscation tools exist.

I evaluated Kindisoft’s secureSWF, Amayeta’s SWF Encrypt, Ambiera’s irrFuscator, and LockLizard’s Lizard Flashguard.  Based on the level of security features, ease of use, and stability, the tool I’ve chosen for this task is secureSWF.  It offers several good features, and the ones I found most useful are:

  • renames identifiers
  • uses several techniques to obscure code flow
  • encrypts strings
  • optimizes code
  • has build process integration

Obfuscating Actionscript is a pretty complex task and secureSWF handles it well – my SWF ran perfectly with adjustments to all security settings.  Here are the results of my rough performance comparisons:

no security
plain SWF: 211k , 37fps

default settings
secure SWF: 293k, 35fps
40% larger, 6% slower

custom settings – disabled “control flow obfuscation”
secure SWF: 244k, 37fps
15% larger, no performance loss

Tweaking the settings for less aggressive encryption can give better size and performance, but I consider the small performance hit to be a mandatory cost of business for creating a mid-scale game using Actionscript.  If you have a lot of high quality original source code that you want protected, I highly recommend Kindisoft’s secureSWF.

Jetpack Physics Test

July 16th, 2009 - filed under Tech Demos

Finally it’s time to show some progress with a new tech demo. This demonstrates the integration of physics into the Jetpack game engine, along with some live-cached graphical effects and Thing grouping (the moving platform). Note this is just a test of the physics engine and does not reflect what the final game will look like. Please report any problems you experience, and if you like the progress, please digg this post!

Earlier in the project I put some time into writing my own physics engine, but I decided to try a 3rd party library for physics and I’ve been very happy with the result. I am reluctant to use 3rd party code because when I’ve tried in the past I spend more time working around limitations, bugs, and poor documentation, than if I had simply written it myself. But in this case, using the 3rd party physics engine box2dflash has turned out to be excellent. The API was much better than I expected, the docs have some quirks but are substantial, and the community is large. The result is way more functionality than I would have ever achieved, with a lot less work on my end.

While doing some minor optimization checks by selectively disabling certain features, I noticed a significant slowdown was being caused by alpha changes (translucency). Strangely, if the graphic contains translucency but you don’t alter the alpha, there is no slowdown. So I implemented a smart per-object cacheing system – in this case, alpha is applied and the graphic is drawn to a cache, and future changes in alpha trigger a cache refresh. This is useful for any property that doesn’t change too often, like a rotated object at rest – render the rotated version to the cache, then all future frames will render the cache without rotation. Using this technique and the box2dflash physics engine, on a typical machine I’m able to get 100 balls interacting (each with 2 translucent graphical objects), plus all the level blocks, and maintain an average 40fps. Using Flash as a platform will not be a problem.

The next tech demo will be a control test – binding user input to commands, passing those commands to a Thing’s state machine, applying forces/motion based on the current states, and activating graphical representations of those states. In other words, running around. To be updated on future Jetpack developments, please register on JetpackHQ!

Update

This is a little jerky at times mainly because the code that lowers the frame rate under high load isn’t currently functional.  It’s trying to hog the processor and the browser isn’t having it.  This will be fixed in a later release.

Project Roadmap

July 5th, 2009 - filed under Status Updates

I’ve never created a project roadmap because I didn’t see the point in a single-person project, but now that I’ve tried it, I highly recommend it. I’m sure I didn’t think of everything, but just having clear milestones really makes it easier to see how close you are to your goals. The roadmap I made helped me decide to have 6 milestone releases: Pre-Alpha 1, Pre-Alpha 2, Alpha, Beta, Limited, and Full release. Each release serves as a milestone and each has a different set of work to be accomplished, both on the game and the website. Having a roadmap showed me how surprisingly close I am to the first release – and how most of the work will come after that. While all this is subject to change, the roadmap up to Pre-Alpha release 1 includes:

  • [DONE] basic physics: integration with Things (like sprites), collisions, gravity, friction
  • control: ability to move an Entity around the world via input, limited by physics
  • basic tile behavior: ladders, gem removal, etc
  • start adding creatures: rolling ball, spring
  • basic AI: possibly 3rd party
  • triggered sound effects: probably just using placeholder sounds
  • basic menus: nothing fancy, just enough to do basic actions
  • game info panels: for displaying status and debugging info
  • Pre-Alpha release 1

Pre-Alpha 1 will be a very rough draft but playable, with only the basic elements in place.

Pre-Alpha 2 will add a basic editor, basic web integration, more creatures & tiles.

The Alpha release will have most features of the game in place, and a fully usable editor.  The best user-created missions will be chosen for use in the game.  Pre-ordering will be available.

The Beta release will have most features of the game completed, and most bug fixing and gameplay tweaking will be done.  A lot of mission creation work remains.

The Limited release will be feature complete, but web-only.  Most of the website features will be in place.

The Full release will be downloadable and add support for platform specific items like full screen, joysticks, etc.  Most of the development will switch to the website.
 

Progress Report

June 23rd, 2009 - filed under Programming, Status Updates

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.

Development Continues

June 1st, 2009 - filed under Status Updates

After what seemed like several good leads, unfortunately we haven’t been able to arrange a publishing deal. It isn’t all bad news: now I’ll be working on Jetpack again and retain creative control, and we will finally start to see more progress (development has been on hold for several months as it seemed likely that a 3rd party would be taking over and starting from scratch). I am only able to work part time though, since I’m not independently wealthy. I’ll be sticking with the web version initially – I may look into independent development and publishing of console versions later.

Jetpack World Headquarters

January 21st, 2009 - filed under Status Updates

JetpackHQ finally has an official front page.  It’s basically just a teaser for what the site will contain.  Since it will change later, I’ll reproduce it here:

A new version of the classic game Jetpack is currently under development!
JetpackHQ.com is a concept for an interactive Jetpack fan community.  Features will include:

  • Play Jetpack from your web browser, and embed playable missions directly on your own web site
  • Easily share homemade missions with your friends
  • Post mission packs on your profile for other fans to play & rate
  • Socialize with other Jetpack fans in our online community
  • Get the latest updates & addons
  • A downloadable, full featured version for the PC/Mac/Linux will also be available

In other news, we are currently looking into publishing a version of Jetpack on portables and console systems.  I’ll post more information when an agreement is reached.

Temporary Blockage

July 28th, 2008 - filed under Status Updates

I’m putting the project on hold for 4 months in order to work on the website of a certain unnamed presidential candidate.  The chance to contribute was too compelling to pass up!

On another note, we are looking into a Nintendo DS version of the original Jetpack.  If you have connections in the video gaming industry and know a publisher that might be interested in such a project, let me know.


  • Categories