[Hajdukovic] Developing J2ME games for mobile phones
1. Developing J2ME games
Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
for mobile phones
Slovenia
www.razum.eu
info@razum.eu
Žiga Hajduković, Razum d.o.o.
2. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
DEVELOPING J2ME GAMES FOR MOBILE PHONES
Intro
Mobile devices
Mobile games
HOWTO: Pong!
The Future
Questions / Contact
The Little Red Riding Hood
3. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
INTRO
Razum, research and development studio → www.razum.eu
Developing advanced solutions to interesting problems and researching new technologies
Platform for building enterprise information systems
Server + web + mobile Blackberry client
Client-server Application Architecture Design
Oystar Small Business Loyalty – RFID, Nokia 6131 NFC - 1st European NFC Competition → Award!
Mobile games
6-week “Mobile Game Development” course
Faculty for computer and information science, University of Ljubljana
6 lessons, 2 groups, 60 students, game dev. competition w/ awards!
Cocoasoft, Mobile Game Design & Development, AI
Car Racer 2 (racing FRP), Pahtum (board game, AI), Michel Vaillant Rally ..
Tetris1D.org → www.tetris1d.org
Tetris1D, Tetris1D Mobile Edition, Twinoo, Trioomph ..
4. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE DEVICES - SHOUJI ( 手机 )
Mobile phones
X1 / Windows Mobile / iPhone / Blackberry Storm ..
5. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE DEVICES - ADVANCED MULTIMEDIA FUNCTIONS
Walkman - MP3 / Radio
Photo / Video camera
Television
GPS
Internet / blogging device
6. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE DEVICES
3.3 billion (November, 2007) mobile phones – half of the world population (80% by 2013)
Keys, wallet, phone
Wallet → phone (!)
Keys → phone (!)
Connecting people, social interaction
Relatively cheap but high tech.
The transition: Family phone → personal object!
Clock, alarms (wake up, events, todo..), calendar, camera
Navigation, GPS, Bluetooth, ..
en.wikipedia.org/wiki/Mobile_phone
Mobile Gaming!
revenue (billion $) (~10% annual growth): 2007 => $3.9, 2008 ~>$4.5, 2011 ~> $6.3
7. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE DEVICES - PROPERTIES
Good +
Connectivity – “always” connected
Handy – always nearby
Personalized – personal device
Evil -
Unpredictable costs – of connecting (but improving..)
Unpractical – small screen, small keypad
8. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE GAMES – MOBILE INTERFACE DESIGN GUIDELINES
Quality function formula:
Design for a tiny screen with bad contrast and color quality
MIN( user input ) - input is generally annoying for the user
MIN( data transfer ) - GPRS → $/Kb
MIN( processor usage ) - battery! (3D?..)
Keep in mind, desktop computer vs. mobile device paradigms
big screen broadband VS small screen GPRS
browse the web VS require specific piece of info
9. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE GAMES – DEVELOPMENT PLATFORMS
Java 2 ME
MIDP (1.0, 2.0, 2.1, ..3.0), CLDC (1.0, 1.1)
Extensions/JSRs: Bluetooth, WMA, MMAPI, PIM, Location, 3D..
Symbian / C++
Python (Nokia S60 platform)
BREW (US) / C++ / Qualcomm
i-Appli (Japan) ~ J2ME / DoCoMo
Android (Google, Linux)
iPhone!
.NET Compact Framework (PocketPC, Windows Mobile)
en.wikipedia.org/wiki/Mobile_development
10. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE GAMES – J2ME
Why Java?
Widely supported on mobile phones and devices
Development tools readily available and free (Netbeanse, Eclipse, ..)
Strong developer community
MIDlet – the mobile applet
MIDlet installation package – JAR+JAD files
MIDP 1.0 .. LCD UI, RMS ..
MIDP 2.0 .. Game API, MultiMedia API, setFullScreenMode
CLDC 1.0 .. J2SE subset .. java.util, java.lang
CLDC 1.1 .. +floating point..
11. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE GAMES – J2ME API, OPTIONAL PACKAGES, MSA 2.0
12. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE GAMES – TYPICAL DEVELOPMENT PROCESS – INIT
Brain storming
The all important phase, more so as a game project begins, reappearing during various stages of
development.
Game Design Overview Document
Usually a quick brain dump of an individual to present a new game idea, couple of pages, core
gameplay description, main characters and game objects, and approximate development time line.
Game Design Document
Nice to have to keep all the developers on the same page, descriptions of all the game elements:
obstacles, opponents, NPCs, AI, level design, story flow.. depending on the game type
13. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE GAMES – TYPICAL DEVELOPMENT PROCESS – ITERATION
Development (coding, graphics, sound)
Tight developer coordination with graphics and audio designers
Iterative “gameplay testing ←→ development” cycle
The QA “department” should test the game as often as possible!
Iterative “Porting ← Testing → Bugfixing” cycle
adjustments and optimizations for actual specified devices
Release
woohoo!
14. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
HOWTO: PONG!
Game Engine
HOWTO: Pong!
Live Test!
Tools
Netbeans 6.1 + Mobility Pack
Sun Java Wireless Toolkit (2.5.2 for CLDC)
15. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
16. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
MOBILE GAMES – TIPS AND TRICKS
Graphics
Contrast! Outlining sprites and game objects
Transparency for non-rectangular sprites
Automatically (PNG optimizers: pngout..) and manually lower number of colors and edges
Optimization
Speed (WTK Profiler helps)
Memory (Heap) – prevent fragmentation!
Package size (JAR Size) ... pngout, no folders, short class names, lower number of files
Obfuscation
Speed “sense“
Aliveness – is it working? Use indicators, progress bars..
Responsiveness – How much lag is there between user action and game screen response?
Masking delays – Use splash images while loading.. mini games when searching for open games..
Porting
Detecting and adjusting to screen size
Netbeans mobile “configurations“
Vector graphics (simple lines and rectangles or even more complex like SVG API (not yet widely supported!))
18. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
LINKS
Mobile game development course, spring 2005 (in Slovenian only)
www.tetris1d.org/game/dev/tecaj/Lesson_01.php
Gamasutra → www.gamasutra.com
Game Developers Conference (Mobile) → www.gdconf.com
Games on Deck → www.gamesondeck.com
Forum Nokia → forum.nokia.com
Sony Ericsson Developer → developer.sonyericsson.com
About Mobility Weblog – C. Enrique Ortiz → weblog.cenriqueortiz.com
Sun Mobility → developers.sun.com/mobility/allarticles/
Gameloft → www.gameloft.com
glu → www.glu.com
EA Mobile, Pop Cap, THQ Wireless ..
Google → www.google.com
19. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
THE LITTLE RED RIDING HOOD – TECHNOLOGY PREVIEW
Mobile download: m.razum.si
web demo: www.razum.si/game/
Player decision controlled story flow engine
“Choose Your Own Adventure“ style interactive gameplay
Vector graphics engine
All graphics scalable to different screen sizes!
(one size fits all)
20. Razum d.o.o.
Gozdna pot 7
1000 Ljubljana
Slovenia
www.razum.eu
info@razum.eu
QUESTIONS?
Contact
Žiga Hajduković
ziga.hajdukovic@razum.eu
Looking for a fresh new job?
Razum, research and development studio
info@razum.eu
www.razum.eu