(Mobile Game Technology) - 1
(introduction to mobile games) (game development flow) GVM (General Virtual Machine) JAVA (JAVA Game) (Examples) - 2
? - 3
(, PDA), ( 150 X 150 ) CPU ( CPU) ( KB ~ KB) - 4
Application Application Program GVM, SK-VM Brew, Kittyhawk REX Middle ware (Virtual Machine) System Layer (Operating System) Mobile Information Device (Phone, PDA) Application WinCE Linux, PalmOS - 5
- 6
application, (CDMA 2000, IMT) (Gameboy ) response (1 ) (Phone-to-phone, Client-Server) - 7
? / CDMA, 2002 2500 10~50-8
(I) system (stand-alone) : (phone-to-phone) : 2 CS (client-server) : MUD - 9
(II) WAP WAP ( ) TCP/IP MUD - 10
(I) - 11
(II) - 12
, ( ) 2002 : 200 2003 : 1000-13
(I) SK telelcom (011, 017) NATE ( ) 100 WAP, 150 ( ),, gamble GVM (C ), SK-VM (java ) - 14
(II) KTF (016) Magic-n ( ), Magic-n platform 400. (, ), mobile LG telelcom (019) java station, => 100 WAP, 250 java game - 15
,, MUD ( ),,, (immersion) => - 16
(I),,, (Telco) SK telecom (011, 017 : n-top, NATE ) KTF (016,018 : Magic-N ) LG telecom (019) - 17
(II) ( ), LG, SKY,, C : GVM Brew (KTF) Java : SKVM(SKT) ez-java, Kittyhawk (LGT) - 18
GVM (General virtual machine), C,, Brew (Binary runtime environment for wireless) C,, API SKVM SKT, XCE Java java ez-java, Kittyhawk i-mode phone service model - 19
(overview) - 20
( ) (image, sound) - 21
stage map, /. ( ). ( ). ( - ). ( + ). (, ) ( ) long run - 22
. ( ). ( ) (,, ) (.).... - 23
event-driven. Windows application, java applet. (, )..,.. - 24
.., - 25
GVM GVM SWAP module GVM service system Application Type Mobile C - 26
GVM C (Mobile C) Event Handling JAVA API GVM - 27
SWAP server (WEB server) PC GVM Application (script) GVM (SWAP-module) GVM script Emulator (SWAP-API) System Layer (Operating System) Mobile Information Device Windows IBM PC - 28
SWAP module SVM, MIL, MIDD SVM (SWAP virtual machine) - 29
(I) SWAP - SDK (software development tool) Mobile C (SWAP-API) compiler VDI (variable depth image) editor sound editor GVM emulator download http://www.gvmclub.com http://www.sinjisoft.com SDK API reference PC - 30
(II) *.gif, *.bmp Buzzer, MA1 VDI editor Mobile C Source Audio editor *.sbm Mobile C compiler *.ssd Emulator debugger Script (*.sgs) - 31
(III) Image editor, Sound editor - 32
(IV), - 33
GVM Download server, Connection Server, Gateway Download Server application DB, Connection Server application PtoP, C/S application Gateway, - 34
Application Type Stand-alone download offline ( ) Phone-to-phone circuit data service(ppp) 1:1 Server IP network connection server On-line MUD - 35
( ) 4gray (48KB ) ~ color (128KB ) /, / - 36
Mobile C ANSI C Mobile C 2byte integer (floating point ) static (automatic, extern ) Event-driven Built-in library (linkage library ) recursion Dynamic memory allocation ( %{ %} ) - 37
Mobile C Mobile C :,, 1-2, (?), : ANSI C compliant : ANSI C compliant : cast, pointer ( %{ %} ) header info table : device specific information (e.g.lcd type) - 38
Mobile C Event Handler Event Handler Main (EVENT_START) : EVENT_END : (End key pressed) EVENT_TIMEOUT : timer expired (SetTimer() ) EVENT_KEYPRESS : key code EVENT_RESULT : network device connect/disconnect, SMS, ptpcall/ptprelease EVENT_RECEIVE : network data EVENT_RSEVENT : RS232C data - 39
Mobile C Library (I) System Library, H/W (LCD type, callerid, ) Graphic Library, drawing (point / line / circle / polygon), filling LCD buffer control String Library Handset control Library Sound play/stop,, back-light, SetTimer - 40
Mobile C Library (II) Math Library Random,, min/max, array (e.g. ) Network Library /, P-to-P call /release download, SMS Aux Library /, Advanced audio library User data access library - 41
(I) Download GameRun WML script Swap Script? Script WAP Script Download Script Script - 42
JAVA Mobile Java Overview MIDP SKVM - 43
Java 2 Java 2 java virtual machine Enterprise Server Desktop PC, Workstation CDC Set-top Box Screen Phone CLDC PDA Cell phone Smart card Java2 Enterprise edition (J2EE) Java2 Standard edition (J2SE) Java2 Micro edition (J2ME) Java Language HotSpot JVM KVM CardVM - 44
Configuration & Profile (I) Configuration device group VM Lib. CDC (connected device configuration) memory 512KB CLDC ( connected limited device configuration) KVM based 128 ~ 512KB, 16-32bit CPU,, Profile type device Lib. MIDP (Mobile Information Device Profile) SUN microsystem device - 45
Configuration & Profile (II) Java mobile application MIDP Application Program Native Application Program MIDP CLDC System Layer (Operating System) Mobile Information Device (Phone, PDA) - 46
CLDC Floating point Finalization. garbage collector error class file verifier (, ) - 47
MIDP AWT -> LCDUI, kawt Object Displayable Command Canvas Screen TextBox List Form Ticker Alert append Stringitem Item DateField ChoiceGroup TextField Gauge ImageItem - 48
MIDP key press event CommandListener event CommandListener event handler CommandAction method - 49
MIDP MISC.(I) RMS (Record Management System) Image file PNG format HTTP TCP/IP, WAP - 50
MIDP MISC.(II) Java Application Manager (JAM) MIDlet download, installation, unintallation Java Archive (JAR) application, (30-40% ) Java Application Descriptor (JAD) MIDlet -> JAR file -> JAR -> download - 51
/ pre-verification JAR file JAD / test - 52
SKVM SK telecom, XCE XVM - J2ME kvm compatible CLDC-MIDP WAP, WML preverification. MIDP Socket, datagram, HTTP MSM CPU based (60-70KB) - 53
JDK 1.3 http://java.sun.com/j2se/1.3/download-windows.html SKVM emulator http://developer.xce.co.kr/ binary, class, documents, examples, skin (editor) (javac) (emulator) - 54
(I) Download runxvm SKVM MSD? WAP (WML) JAR file Download Script (WMLS) Application - 55
(II) WML : Wab Browser Navigation WML Page WML Script : msd WML Script Fuction. MSD : Application manager MIDlet. JAR : Class File, jar package. : WML JAR : MSD JAR - 56
VM - - 57
New Tetris() <- Paused destroyapp() pauseapp() startapp() Destroyed Active destroyapp()
private Command exitcmd; private Command startcmd; private Form form; private Display display; private TetrisCanvas canvas; private Thread thread; // Command // // public Tetris() { exitcmd = new Command(" ", Command.SCREEN, 1); startcmd = new Command(" ", Command.SCREEN, 2); form = new Form(""); display = Display.getDisplay(this); canvas = new TetrisCanvas(); thread = new Thread(canvas); }
public void startapp() { form.append("\n\n\n "); form.addcommand(startcmd); form.setcommandlistener(this); canvas.addcommand(exitcmd); canvas.setcommandlistener(this); display.setcurrent(form); } public void commandaction(command c, Displayable s) { if (c == startcmd) { }} display.setcurrent(canvas); thread.start(); // } if (c == exitcmd) { canvas.init(); destroyapp(false); notifydestroyed(); // ( )
public TetrisCanvas() { // ( ) random = new Random(System.currentTimeMillis()); try { gameoverimg = Image.createImage("/gmov.png"); // scorepanelimg = Image.createImage("/score.png"); } catch(ioexception e) {} init(); } public void init(){ // ( ) block = new Block(((int) (Math.abs(random.nextInt()) % 7)) + 1); nextblock = new Block(((int) (Math.abs(random.nextInt()) % 7)) + 1); backboard = new BackBoard(); gamemode = GAMEONMODE; }
protected void keypressed(int keycode) { int action = getgameaction(keycode); keyhandler(action); } // protected void keyrepeated(int keycode) {} protected void keyhandler(int action) { switch(action) { // case RIGHT : if(gamemode!= GAMEONMODE) return; block.move(1, 0); if(!block.moveok(backboard)) block.move(-1, 0); else repaint(); break;
public void paint(graphics g) { g.setcolor(0, 0, 0); // ( ) g.fillrect(0, 0, getwidth(), getheight()); // g.setcolor(255, 255, 0); // g.drawline(62, 10, 62, 99); showscorepanel(g); // shownextpanel(g); // next backboard.drawbackboard(g); block.drawblock(g); if(gamemode == GAMEOVERMODE) { g.drawimage(gameoverimg, getwidth() / 2, getheight() / 2, g.hcenter g.vcenter); } } private void showscorepanel(graphics g) { // next g.drawimage(scorepanelimg, 65, 50, g.left g.top); int w, s = 0; for(int i = 4, j = 0; i >= 0; i--, j++) { w = (int)((gamescore - s) / power(10, i)); s += (w * power(10, i)); g.drawimage(scorenumimg[w], 68 + (5 * j), 60, g.left g.top); } }