Nokia Asha webinar: Introduction to Nokia Asha SDK 1.1: New and updated features
Game Development for Nokia Asha Devices with Java ME #1
-
Upload
marlon-luz -
Category
Documents
-
view
670 -
download
3
description
Transcript of Game Development for Nokia Asha Devices with Java ME #1
![Page 1: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/1.jpg)
Game Development for Nokia Asha Devices with Java ME
Marlon Luz - INdTNokia Developer Evangelist
@marlonluz
![Page 2: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/2.jpg)
WHAT IS THE
INdT?
mobile tecnologies and internet
for areas related to
with focus in development of
new concepts, products & solutions
CENTER OF
RESEARCH & DEVELOPMENT
nonprofit
CENTER OF
RESEARCH & DEVELOPMENT
nonprofit
![Page 3: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/3.jpg)
Training Content
• Talk on games• Nokia App Store• Nokia Platforms• Introduction to Java ME Development• Game API• Publishing your game
![Page 4: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/4.jpg)
Mobile Games• Player Experience• Idea• Design• Audio• Coding
![Page 5: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/5.jpg)
Nokia App Store
![Page 6: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/6.jpg)
Nokia App Store, Series40 & JavaME
120k+ apps, 15m downloads/day
Brasil: 150m downloads (total),
50m in 2012, 500k per day, 56%
in Series 40, 73% of purchases are JavaME apps
![Page 7: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/7.jpg)
Nokia Platforms
Silverlight, XNA
Java apps PhonesSeries 40
![Page 8: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/8.jpg)
Mobile Platforms
http://gs.statcounter.com/#mobile_os-ww-monthly-201201-201212
![Page 9: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/9.jpg)
Mobile Platforms
http://gs.statcounter.com/#mobile_os-af-monthly-201201-201212
![Page 10: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/10.jpg)
Mobile Platforms
http://gs.statcounter.com/#mobile_os-as-monthly-201201-201212
![Page 11: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/11.jpg)
Nokia SDK 2.0 for Java• Emulates the device
environment• Location, contactos,
etc.• Emulates mobile
events like battery, sms, etc.
• IDE Integration
![Page 12: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/12.jpg)
Development• IDE Installation• Overview JavaME• First Project
![Page 13: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/13.jpg)
• Java Micro Edition (ME) is the Java for devices with limited resources
• Java ME brings a common platform for devices like:• Mobile phones• Pagers• PDAs• Set-top boxes
• Java ME defines a set of configurations, profiles e optional APIs;
• Java ME enables the developers to create applications for a large number of devices;
JavaME Overview
![Page 14: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/14.jpg)
• Support a wide variety of products that fit within the scope of J2ME;
• Defines a Java platform for a wide variety of devices, also defines a JVM (Java Virtual Machine) and the minimum set of class libraries available:• Connected Device Configuration (CDC)• Connected Limited Device Configuration (CLDC)
Configurations
![Page 15: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/15.jpg)
• 128 kilobytes of memory to run Java;• 32 kilobytes for memory allocation in
runtime;• No user interface;• Low power processing, battery enabled
device;• 16-32 Mhz Processor
CLDC
![Page 16: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/16.jpg)
• Needed APIs to develop applications for a specific set of devices• MIDP• IMP• PBP• ...
Profiles
![Page 17: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/17.jpg)
• Mobile Information Device Profile; • MIDP defines the following set of classes:• Application Lifecycle Package• User Interface Package• Persistence Package• Networking Package• Language and Utility Packages
MIDP
CLDC or KVM
CLDC Core classes
Mobile
Info
rmatio
nD
evice
Pro
file
Persiste
nt
Sto
rag
e
Netw
orkin
g
Use
rIn
terfa
ce
MID
let
APIs
![Page 18: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/18.jpg)
• 3 versions available:
MIDP
MIDP 1.0 MIDP 2.0
Memory Requirement At least 200KB At least 256KB
High/Low-Level UI
Network API
Persistent Storage API
Game API
Secure networking
Push Registry
Signed MIDlets
![Page 19: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/19.jpg)
• Apps Java that run on MIDP devices are known as MIDlets
• MIDlets are defined in the javax.microedition.midlet package
• Child of the abstract class javax.microedition.midlet.MIDlet
• Life cycle defined and managed by methods implemented in the MIDlet;
MIDlets
![Page 20: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/20.jpg)
MIDlets• An application manager controls the MIDlet
running• The MIDlet behavior is controlled by a life cycle
through methods that a MIDlet has to implement
Destroyed
Paused ActivestartApp()
pauseApp()
destroyApp() destroyApp()
default constructor()
![Page 21: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/21.jpg)
MIDlets• The platform can change the state from Active
to Paused at any time
Destroyed
Paused Active
startApp()
pauseApp()
destroyApp() destroyApp()
![Page 22: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/22.jpg)
MIDlets• The method destroyApp() of a MIDlet is called
when the platform needs shutdown a MIDlet
Destroyed
Paused Active
startApp()
pauseApp()
destroyApp() destroyApp()
![Page 23: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/23.jpg)
MIDlets• Let´s see how to implement a MIDlet
#stopTalking#startCoding
![Page 24: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/24.jpg)
JAD and JAR• JAD (Java Application Descriptor)
• Provides information on the content of a JAR file
• JAR (Java Archive)• Packaging various kinds of information (classes,
images, audio, data)
• Attributes JAR/JAD
![Page 25: Game Development for Nokia Asha Devices with Java ME #1](https://reader034.fdocuments.in/reader034/viewer/2022050801/548bb970b479596d778b4595/html5/thumbnails/25.jpg)
Development processDevelopment Station
MyMIDlet.java
javac
MyMIDlet.class
MyMIDlet.class
MyMIDlet.jar
MyMIDlet.jad
Target Devices
preverify
jar
Download/deploy
Download/deploy