Wednesday, March 24, 2010

Progress Report: March 24, 2010

This is my first progress report!  But before I go into the report, let's talk quickly about my the game idea.  My game will be based off of another game (what game ISN'T based off something else nowadays?!) called Canabalt, created by Adam Saltsman.  It's a fun, fast, and furious little game that Adam created within a span of 5 days (wow!).  If you don't know about it, you can click the link and try out the flash version of the game; an Iphone version is also available for purchase.  However, he hasn't made an Android version yet, so I'm hoping to fill in that niche market!  Basic premise of the game is that you are running and jumping from one rooftop to another, avoiding obstacles and trying not to smack into walls or fall between buildings.  The only control you have is JUMP, so the running and acceleration is automatic.  When you die, the game is over.  The only important statistic is how far you ran before your demise.  It's a pretty simple concept, but it seems to work so well, especially for a smartphone game. 
 
So I am trying to make a game just like Canabalt.  If you're asking: "Why don't you use some creativity and try something new?", see this post.  What have I done so far?
 
  1. Coded a simple engine that is based on a constant framerate (currently set to 25fps), making use of Android's SurfaceView class.  My physics update function for the player is time-based (as opposed to frame-based).  This means that his movements - horizontal and vertical - are calculated based on real time, not frames. However, the sprite animations are frame-based.  But since the engine is running at a constant framerate, this shouldn't be an issue.  I'll have to revisit this later on should I decide to change the engine to allow for a variable framerate.
  2. Created an environment that is composed of buildings and gaps between the buildings.  Currently, I have three types of buildings: tall, medium, and short. 
  3. Created a player that can run and fall off buildings in the environment, taking into account horizontal and vertical velocities and accelerations. 
  4. Used existing sprite sheet from one of my favourite Naruto characters, Rock Lee!  I found his sprite sheet here.  Don't worry!  I'm only testing with these sprite sheets.  Eventually, I'll make my own original sprites!  So far, I've got animation of him running (6 frames looping), standing (1 frame), and falling (1 frame). 
  5. I've been working on the pseudo-code for implementing the jump functionality.  I think I am pretty much ready to code it.
  6. Throughout all this work, I've been documenting all my stuff: pseudo-code, design, state diagrams, acceleration/velocity/distance algorithms, etc..  I'll try to share some of that in future posts.
 
In terms of coding, I think I'm close to finishing.  After implementing the jump functionality, I need to code how to handle when the player gets into the "game over" state, and an algorithm that randomly generates the environments.  After that, I'm pretty much done coding, unless I want to go back and do some code optimizations.  But I think I'll leave the optimization work to the very end (...because it's not as exciting as creating!).
 

No comments:

Post a Comment