![Page 1: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/1.jpg)
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 [email protected]
@MichaelSamarin
![Page 2: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/2.jpg)
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
![Page 3: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/3.jpg)
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
![Page 4: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/4.jpg)
Nokia Developer Guides and Docs » http://www.developer.nokia.com/Resources/Library/Java/#!dev
elopers-guides/ui-and-graphics/game-api.html
6/4/2012
4
![Page 5: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/5.jpg)
Nokia Developer Guides and Docs
Oracle (Sun) Guides and Docs » http://developers.sun.com/mobility/midp/articles/gameapi/
» http://developers.sun.com/mobility/midp/articles/game/
» http://www.developer.nokia.com/Resources/Library/Java/#!developers-guides/ui-and-graphics/game-api.html
![Page 6: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/6.jpg)
› Game API Package (MIDP)
› javax.microedition.lcdui.game › GameCanvas
› Layer
› LayerManager
› Sprite
› TiledLayer
![Page 7: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/7.jpg)
› GameCanvas › Double buffered
› Convenient for minimizing code of game loop
› Methods for querying status of keys
![Page 8: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/8.jpg)
› 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();
}
}
}
![Page 9: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/9.jpg)
Live Demos:
›
›
›
›
›
›
›
›
›
![Page 10: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/10.jpg)
› Graphical Assets
![Page 11: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/11.jpg)
› Graphical Assets – Sprite Star
![Page 12: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/12.jpg)
› Graphical Assets – Sprite Lightning
![Page 13: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/13.jpg)
› Layer › Abstract class, any visual game
element
› LayerManager
› Combines layers together, provides viewport
![Page 14: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/14.jpg)
› Sprite › Animated game object
› TiledLayer
› Game areas, backgrounds
![Page 15: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/15.jpg)
› Sprite
› Animated element of the game (character)
› Define Sequence, Delay
› Flip, Rotate
› Define Reference Point
› Detect Collisions
![Page 16: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/16.jpg)
› TIledLayer
› Defines game backgrounds
› Can be animated
› Doesn’t have Sprite methods
![Page 17: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/17.jpg)
Live Demos:
›
›
›
›
›
›
›
›
›
![Page 18: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/18.jpg)
› NetBeans Game Builder Plug-In
![Page 19: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/19.jpg)
Live Demos:
›
›
›
›
›
›
›
›
›
![Page 20: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/20.jpg)
Asha 303 Nokia 111
![Page 21: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/21.jpg)
Consider
› Java Heap size (1 – 4 MB)
› JAR file size ( 1 – 2 MB)
› CPU speed
› Screen Size 240x 320, 320x240, 128x160
› Input Type: T9, Qwerty, Touch-And-Type
› Use Nokia Device Matrix
› Remote Device Access
![Page 22: Introduction to 2D Game Development on Nokia Series 40 Asha Phones](https://reader035.vdocuments.mx/reader035/viewer/2022081720/559b9de01a28ab08448b46e0/html5/thumbnails/22.jpg)
Thank you!
@MichaelSamarin