Introducing Project Foobar

This is the first in a series of posts that will chronicle Project Foobar, otakuxgamer's attempt to develop a 2D platformer engine. This engine will be used to develop original games featuring this site's mascot.
As of this writing, I am working on what I consider to be the most important element of a 2D platformer - the controls. In an effort to ensure that games developed with the engine feel right, I have attempted to recreate some of the gameplay mechanics found in my favorite NES-era platformers, namely Mega Man 2, Zelda 2, Blaster Master, Ninja Gaiden 2, and Bionic Commando. For this purpose, I have recently replayed said games while noting the subtle differences in the way the main characters respond to player input. In turn, I have used what I learned to add features and mechanics that should make the engine much more flexible.
Click to play! | controls: left=A, right=D, jump=L
In the current build, I have no doubt that I could get Mega Man and Link to move as they did in the original games if I really wanted to. However, that is not the goal of this project. In fact, I purposely made it so that the characters jump higher and farther than their original counterparts. In addition, their rate of vertical acceleration and descent as well as their ground and air friction are a little looser. Despite these changes, as someone who still plays these games a lot, I can confidently say that the characters still feel "right" despite not being carbon copies. So, those familiar with the source material should be able to adapt to the changes quickly.
With this demo, my goal was to create a preliminary facsimile of Mega Man and Link as well as a playfield in which they could move around in. When I start developing again, I will work on the following:
Optimizations
The game runs noticeably slower on older systems. While there is a limit to how much I can alleviate this problem, the issue will always be in the back of my mind.
Vertical scrolling
I have already implemented what Tony Pa calls the "gotoAndStop" scrolling engine for horizontal movement. Now I have to do the same for vertical movement and hope that the implementation does not slow the entire engine to a crawl.
Map Builder Application
Too much time and effort was spent creating the simple maps that you see in the demo. This app should allow me to create more imaginative layouts with little effort.
More character types
Upcoming builds will see the addition of Sofia the 3rd from Blaster Master, Ryu from Ninja Gaiden 2, and Spencer from Bionic Commando. All three have different play mechanics that I want to incorporate into the engine.
Enemies
I will use the same code used to move the main characters, so this part will have to wait until I finish adding Sofia, Ryu, and Spencer.
Proper Door Handling
Right now, characters are taken to adjacent rooms before they actually reach the sides of the screen.
Mega Man-like room transitions
I will eventually implement the famous "pause Mega Man and scroll to the next room" effect once I am satisfied with movement, scrolling, and door handling.
Sound effects and looping background music
Code for basic sound effects and mp3 looping is already in place, but my main focus at this time is on controls and optimization. Expect to see these added much later.
If you notice any problems, feel free to send me a message or write something in the comments so that I can add them to this list.
- There are occasional control issues when using Firefox 4 and older versions of Flash. It would appear that this issue stems from Keyboard event handlers firing up to a second later than normal.
- Link stands half a pixel higher than he should. This issue seems to be hitbox-related.
- There is at least one horizontal scrolling anomaly that happen when the character is in the corner.
related: game development





