Wednesday, December 17, 2008

Leave the physics to me!

I'm finally "done" with my AS3 game engine now. It doesn't play music, support sound effects, or use character animation at all (okay, maybe a little), but it doesn't try to. I'll give you an example of how it would work.

First, you'd have to download the file. Then, you alter the levels.xml file with to point to the levels' background images and ground profiles. You add the enemies with the <enemy /> tag, the player controlled character with the <fighter /> tag, and the goal with the <goal /> tag. You can alter the position of the fighter, the goal, and the enemies and change the background image and layout of the level without even recompiling the code.

To add a character, you do have to start up flash, but you don't have to do any real coding. Simply make a class for your character in the com.flashgames.bunnyhopper file, set the max speed, jump height, and acceleration through simple variables, and associate the class with a library object. Now, you can add your character to the level by simply altering the levels.xml file.

It's not the most sophisticated game engine, or the most open-ended, but anybody (with flash) can easily reshape the game with a little HTML understanding and little-to-no programming knowledge. Let's see you do that with APE or Box2D!

Play a quick demo or download the source.