Posts Tagged ‘physics’


I modified my platformer engine in a few ways. First I killed off the fisix engine. It was really a physics engine, but the lack of support kind of killed progress for me. I switched to APE and I couldn’t be happier. Next I made it more generic. I removed the idea that this was going to simply be a platformer, and I started to think about what the difference was between 2D games in different genres. The only thing I could think of that truly separated them was the action that occurred while walking or attacking and the perspective of the game. In other words an RPG is top down or at an angle (essentially the same just with different art) and a platformer is side scrolling. The only other game type not accounted for is a SHMUP (Raiden and other top down flying shooter types). So I took my level reader and stepped it up a notch. I now have 2 xml files. One to characterize the level and the other to characterize the player. I allow for many built in “actions” such as walking up, up-right, right, down-right, etc, and I am hoping to also include a way to add custom actions. These actions are tied into 1 swf file with multiple movie clips. Not only that you could also specify whether a certain movie clip should be flipped for a certain action which cuts down on the amount of animations or duplicates one needs to make.

Simply stated I could specify in xml that the right action is using the left movie clip and is flipped horizontally but not vertically.

Not only that a person could specify a game mode. Right now it supports walk (RPG style) or jump (platformer style, side scroller).

So the code doesn’t look to bad either. I’d say the messiest part is deciding what happens when these actions are selected. In specific when to flip and clip, when to flip it back, modifying velocity while jumping etc.

Once I get more work done with it I may post the source code, or I may just give out tools for making levels :-D, but for now imagine a world where making a game was this simple:


<?xml version="1.0" encoding="utf-8" ?>
 <name>Platformer Demo</name>
 <surface x="5" y="600" width="7000" height="20" bounce="0.3" friction=".1" rotation="0"/>
 <surface x="5" y="5" width="200" height="10" bounce="0.3" friction=".1" rotation="2"/>
 <surface x="700" y="400" width="500" height="10" bounce="0.3" friction=".1" rotation="3"/>

Player Profile:

<?xml version="1.0" encoding="utf-8" ?>
 <bounds type="circle" x="450" y="100" radius="45" elasticity="0" friction=".1" visible="false" />
 <speed horizontal="15" verticle="15" maxH="30" maxJumps="2" />
 <clip name="walk_up" action="up" flipHorizontally="0" flipVertically="0" />
 <clip name="walk_down" action="down" flipHorizontally="0" flipVertically="0" />
 <clip name="walk_right" action="right" flipHorizontally="0" flipVertically="0" />
 <clip name="walk_right" action="left" flipHorizontally="1" flipVertically="0" />
 <clip name="walk_up" action="upRight" flipHorizontally="0" flipVertically="0" />
 <clip name="walk_up" action="upLeft" flipHorizontally="1" flipVertically="0" />
 <clip name="walk_down" action="downRight" flipHorizontally="0" flipVertically="0" />
 <clip name="walk_down" action="downleft" flipHorizontally="1" flipVertically="0" />
 <clip name="stand_right" action="stillRight" flipHorizontally="0" flipVertically="0" />
 <clip name="stand_right" action="stillLeft" flipHorizontally="1" flipVertically="0" />

Then imagine a world that had a drag and drop interface that could generate the XML files above with all the art specified as pngs with supported transparencies! 🙂

The implications also include that one game could have several level “types” per game with no extra development needed. Perhaps at some point people would be creating plug ins to support additional game types as well! Ahhh now we are just dreaming :).


So as some of you know I work for NetApp right now! One of my charters is to create tons of game prototypes. Yes yes i know NetApp has nothing to do with creating games. They are primarily a storage company; however, I work for NetApp University. So I was basically told to research and pitch ideas about gaming mixed with learning. To show them that it does not need to take FOREVER to make games or require tons of resources I spent 2 days creating this AS3 based flash platformer. It reads an XML file and then places platforms (and in the future other objects). They idea I pitched was akin to the Little Big Planet 2008 E3 presentation (below).  Everyone seemed to like it.

Here is the source code. It is short and sweet (200 lines)! There is not enough source code using the Fisix Engine out there. Also platformers are the first thing everyone wants to do when they start making flash games. I hope this helps…

I used Flash Develop with the Flex SDK to compile. If you want to mess with it and add just add more platforms just open bin>levels>testlevel.xml and just follow the format for the platforms… I think there is artificial barrier set for the level at some point. Linux and Mac users need to edit the path before compiling.

The Source