Friday 27 July 2012

First android game - project outline


Time for a new project, you’re welcome to join me on the journey!

Step one, outline what you want to achieve…

  1. Game procedurally creates its own levels
  2. The project should be good tutorial fodder
  3. Game should be fun to play
  4. Game should be complete enough to be deployed to market
  5. Keep it simple, stupid!
That’s in order of importance for this project. Usually ‘fun to play’ would be number one, but what I really want to achieve with this project is first and foremost a bit of learning of my own, and secondly I’d like to turn it into a tutorial that might be of interest to other people just getting started with android game development.
Here’s a basic game idea that should do the job nicely…

Run Bobo Run!

Bobo is running along the path, he’s training hard to become the fastest clown in the world! Can you help him stay on the path and beat the level record? Try to avoid the walls, bumping into them slows Bobo down!
  • 2D game
  • Camera viewport locked onto Bobo
  • Tilting the device left/right moves Bobo in that direction
  • Procedurally generated level consists of a ‘path’ surrounded by wall ‘blocks’
  • Level fits the screen horizontally, and scrolls vertically
  • Bobo moves down the level automatically
  • Bobo cannot leave the path and colliding with wall blocks slows him down
  • Aim of the game is to get to end of level as quickly as possible, beat the level record!
  • The closest you get to ‘losing’ this game is finishing in a bad time – ideal for small children
This game could be extended to include multiple levels (vary level length, path width, Bobo speed), bonus pickups, speed boosts, new speed record facebook bragging, level grades (e.g. one star for sub 40 seconds, two stars for sub 35 seconds, three stars for sub 30 seconds, platinum cup for perfect level – sub 30 seconds, no wall collisions, all bonus pickups collected), a level select screen for direct access to previously unlocked levels, particle effects on collision with blocks, 3D graphics, story mode, character select… But honestly, it’s all getting a bit silly. We just want a very simple casual game for people to play when they’re bored (or to keep children amused for a little while), and one of the project tenets is to Keep it simple, stupid! We can always come back to some of these ideas later if we want, but for now let’s just make a working game!

What screens will the game need?

I figure a screen each for Menu, Game, Results, Best Time, Instructions, and About.

All screens transitions (bar one) will be as a result of UI button events. The transition from Game screen to Results screen is to be triggered when the level end is reached in the game. I know the transitions could be improved, maybe add a ‘Retry’ button to the Results screen, introduce a pause screen, a level select screen, etc. But I’m keeping things simple to start with.
To start with I’ll just focus on the Game screen, that’s where the real meat of the project lies.

What devices will the game run on?

This game is so simple that it should run on pretty much any Android device. I’ve decided to aim for global compatibility.
The smallest android phone resolution that I’m aware of is 240×320 (HTC Wildfire and HTC Tattoo), so let’s target that resolution. Higher resolution screens will simply scale to fit (the game won’t be Nexus 7 eye candy, but it should run all the same).
OpenGL ES 1.0 and 1.1 API spec have been supported since Android 1.0, OpenGL ES 2.0 since Android 2.2. Over 90% of devices support OpenGL 2.0 (http://developer.android.com/about/dashboards/index.html), and that percentage will keep on increasing, but what about the 10% with older devices, don’t they deserve to play this game too? Of course they do! I’ll target OpenGL 1.1.
I’m not aware of any Android devices (phones or tablets at least) that don’t at least have an accelerometer (tilt sensor) and touch screen support. I’ll avoid supporting more exotic inputs, a simple control scheme of touch for menu options and tilt for gameplay is plenty for this game. Note that for the purpose of being able to test on my dev laptop (much quicker than using the emulator or deploying apk’s to device) I’ll also include keyboard and mouse support.

Game Screen Mockup

Here’s a first stab at an example game screen:


  • 240x320px viewport displaying some of the level
  • Level is made up of 16x32px rectangular tiles
  • Tiles are either ‘path’ (beige) or ‘block’ (orange)
  • Bobo the clown is on the path (his sprite is also 16x32px)
  • Basic HUD displays progress percentage and current time
It’s not the most exciting looking thing we’ve ever seen, but it should be a good little project to work on nonetheless.
In the next post I’ll probably cover the procedural level generation algorithm, and maybe more if there’s time… See you then!

          

No comments:

Post a Comment