This is a game design & 2d game development blog about a modern remake of the classic game Jetpack. We discuss caveats of flash game programming, and welcome your input on game creation and the upcoming game Jetpack! Subscribe via email, or rss / comments

The Official Trailer

January 30th, 2014 - filed under Development News

The official Jetpack 2 Trailer is here!

What do you think?

If you haven’t already, make sure to follow my twitter account, @ChaostormGames
And vote yes for Jetpack 2 on Steam Greenlight!
And as always, there’s the Jetpack 2 Facebook page

Introducing the first official Jetpack 2 game alpha! It’s been a lot of work to get to this point, but we’re now within sight of the finish line. It will be a lot of work, but I’m hoping to have the full game done by Christmas.

This “Missions” game will be a limited web-only release, and is limited to the Cave/Industrial theme only.
Most of the game features are now in place, and there’s just a lot of tweaking left.

Please note, this release uses a subset of the database, so you will not see your levels from the main release.
The un-limited, full Jetpack 2 editor is now a separate file, and is members-only. If you are logged in, it will also appear on the same page.

The levels in this release are the official levels for the first release, but I only consider the first 4 to be “complete”. The others will need some fixing up, and many will need to be made easier to complete (adding checkpoints, replacing gems with treasure in difficult areas, making the harder parts achievements). If you edit one of the levels in the mission, the changes will not appear in the mission until the next release.

Major New Features

  • Mission map, and missions (level packs). This feature took a while to create, but I think it’s worth it, as it adds a nice new dimension to the game. You can’t create missions yet, but you can see how they work.
  • Game flow & ui almost complete

What’s Missing

  • Game progress is not actually saved yet.
  • I haven’t fixed all the items in the bug folder yet.

What Else is New

  • Backgrounds now work differently, and you can draw with the full screen backgrounds.
  • Added “Reset on Death” to level settings. Certain complex levels may be broken (can get into an unwinnable situation after dying) unless you select this. Note that if this is off, checkpoints don’t restore the starting level state, only fuel.
  • Added “create” tile group effect.
  • You can now add “@nodestroy@” to invisible triggers
  • Added ‘%’ to chars allowed in level title. These are the allowed chars: 0-9A-Za-z .,:;()+-=/%?!$”‘
  • Scaling bigger is now working well everywhere, except some masking is needed.
  • Keyboard & mouse wheel now work in the level browser.
  • Mouse wheel now rotates/alternates tiles
  • SHIFT+ESC quits playtesting immediately
  • Added alternate keyboard layout, to swap jet & phase keys
  • The Jetman anim has always been a bit blurry and jerky. I found way to rebuild the graphics much sharper, and smoothed the running animation.

Website Updates

I spent a week fixing up the website, all account functionality should now work properly between ips & jhq, like syncing usernames, etc. Please report any problems.
My IPS (Invision Power) upgrade license has expired, and I’m not going to renew again. It looks very professional on the surface, but inside it’s a massive pile of bugs, and the worst written code I’ve ever had to deal with.

PLEASE let me know if I’m missing anyone in the credits! This is a lot to keep track of.

Adam

This release fixes a long time bug causing jerkiness – gameplay should be very smooth now!

You can find the latest release here. You can comment on the new release here, but for questions or bug reports I recommend using the release notes topic.

Changes

  • Fixed a long time bug causing jerkiness. Gameplay should be smooth now, even at lower frame rates.
  • Adjusted SecureSWF settings that were causing extreme jerkiness and 30% performance loss.
  • Fixed a bug causing excessive slowness when the game was scaled
  • I moved the depth of the back of mirages farther to the back, so the following items are now visible behind mirages: ladders, scenery, exit door. This was needed as a big optimization. If you want ladders to be completely invisible I recommend using opaque instead of mirage.
  • Lighten tiles are a bit lighter
  • New speed profiling tool (beta testers only): HOME+PLUS sets game speed up to 10x. Levels with a lot of physics will not reach the full 10x because physics steps per frame are capped at 20 in this mode (normal is 5). In the latest build, at 5x my machine gets 8.5fps in the Pit of Despair.

“Bug Reports” Folder Levels

(Please delete the level when you confirm the issue is fixed)

SPRING MISALIGNMENT (Illari) – fixed
TRAPPED ENEMY FADE IN (Illari) – fixed
BARRIER NOT INVISIBLE (Illari) – fixed
BOX TRIGGERS AND FALLS (Illari) – fixed
SPRING CLOSES BARRIER AGAIN (Illari) – fixed
BLINKING ELEVATOR (Juan G) – resolved – set iterations to 1
BOXES BLOCK THEMSELVES (Juan G) – fixed
STRANGE TRACKBOT BEHAVIOR (Juan G) – fixed
INVISIBLE BUT NOT DESTROYED (Juan G) – fixed – but why would you want to do this?
INSANE BUGS (InsaneJetman) – fixed

Performance Notes

March 25th, 2013 - filed under Miscellaneous

I found some debug code that was executing in the last release build, causing significant slowdown. Fixing that, along with some tweaks for the new graphics code, has improved performance significantly. But there are also a few changes you could make that could be the difference between getting 60fps and 10fps.

You can play the latest release here.

Test Environment

The game monitors it’s own framerate and adjusts output quality to improve low framerates – currently just by decreasing the stage quality and reducing the amount of smoke things generate. When I test performance or profile, I disable this auto-degradation, and max out the game speed to +5.

Here’s an example of the top 10 lines of my profiler output in the release player. This test ran at 60fps.

* “non-frame:REMAINDER” is the time flash spends not in my code – either idle or doing internal, mostly graphicy stuff I assume.

Huge FPS Hit: The Debug Flash Player

The “debug” version of Flash Player really doesn’t like something I’m doing in Jetpack. In the level “Pit of Chaos”, I get 55fps in the release player, and 13fps in the debug player. Music playback is also especially slow in this mode.

Here’s the profiler output in the debug player with music on. In my test level, this ran at 26fps.

Small FPS Hit: Scaling the Game

If you play the game scaled or full screen (via browser zoom, or a plugin like Flash Game Maximizer), there will be a performance hit because of the scaling overhead. On the same level, my performance dropped to 52fps when scaled a bit, and 38fps when scaled to full screen height.

With the game scaled, and running in the debug player with music on, my test ran at 19fps.

Note: The final game will not have either of these issues, because it will not use an external Flash Player, and can set the monitor resolution to 800×600.

Finally, you can create your own moving tile groups, something that I’ve been wanting to do since the days of Jumpman. The hidden rooms idea turned out pretty cool too, and allows for a feeling of exploration which can be tricky to achieve without scrolling. The release also now recognizes all achievements, and displays them in rough form in the level end stats.

You can find the latest release here. This will be the last editor release, except for bug fixes. You can comment on the new release here, but for questions or bug reports I recommend using the release notes topic.

This build targets Flash 11.2, so it should be working for our Linux users.

Now that the editor is done, I will be focusing on the game, which mainly consists of a lot of GUI stuff, and filling in a lot of little details like sound effects and death sequences. I’ve got a killer idea for the level selection screen (what I’ve been calling the Zone Map), the next release should have a preview of that.

Sorry for the long delay, I got wrapped up in making the ui system awesome, and also had some family and health issues slowing me down. Finishing the game is taking a bit longer than I expected, but I will not sacrifice quality to get there!

Please let me know if you find any big bugs or have trouble using the editor.

New Features

You can now see achievements live, and see scoring and rank when completing a level (including the effect of dying on your rank). This will help with setting par times and choosing achievements.

  • Tile groups UI. Make your own moving tile groups and concealed rooms.
  • Entirely rewritten GUI & visual system. Everything is style-based and skinnable. Everything GUI has changed, please let me know if there are any problems.
  • End level stats. Time bonus is based on seconds under par. Not pretty yet.
  • All level achievements are now shown on the bottom panel.
  • New achievement option for your levels: “Hidden Talisman”, along with new tile. This works well in conjunction with hidden rooms (rather than having to discover a single buried tile).
  • New Tile: Checkpoint. After death, Jetman will respawn at the last activated checkpoint.
  • I discovered that Linux only supports Flash 11.2, so now I’m targeting that version. All web builds going forward should work under Linux.

Note: The difference between reverse fade out, and fade in: In a conflict (tile is a member of more than 1 group), the more complete effect gets priority.
Note: The “fade to black/white/gray” tiles have been removed. They are now “fade to darken” and “fade to lighten”, as was originally intended. They were never meant to be opaque fades – I got confused.

Also, the web site should be significantly faster, since I’m now using CloudFlare.

Bug Fixes

There have been so many bug fixes, it’s easier to list what’s not fixed:

  • dead jetman is weird
  • ball alignment is messed up
  • some bug levels not fixed yet

I couldn’t reproduce the following (maybe already fixed):
* “Lately there’s a bug I noticed where the last tested games timer doesn’t reset. So upon starting a new level test, it keeps the old time plus the new games time.”
* “Has anyone else noticed this? Maybe it’s a performance issue, maybe just a bug? Anyway, if you hold down shift to place a tile off-grid, and you move around the cursor while doing so, you will see that for first second or so the tile will follow the cursor instantly, but the longer you move the cursor around, the more the tile position will lag behind the cursor position.”
* “When playing the “Tubes of Turmoil” level in the beta sharing folder, i often get “error #1009″ when trying to phase one of the phase doors and using the jetpack at the same time.”
* “Big bug: If you fly or run fastly towards a cliff, you DIE! That just happended to me and is reproducable.”

“Bug Reports” Folder Levels

(Please delete the level when you confirm the issue is fixed)

ROBOTS + SLUDGE (kirchheim) – fixed
STUPID ROBOT (kirchheim) – fixed
MYSTERIOUS WALL REPULSION (Illari) – This is a bug in box2d, the same thing that causes boxes to sometimes catch on the edge of tiles that are supposed to be flush. I’ve spent many days trying to fix it, and I can’t seem to find a way.
INSANE BUGS (InsaneJetman) – fixed
FROZEN JETMAN (Saga Musix) – fixed
ICE/SLUDGE TEXTURES W MIRAGE (Adam Dobay) – fixed
MARBLES GET STUCK IN SLUDGE (Adam Dobay) – fixed
SPRINGS ON CONVEYORS (Juan G) – not seeing – fixed?
STUCK ON LADDER COVE (vielhuber) – fixed
BALLS GROUP AFTER STUNNER (Juan G) – not sure what to do about this.
BOULDERS DON’T KILL JETMAN (Juan G) – fixed
CAN’T GO DOWNSTAIRS (Juan G) – fixed
SLIDING DOWN PROBLEM (Sentura) – fixed
BUGGY BADDIES (Robert) – fixed
TRACKBOT GETS STUCK (Saga Musix) – fixed

BOX TRIGGERS AND FALLS (Illari) – todo
SPRING CLOSES BARRIER AGAIN (Illari) – todo
MISSLE SLUDGE BUG (Saga Musix) – todo
BALLS AUTO-ALIGN (Juan G) – todo

New UI Library

Just like with HTML, for greater control and maybe too much perfectionism, I prefer to create UI via code, rather than via a visual editor. In the beginning, I used the quick and dirty, create everything inline method. The new system is data-driven, cascading style based, skinnable, and much easier and faster to use.
This is the original code to build the tile picker:

And this is the new code:

And the corresponding default skin:

As you can see, the project-side code size has been cut in half, and is much more straightforward and powerful. The skin definition could be further improved with a css-style parser, but I think this is good enough for any future project.

With the new UI system, I was able to create the tile group effects dialog in under 3 hours.

Note: I discovered that the SWF for several of the old blog releases was missing, they have been restored. Please let me know if you find any others missing.

What’s Wrong With Haxe

December 4th, 2012 - filed under Miscellaneous, Programming

There don’t seem to be any substantial articles about the downside of using Haxe. That should have been my first warning sign. If, after several years, a language doesn’t have enough people talking about it to have some detractors, there’s got to be something wrong with it. I’m not going to go into the Haxe benefits because there are plenty of pro-Haxe articles out there. I won’t go as far as saying Haxe sucks – there are plenty of really cool ideas in it – but in my opinion Haxe is, and will always be, a hobby language.

This is what I wish I had known before I invested several days in an eventually aborted attempt to port from AS3 to Haxe.

First, it is not being designed by a group of industry veterans, but primarily by one guy with veto power. The creator is undoubtedly a genius, but very young. Haxe is also young – it has lofty goals, but doesn’t seem to know what it wants to be. The design pushes (makes mandatory in many cases) certain design patterns, as if it wants to enforce perfect programming principles – yet it is based on Actionscript, one of the worst languages I’ve ever used. It can build for zillions of platforms, which was the big attraction for me, but in a basic build, I ran into serious compiler errors – incorrect errors being generated. This is a big problem – sure Adobe’s compiler has plenty of bugs, but at least there are zillions of people using it, so you can be sure there are workarounds figured out for just about every issue. If you have the time to report issues I’m sure the Haxe developers would be much more responsive than Adobe, but I just don’t have time for that – hobbyists do. Finally, there just isn’t much 3rd party documentation on using Haxe. Documentation and examples are more scarce than I imagined, most are written by the developers themselves, and many are out of date. Several examples on the Haxe website don’t even build with the latest version.

I’m not going to bother trying to convince anyone to change Haxe, because I just don’t think you can get there from here. But starting from scratch with a language, I think you should pick a direction, either:

  • a strict, well designed language, starting from scratch with design coming from several brains, or
  • a flexible, easy to use language that extends and improves on Actionscript

You can’t have both.

Haxe Annoyances

These aren’t deal breakers, but just a few of the things I found annoying about the language. The design of Haxe seems to be focused on preventing a few specific bad programming habits, at the expense of code readability & simplicity. I prefer an approach that prioritizes code readability & simplicity, and promotes the use of elegant, clean coding patterns. Converting AS3 to Haxe was turning into a monumental task because of several odd decisions in Haxe:

No auto-cast to Bool


if(!sprite) sprite = new Sprite();
if(str) trace(str);

This is easy to understand, why require the “==null” check?

No square braces to access object properties


obj[str]

is much more straightforward than


Reflect.field(obj, str)

Yes, it’s not the optimal way to access properties, but do we need to make the code uglier to make that point? I never accidentally mistake an object for an array.

Lack of varargs

Forcing args to be manually placed into a dynamic array is pointless and ugly.

No comma separated property declarations

I like organizing properties by grouping horizontally:


public var posX:Float, posY:Float, rotation:Float;

Haxe forces a vertical style preference here. I see no reason to force this on people, and it was such a big pile of work that I instead ended up writing a nightmare of a regex to do it manually.

Traditional for(;;) loops are an elegant, simple pattern; why break that?

An iterator-based syntax can be used with while(item in iter), there’s no reason to break an existing standard. Arbitrary changes like this make people like me question the sense of moving to Haxe. The traditional for() pattern is elegant for custom loops, where you would be building a fancy custom iterator that would only be used in one place. One example is a custom search of a linked list, which starts at a custom element.

Example

old, clean AS3 code:


if(counters) counters[name]++;

new, ugly Haxe code:


if(counters!=null) counters.set( name, counters.get(name)+1 );

The End

There are doubtless many more examples, but I’m done. Anyone know of an easy macro preprocessor for Actionscript?

Status Update

October 9th, 2012 - filed under Status Updates

It’s been a while since the last update, here’s what I’ve been doing. The December goal is still in reach, although it may mean cutting back on a few features.

I’ve been spending a ton of time refactoring a lot of code in preparation for porting. I was surprised by how long this took, since it’s mostly just rearranging. The Flash dependent stuff is now 95% isolated from the rest of the code. I also moved as much code as possible into the library, for reuse in other projects:

* The flash platform code is 120k
* The rest of the library is 1260k
* The Jetpack-specific code is 1250k

I created a GUI definition & skinning system, separating layout from content, to make GUI creation less of a hassle. I have the level browser left to convert, then I’ll create the GUI for moving platforms, etc.

Once that’s done, I’ll get on all the new bugs and do a final release before porting, or attempted porting.

Would you prefer to read updates in the blog, or the news forum? Vote here!

Big New Features

September 7th, 2012 - filed under Development News, Releases, Status Updates, Tech Demos

Ok, here it is. The surprise new features that will really set Jetpack 2 apart from the original.
The timing isn’t great. I really wanted to get this done earlier for the Kickstarter, but oh well.
Have I piqued your interest?

Please note: There’s no UI to create them yet, so you can’t create them now. The UI is the slow part.
You can play with what’s there only by saving that level, you can’t copy and paste to a new level.

  • Added tile groups
  • Added concealers
  • Added moving platforms
  • Added repulsor tile – wasn’t sure on this one, it’s a little buggy
  • White, black, and gray are available as backgrounds
  • Fixed lots of bugs
  • I love the fun design and signs in the bug levels! Makes fixing bugs fun Well, relatively.

New Forums

I’m liking the new forums a lot better for feedback. Still, feel free to leave comments here as well!

4 Days Left

September 3rd, 2012 - filed under Input Requested, Status Updates

There are just 4 days left for the Kickstarter, thanks to everyone who backed Jetpack 2! If you haven’t backed the project yet, this is your last chance to join the Kickstarter and be a part of Jetpack 2.

We’ve been getting by on blog comments only for 4 years, and it’s about time there was a real community for JetpackHQ.
Thanks to the support of our Kickstarter backers, I’ve been able to invest in a sweet new Invision community – complete with forums, chat rooms, downloads, profiles with image galleries, and events. If you’re inspired, you can even start your own blog.

Check out the new Jetpack community here!

There are many plugins and mods available here – if you see any you think we should have, let me know.

New Graphics

The first of the new graphics updates are in, and you can REALLY see the difference. Check out the before and after, and let me know your opinions in the new Jetpack forum!

New Beta Released!

August 18th, 2012 - filed under Development News, Releases, Status Updates

PayPal – New Forums – Click to Play

Bugfixes – Optimizations – New Tiles – New Backgrounds – New Music

New Beta Release

I’m happy to announce millions of bugfixes! So many I’m not even going to try to list them all.
You can always find the latest beta here.
Changes:

  • GAMEPLAY: Big change – you no longer “auto grab” ladders when walking over a hole (exception: moving ladders). This essentially makes ladder covers mandatory. I like the feel of this a lot better, the auto-grabbing was awkward.
  • GAMEPLAY: Improved stair climbing, and balls now climb stairs
  • GAMEPLAY: I had to remove the Jetman leaning on accel/stop. It was causing a loss of contact with the ground, making him jitter.
  • GAMEPLAY: Enemies can now be trapped in moving blocks
  • GAMEPLAY: Improved Trackbot AI
  • EDITOR: Playtesting will not end on death now (unless you hit escape) – Jetman will respawn as in the real game. Time will be preserved from the moment of death (note: par times should be for completion with zero deaths).
  • EDITOR: improved tile targeting for grab/delete. If the tile you want is not selected, just wiggle the mouse.
  • EDITOR: now must double-grab to edit sign text
  • EDITOR: switches moved to edge layer (3). You may get some conflict notices when tiles auto-adjust.
  • EDITOR: touch switches are now rotatable
  • EDITOR: new tiles: corner fade, white bg & fg, gray bg & fg
  • CONTENT: Added a cool new dreamy song by Saga Musix, “Going On”
  • CONTENT: Added the last of the new full screen backgrounds from my artist: Huge Cavern, Cave Fortresss, and Lava Waterfalls
  • WEBSITE: Made a few optimizations to speed up non-blog pages
  • WEBSITE: You can now click-to-play levels on any user’s profile page
  • SWF: errors will now be reported to the server, so I can see them.
  • OPTIMIZATION: Since my work on compositing last month, I’ve been re-rendering the entire background every frame. Oops.
  • OPTIMIZATION: Eliminated calls to Graphic.Cycle() for unchanging graphics, reduced calls by 90%
  • OPTIMIZATION: Reduced processing some of the unneeded code for simple entities like smoke
  • OPTIMIZATION: Now compositing all background graphics into a single background bitmap, so lots of bg scenery/darken tiles won’t slow things down any more. This was always in the todo list, I finally had time to do it.

If your priorities change, feel free to change your answers to the poll in the previous post.

Graphic Composites

The BG composite basically flattens all graphics from the background image to the ladders, into a single background bitmap which (ideally) never changes (much). This includes the layers (in order): BackFar, BackBgWall, BackBgSupport, BackBigScenery1, BackBigScenery2, BackScenery, BackStains, BackExitDoor, BackLadders, BackMirageBack. Wherever a graphic in the composite moves or animates, a rectangle is marked dirty and re-composited, which is SLOW. Animated tiles included in this composite include torches, and moving ladders. If this is a problem, excluding ladders from the composite is possible. As for torches, they are on the BackBgSupport layer, so that would be trickier.

I have code to composite transparent layers too, for a FG composite, which makes bricks scale much better. The FG composite layer, which is NOT currently enabled, includes FrontBricks, FrontStuckEntities, FrontOpaque, FrontBigScenery1, FrontScenery1, FrontScenery2, FrontScenery3, FrontOverlay. Anything that moves or animates in these layers (like conveyor belts) causes significant slowdowns, which is why it’s not enabled now.

This may leave you wondering what layers lie between the BG & FG groups. They are as follows: BackBgNear, BackItems, BackBricks, DynamicBehind, DynamicStd, DynamicFront, DynamicSmoke. Just about all moving things are on DynamicStd.

My dev computer is a 4 core AMD something, and it’s really fast. So I was surprised by the performance issues revealed by the new poll, as I get 60fps where some people are reporting 10fps. Thanks to daniels7 for creating a nice little spreadsheet of issues, I was able to quickly identify the biggest slowdowns.

Preorder with PayPal!

Since the Kickstarter campaign reached its goal, I’ve added PayPal as a payment option. You can find the link to PayPal on the Jetpack 2 Kickstarter page.

Interesting Ad Stuff

I’ve spent over $1000 on ads for the Kickstarter project in the last month. That generated 8 million ad views and 10,000+ clicks. It’s very tough to judge the results, since Kickstarter doesn’t give you much in the way of tracking. I had to know if it was worth the money, so I stopped all ads for 4 days, and pledges dropped by about 40% in that time. So by very rough estimates, the ads brought in about $1200 in 28 pledges. That’s a conversion rate of 0.35% on clicks, which was surprisingly low to me – for every 300 people that click a Jetpack ad, 1 person actually places a preorder. There’s also a small side benefit – more Facebook fans and signups on JetpackHQ.

With the tweaking I’m doing, I should be able to get the same results from now on for about a $250 spend, for a net profit of 260%. The conversion rate is key – if it went up to 1%, the net would be 750%. As the demo improves and the Kickstarter nears the end, I’m hoping that conversion rate will increase.

New Forums

Announcing the official Jetpack Forums! I’m still working on getting these set up. Theming coming soon.

Level Reviews on Reddit

This may eventually be replaced by forums, but for now try posting your levels on our SubReddit to get reviews and suggestions! This should be even more useful now, since you can click to play each level.
http://www.reddit.com/r/JetpackLevels/new/?sort=new

Members Only

I’m experimenting with making the beta members-only, to improve signups. Depending on the response, this may be a permanent change.


  • Post Categories