JetpackHQ | Blog Home | Register | Log in    

Please subscribe to be notified about the progress of Jetpack 2!

Progress Update

June 23rd, 2009

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.

If you haven’t yet, please register with JetpackHQ to subscribe to this blog!  Your account will be automatically imported to JetpackHQ when the time comes.

Share/Save/Bookmark

Development Continues

June 1st, 2009

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.

Share/Save/Bookmark

Jetpack World Headquarters

January 21st, 2009

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.

Share/Save/Bookmark

Temporary Blockage

July 28th, 2008

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.

Share/Save/Bookmark

Particle Effects

June 23rd, 2008

Here’s a test of the new particle smoke system I’ve been working on for the Jetpack exhaust. This one uses 400+ separate smoke particles, but in the game this number will have to be reduced for speed. I would also like the smoke to flow along the floor, but this might be too taxing on the collision system, and I might have to just make the particles disappear when they hit the floor. Whatever we end up with, I think it will look pretty cool.



This requires Flash 9 - please let me know if you have any problems getting the example to run!

Share/Save/Bookmark

A Question of Scale

June 2nd, 2008

There’s a delicate balance to reach between side of visual appeal & character complexity, and the side of level quality. That balance is achieved by selecting the proper scale. I’ve decided that the tiles should be one of 3 sizes: 30px, 32px, or 36px. Since the game resolution will be 800×600, adjusting for an extra wall and the status panels gives us corresponding usable level sizes of: 26tiles * 17tiles, 24tiles * 16tiles, or 22tiles * 15 tiles. (The original Jetpack’s levels were 26tiles * 16tiles).

As I’ve stated before, Jetpack 2 will not scroll, so the scale must be kept small in order for the levels to have proper complexity. However, missions will consist of multiple levels/rooms, so puzzles can span several rooms. We also want to appeal to the average casual game player, and a quick look at the most popular casual games reveals that they typically have a much larger scale. Copying what’s popular is an easy choice - but not necessarily a correct one.

Below are drafts of the different scales at the actual size they will appear in the browser (in the downloadable version this can be full screen). Included are some everyday household objects for detail reference. Keeping in mind the balance we need to achieve, weigh in on which you prefer!

36
36px tiles = 22×15 levels
We give up 4 columns and 1 row from the original Jetpack, but we get a significantly larger scale.
 
 
32
32px tiles = 24×16 levels
Levels are 2 columns smaller, characters are slightly larger.
 
 
30
30px tiles = 26×17 levels
Levels are about the same size as Jetpack 1, small scale characters.
 
 
thin walls
A rough example of the center-less tiles that allow for more detailed levels

Share/Save/Bookmark

Parallax Without Scrolling?

April 8th, 2008

I’m pretty much committed to not doing any scrolling in Jetpack 2. That creates a different type of game, and I haven’t done everything I’d like to with the single-screen style yet. But I want to give the whole screen life, so I’m investigating the possibility of scrolling just the background, while keeping the foreground still. This will create a slightly odd parallax effect. The background would move very slowly to the left as the player runs right.

I wasn’t sure quite how to do this, but it reminded me of Rastan, so I fired up MAME to see how they did it. It looks pretty good in Rastan, but of course that is a scrolling game. Will it look good in Jetpack? You be the judge.

Since I’m still waiting on SWF encryption to protect my source code, I can’t publish a working demo, but try to picture the background moving in this remix of level 1.

[somehow I lost this image.. sorry!]

Note these are all programmer graphics, and will get much better once I find an artist!

Share/Save/Bookmark

Writing a preloader in ActionScript 3

March 25th, 2008

Note: This is a pretty technical post, if you’re not a programmer you will probably not be interested!

A preloader gives the user something to look at while the rest of your program loads. This is one of the nice things about SWF’s, they are capable of streaming - showing part of their content before fully downloaded. The way you do this is by putting all the content to be loaded later on a later frame of the SWF timeline. This does get a little complicated, because ideally you should preload not just your data, but your code as well. Any classes you don’t need for the preloader should be placed on a later frame along with any library assets.

This is where a big bug in ActionScript 3 shows up - the “Export classes in frame” setting appears to be badly broken, as discussed on actionscript.org. As you can tell, Adobe’s error is making some professionals desperate to find a workaround. Well, thanks to others in the ActionScript community, I’ve finally discovered the workaround. Unfortunately it involves abandoning Flash in favor of Flex. But, this isn’t as bad as it may sound. While I detest the Eclipse-based Flex Builder IDE, I discovered a fantastic (and free) tool called FlashDevelop that is a superior development environment to Flex Builder or Flash, and offers easier customization while lacking just a little polish (for one thing, syntax highlighting must be edited via XML file). FlashDevelop uses the command-line SWF compiler mxmlc that comes in the new (also free) Flex 3 SDK.

Actually since Adobe has all these nebulous products floating around that all pretty much do the same thing (Flash, Flex, Air, who knows what else), it’s a little confusing what language you are using for your source files. It’s ActionScript but it’s the Flex brand of ActionScript, which is a few tweaks different from Flash ActionScript. They could just merge all these tweaks into a single language and let you choose which features you want to use, but I imagine like in many other things computer, there’s less money in making things simple. Anyway, basically in Flex-ActionScript, you can embed all your library assets via source code, rather than via an IDE. Although the way you do this is a little awkward, I find it highly preferable. And you can still use advanced layouts and components by just including them via SWC

Once you get your project converted to Flex, here is the fix: instead of monkeying around with the timeline, set your preloader as your primary build class, and use the command-line option “-frame” to put your main program on frame 2 (placing the line [Frame(extraClass="Main")] in your preloader appears to be equivalent). Thanks to this German guy Sven Busse for discovering this (unfortunately the text is German, but the source code is readable). Also thanks to Lars Gerckens for his research, and BIT-101 for this alternate solution. And of course thanks to Adobe for providing such horrendously incomplete documentation that things like this have to be discovered through much trial and error. I can’t fault them too much though, since they are at least finally strangling the abomination that was Macromedia’s ActionScript 2.

After your preloading is done, you have to start the main class - but you can’t reference it because then Flex will include it, and all the classes it uses, along with the preloader on frame 1. Here’s how you instantiate it without referencing it (’Main’ is the name of the main class):


nextFrame(); // goto Main frame
var classdef:Class = getDefinitionByName("Main") as Class;
var main:DisplayObject = new classdef(); // runs itself

Now there’s another problem - your Main class won’t have a stage object until after you call addChild(main) - but how does Preloader tell Main to initialize after, when Preloader doesn’t know what class Main is? The way I do it is by storing the stage in a global variable, then letting main add itself to the stage in the constructor. I use a class called Sys that contains static variables for build type, debug mode, stage, and a few other globals. Generally globals are a bad thing, but in certain cases like this I think they are worth it.

If you have find any caveats or improvements, let me know!

=======================

One problem still exists: when loading this in a web browser, loaderInfo.bytesLoaded seems to only reflect the first frame. We need to know the total bytes for the entire SWF to accurately show load progress. From looking at the source code to mx.preloaders.DownloadProgressBar, Adobe’s own code actually has to guess at the size of the SWF it’s loading. Weak. So no “percentage loaded” indicator is going to be accurate unless you explicitly provide it with the estimated size of your SWF.

Share/Save/Bookmark

Ad Blockers Considered Harmful

March 22nd, 2008

I did some research on ad blockers a while ago and thought I would share it here while we are waiting for a working beta of SWF encryption software. After my research I realized that ad blocking software is very bad for the web as we know it, and more damaging than software piracy (since I believe that most pirates wouldn’t buy the product anyway). It doesn’t affect this website as I don’t have ads yet, but it has hurt some of my free website projects in the past.

The problem is not that ad blocking software exists, but that the design is severely flawed. I like the idea of being able to block annoying ads. But surprisingly, of the dozens+ of ad blocking programs out there, not a single one will let me do that! They are all set to BLOCK EVERYTHING BY DEFAULT - including the inoffensive ads and the sites you use daily and want to support. Some let you “whitelist” sites where you want to see ads, but this is a red herring. The harmful flaw of this software is due to the power of defaults. No significant number of people is going to go through this process for every site they want to support: [disable the ad-blocker, find out if a site has inoffensive ads, enable ads on that site, reenable the ad-blocker]

While researching this issue I installed an ad-blocker with no intention of keeping it - but I liked it, and now I understand the problem. You want it for that damn 5% - those annoying websites with popups and flashing ads. But being an ethical person I want to support the other 95% of sites I like. When you install an ad blocker, it’s a real eye opener to see how differently a sizeable chunk of people are seeing your website.

At worst, ad-blockers hurt the free web. At least, they are ripping us off. People who use ad-blocking software are being subsidized by people who do not. Everyone who runs this software (MILLIONS of people) is leeching off the free web, and depending on those who do not leech to keep their favorite websites free. There are no good estimates that I could find as to how much revenue is lost due to this problem (it’s very hard to measure), but since the number of users is in the millions (just one program boasts 1.35 million subscribers), I would guess that between of 10%-30% of revenue on free websites is being lost due to leeching, most of which is not the fault of the users but software makers who have no vested interest in fairness to free websites.

The logical extension of this problem, if everyone installed today’s ad-blocking software, is that large portions of the free web would dry up, either going subscription-based, or out of business. That makes this flawed software hostile to my business. But where is the public rage, or at least the mild annoyance? This issue is not in the public consciousness. It is mentioned on a few public forums, where virtually everyone is in support of the ad blocking software. I think this reflects a real misunderstanding of this software’s effect.

One potential solution I came up with is to convince companies to change the paradigm from block everything, to block ON DEMAND. I think this option would be popular, because it lets the user lack the smack down on bad websites, while being much more friendly to the good ones. It’s the way I would like the software to work, speaking as a user, not just as a website owner. This active censorship could even have the effect of discouraging annoying ads from being run in the first place.

I wrote to a few developers of the largest ad blocking products to suggest this change, and I was greeted with indifference and even rudeness - not surprising. They already know their software is costing us money. Maybe the proper negative attitude toward software with this flawed design will eventually convince these companies to listen. This issue needs better public awareness. Webmasters that rely on ad revenue to stay in business should be aware of the harm being done to them personally by this software.

Related Articles

Browser Makers Warned Against Ad Blocking
“The end of free Internet content will come when Web browsers start blocking online advertisements by default, a DoubleClick executive has warned.”

Is Norton Blocking Your Internet Marketing Efforts?
“Even though these products are sold as “Security” THE DEFAULT IS SET TO BLOCK ADS”

Norton Antivirus 2004 Ad Blocking - Tough Call?
“If banner ads fail, more and more sites will be forced into a pay model, and the days of the “Free Internet” will be almost over.”

Wikipedia - Ad Filtering

Legitimate products

These appears to be more legitimate products, only blocking popups and adware, but not stripping ads from webpages.

Stopzilla
Pop-up Stopper

Share/Save/Bookmark

Moving Day

February 26th, 2008

I’m moving this week so there won’t be any updates.

I will post some SWF technology tests as soon as SWF encryption software is released for ActionScript 3 - should be within a month.

Do me a favor and link to JetpackHQ if you have a website, help spread the word!

Share/Save/Bookmark

  • Archives