Introduction to 2D Game Development on Nokia Series 40 Asha Phones

Preview:

DESCRIPTION

During this webinar, you’ll learn how to get started with 2D game development for Nokia Series 40 Asha phones, even if you’ve never developed a game. Michael Samarin from Futurice will show you how to use the Game Builder tool to create simple games. All you need is familiarity with Java™ technology, with the NetBeans IDE (for which Game Builder is a plug-in), and with the Nokia SDK for Java™. Using the Game Builder visual tool and studying the code generated are great ways to build game development skills. The webinar also will give you an overview of Java ME classes typically used in game development. Finally, it will introduce you to asset-management techniques and associated platform limitations and capabilities.

Citation preview

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

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

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

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

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

› Game API Package (MIDP)

› javax.microedition.lcdui.game › GameCanvas

› Layer

› LayerManager

› Sprite

› TiledLayer

› GameCanvas › Double buffered

› Convenient for minimizing code of game loop

› Methods for querying status of keys

› 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();

}

}

}

Live Demos:

› Graphical Assets

› Graphical Assets – Sprite Star

› Graphical Assets – Sprite Lightning

› Layer › Abstract class, any visual game

element

› LayerManager

› Combines layers together, provides viewport

› Sprite › Animated game object

› TiledLayer

› Game areas, backgrounds

› Sprite

› Animated element of the game (character)

› Define Sequence, Delay

› Flip, Rotate

› Define Reference Point

› Detect Collisions

› TIledLayer

› Defines game backgrounds

› Can be animated

› Doesn’t have Sprite methods

Live Demos:

› NetBeans Game Builder Plug-In

Live Demos:

Asha 303 Nokia 111

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

Thank you!

@MichaelSamarin