Introduction to 2D Game Development on Nokia Series 40 Asha Phones
- 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();
}
}
}
- 9. ›
›
›
›
Live ›
Demos: ›
›
›
›
- 13. › Layer
› Abstract class, any visual game
element
› LayerManager
› Combines layers together,
provides viewport
- 14. › Sprite
› Animated game object
› TiledLayer
› Game areas, backgrounds
- 15. › Sprite
› Animated element of the game
(character)
› Define Sequence, Delay
› Flip, Rotate
› Define Reference Point
› Detect Collisions
- 16. › TIledLayer
› Defines game backgrounds
› Can be animated
› Doesn’t have Sprite methods
- 17. ›
›
›
›
Live ›
Demos: ›
›
›
›
- 19. ›
›
›
›
Live ›
Demos: ›
›
›
›
- 21. › Java Heap size (1 – 4 MB)
› JAR file size ( 1 – 2 MB)
› CPU speed
› Screen Size 240x 320, 320x240,
Consider 128x160
› Input Type: T9, Qwerty, Touch-And-
Type
› Use Nokia Device Matrix
› Remote Device Access