Vous êtes sur la page 1sur 13

.

SE310

2009-2010

:
, 7 :

3, 2:0:2:5 (::: )

http://www.csms.edu.mn/bauirbek

, :

,
:

202
, , 12.00-21.30, , : 16.00-21.30

, :

Bauirbek@yahoo.com, 99145367


:
:

:
, :
,
:

, :
Java j2me
, wap
. MIDP2.0, CLDC, MIDLET, JAD, SPRITE,
COLLISION, ANNIMATION event
.

1. Wireless J2ME Platform Programming - The Suns MicroSystems, Inc.,


ISBN-0-13-044914-8, 2004

,
:

, j2me
.

1. J2ME_Game_Development_with_MIDP2, by Jason Lam,

& :
5
:
8- : 10
15- :.......... 10
:............. 24
:21
: 70

1
Sun
Java :
J2EE : Java 2 Platform Enterprice Edition.

J2SE : Java 2 Platform Standart Edition.

J2ME : Java 2 Platform Micro Edition.

J2SE : Java 2 Platform Standart Edition.

Motorola, Nokia, NTT DoCoMo, Palm Computing, RIM, Siemens


KVM Java .
Java :
Java 2 Second Edition : For desktop application
Java 2 Enterprice Edition : For server application
Java 2 Micro Edition : For small devices such as cell phone, PD

, J2ME

Connected Device Configuration (CDC) :
. PD.
Connected Limited Device Configuration (CLDC) : ,
. .

CLDC 1.0 , CLDC 1.1 .

Mobile Information Device Profile (MIDP) :


.
MIDP 2.0 requirements:
9654
256 kb (for MIDP implementation)
8 kb
Java 128 kb

2
:

:
Arcade / Action: , ,
. : Quake, Counter Strike
Puzzle:
Card: . .
Strategy: , , . : Command
and Conquer, World of Warcraft
RPG: , .
Sport:
:
:

1-5


Jad MIDlet- :
Main
Icon
Jad mf jar MIDlet- . Jar
MIDlet MIDlet MIDlet-1, MIDlet-2 ...
.

3
MIDlet life cycle:

MIDP 2.0 packages:


MIDP 2.0- 11 . J2SE-
, .
java.io : .
java.lang : . Boolean, Byte, Integer
.
java.util : Vector, timer,
.

javax.microedition.io : MIDP 1.0-


. :

Socket
Stream
Udp
Datagram
Secure connection

javax.microedition.lcdui : awt .
.
javax.microedition.lcdui.game
: MIDP 2.0 .
(collision, animation ) .
javax.microedition.media : MIDP 2.0- .
,
.
javax.microedition.media.control :

.
javax.microedition.midlet : MIDlet- .
javax.microedition.pki : Secure connection- sertificate- .
javax.microedition.rms : J2ME- security .
, ,
/ .
:
Constants : .
SlideTask : . Canvas-
repaint( ) .
SlideCanvas : Canvas.
paint( ) .
ImageSlideShow : ,
MIDlet .

4
Animation:
. :
.

.

.
MIDP 1.0- .
clip
.
Double buffering:
.
paint( )
refresh .

paint( )
refresh ( )
.
double buffering .
. double buffering
.
Double Buffering ? .
.

Front Buffer : .

Back Buffer : .

5
:
:
bitmap .
.
event- :

. .
Canvas getGameAction() .
.

Soft buttons:
J2ME- soft button .
.
.

6
Forms and Screens:
Screen - 4 :
Alert
List
TextBox
Form
( , ...)
Soft Button .

List .
Alert .
TextBox .

7
Form:
container . Item
.
MIDP 2.0 8 :

ChoiseGroup

CustomItem

DataField

Gauge

ImageItem

Spacer

StringItem

TextField

ChoiseGroup:
ChoiseGroup List- . CheckBox, RadioButton
. .
CustomItem:
CustomItem .
paint( )
.
.
DataField:
DataField
.
, .
.
Gauge:
Gauge ProgressBar .

Gauge :
Interactive :
Non interactive : , load
.

ImageItem:
ImageItem bitmap .
Spacer:
Spacer .
StringItem:
StringItem .
TextField:

TextField TextBox .
:
.
?
MIDP 1.0 - .
MIDP 2.0 - layout
.

8
Game API:
. Javax.microedition.
lcdui.game . Canvas bitmap
, ,
.
GameCanvas .
GameCanvas-
.
Layer:
Layer .
:
Sprite
TiledLayer
Layer , , ,
.
.
Sprite:
Sprite .
, .
hardware Sprite . Sprite
. Sprite

,

.
Sprite .
, .
Collision :
Sprite Sprite, Tile, Image-
. :

TiledLayer:
Game API TiledLayer . background
. map .
, , .
2 :
Sprite- :
TileLayer : background Sprite- ,
.
Tile
,
.
Sprite Tile ,

.

Tile bitmap . .

10
LayerManager:
Sprite TiledLayer- paint( )
LayerManager . LayerManager sprite-,
TilerLayer
.
LayerManager- :
:

g : .
x, y : .
LayerManager- .
.
append( ) .
:

11

MIDI :
MIDP 1.0 .
Beep() .
MIDP 2.0 Media API WAV, MP3
. MIDI . MIDI (Musical
Instrument Digital Interface)
1983 .
Media API:
MIDI .
.

.
Media API- :
Manager
Player
Control

Manager Player , .

Player , , .

Control .

12
:
Random .
.

Collection:
J2ME- Collection :
Vector
HashTable

Vector- :

Thread :
Thread- J2ME- .
TimerTask
Thread , Runnable .
:
J2ME .
.
RecordStore
RecordStore .
, , .
(recordID).
.
.
MIDlet- uninstall .
MIDlet suite (jar) MIDlet .

13
:
Personal Business .

MENU- DETAIL
. :

OK .

:
CreateAddressBook : .
RMSMIDlet : MIDlet.
SimpleComparator : .
.

SimpleRecord : ,
.

14
:
:
.
.

.
, .
.

.

15
Wireless network:
Bandwidth . (CDMA,
20
GSM) . 1Mb/ps (1 Mega bit per second) 2
128 kb () . (frequency)
.
.
.
Multiplexing :
(multiplexing)
.
multiplexing :
TDMA : Time Division Multiple Access .
CDMA : Code Division Multiple Accees .
PCS (Personal Communication Service) TDMA
CDMA . :
GSM (Global System for Mobile Communication) :
. TDMA . 14.4 kilobit ps.
cdmaOne : CDMA . 14.4 kilobit ps.
GPRS (General Packet Radio Service) : GSM
. 14.4 kb 115.2 kb .


.

2- (2G second generation)


. 1G 1980-1990 .

GPRS 2,5G .

3G . 3G .
.

3G 144kb 2Mb .

QUALCOMM cdmaOne CDMA2000 3G .

16
:
:

Client/Server : .
P2P (Peer to Peer) : .
. peer .
MIDP2.0 .
Stream socket : TCP . .
. ,
.
Datagram socket : UDP . .
.
.
IP
. .
multi thread ,
.
:
.

, .
.
.

, , .

MIDlet- :
MIDlet- :
Blue Tooth : Blue tooth , notebook .
.
Infrared : infrared . Infrared
notebook .
Serial USB : install driver CD-
.
.

Nokia 6070 CA-42 .

CD- MIDlet- .

Vous aimerez peut-être aussi