This document summarizes a training session on 2D game development for Nokia Series 40 phones. It discusses the large market for Series 40 games, available APIs and documentation, concepts like sprites and layers, the NetBeans plugin for game development, and considerations for optimizing games for different Series 40 devices. Live demos were also provided of building a sample game using these APIs and tools.
Getting Started with 2D Game Development on Nokia Series 40
1. Series 40 Developer Training
Getting Started with 2D Game
Development on Nokia Series 40 Asha
Phones
Michael Samarin, Ph.D
Director,
Developer Training and Evangelism
Futurice Oy
+358 40 518 18 09
michael.samarin@futurice.com
@MichaelSamarin
2. Today’s Topics
» Understanding Gaming Market for Series 40
» Where to get more information
» 2D Game APIs in Mobile Java
» Demo of 2D Game Building Concepts
» NetBeans 7.1 and Game Builder Plugin
» Walking Through Game Builder Sample
» Series 40 Devices and 2D Games Performance
3. Series 40
» 675 Million Devices
» 3.9 Million Daily Downloads
» Price range 35 – 140 Euro
» Gaming Studios to compete with: EA,
Gameloft, Rovio, India Games
4. Nokia Developer Guides and Docs
» http://www.developer.nokia.com/Resources/Library/Java/#!dev
elopers-guides/ui-and-graphics/game-api.html
6/4/201
4
2
5. Nokia Developer Guides and Docs
» http://www.developer.nokia.com/Resources/Library/Java/#!dev
elopers-guides/ui-and-graphics/game-api.html
Oracle (Sun) Guides and Docs
» http://developers.sun.com/mobility/midp/articles/gameapi/
» http://developers.sun.com/mobility/midp/articles/game/
6. › Game API Package (MIDP)
› javax.microedition.lcdui.game
› GameCanvas
› Layer
› LayerManager
› Sprite
› TiledLayer
7. › GameCanvas
› Double buffered
› Convenient for minimizing code
of game loop
› Methods for querying status of
keys
8. › GameCanvas
public class MyCanvas extends GameCanvas implements Runnable {
public void run() {
Graphics g = getGraphics();
while(true) {
// update the game state
int k = getKeyStates();
// respond to key events
flushGraphics();
}
}
}