Writing Java ME Games

http://tlbs.us/gameapi

What Kind of Games?

Old-skool games.

Game Dev concepts

Data: Sprites

Game Dev concepts

Data: Sprites

=> { 0, 1, 2, 1 } =>

Don't Steal!

But if you must "long-term borrow"...

http://www.videogamesprites.net
http://www.spriteaholic.com
http://www.gsarchives.net
http://www.panelmonkey.org
http://www.sprites-inc.co.uk

Game Dev concepts

Data: What we need in a map

Game Dev concepts

Data: Map Tiles

The Java ME Game API

javax.microedition.lcdui.game

javax.microedition.lcdui.game.Sprite

javax.microedition.lcdui.game.TiledLayer



javax.microedition.lcdui.game.LayerManager



TileTest!

Game Dev concepts

Gameplay mechanics - A Simple Game Loop

Multithreaded Game Engine

UIGame Updates
Controller InputMove characters
Refresh ScreenUpdate world state
Controller InputWait...
Refresh ScreenMove characters
Controller InputUpdate world state
Refresh ScreenWait...
......

Gameplay mechanics

    public void run()
    {
      while (! _gameOver)
      {
        updateWorld();    // move player, creatures, projectiles, etc.
        checkGameState(); // check for game over, goal achieved, etc
        delay();          // maintain a consistent FPS
      }
    }
    

Our Object Heirarchy

Canvas++

javax.microedition.lcdui.game.GameCanvas

Buy Cheap Replica 3D Online Today

Parallax. Looks like the real thing!

Multiple background layers, all moving at different speeds.

GameTest

Point your phone at: http://jexe.net/gt.jad

Source: http://tlbs.us/gameapi/gameapi.zip

Other stuff: Sound (Just my opnion, but...)

*But everyone who won't play your game does.**
**Which means you'll probably have to do it.

Other stuff: Java ME Porting Terror

?