J2ME Workshop - OnME

OnME Platform Tutorial
Ken Hui
System Analyst
OnME Research Laboratory
Content
Part 1: Overview of OnME Platform




Engine
Engine
Engine
Engine
Architecture
Logic Flow
System Overview
Component View
Engine Architecture
Database
1.
2.
3.
4.
5.
User
Player
Monster
Item
Battle
Game Server
Client
1. Map
2. Event
3. NPCs
1. GUI Elements
2. Server Communication
Game Server Interaction
Map
Game World
Player
Event
Engine Logic Flow
How is the “Game World” affected by clients??
Game World Time Line
server
User 1
User 2
Communication Unit – “Control”
Control
Main Communication Elements
Update the game world status
Forward to all other clients for action
announcement
e.g.

Move, Teleport, Declare as Leader, Join a
Group, Exchange, etc…
Please refer to technical specification
STANDARD LANGUAGE FOR SERVER AND CLIENTS
Linkage Between DB and Server
Database Manager (DBM)






User Manager
Player Manager
Item Manager
Monster Manager
Battle Manager
etc…
Database
DBM
Game Objects
DBM => Convert the data in DB to
Game Objects
Linkage Between Server and Client
The Protocol is a collection of HTTP doGet
Requests with format [?a=1&b=2]
The HTTP doGet Requests are:
1)
2)
3)
4)
5)
6)
7)
8)
Control Transmission Request
Full Update Request
Event Download Request
Player and NPC Retrieval Request
Battle and Monster Pre-fetch Request
server
Player Status Update Request
Transaction System Request
Chat Message Upload/Download Request
HTTP protocol
client
Details are written in our technical specification
Engine System Overview
Game server has 10 systems:
1
Login System
for registered player to enter the game
2
Logout System
for player to exit the game
3
Register System
for user to register a new player
4
Teleport System (Full Update System)
for client to retrieve a new Game Map
5
Movement System (Synchronization
System)
for clients to synchronize their movement
with server’s support
6
Grouping System
for clients to group together
7
Event System
for client to retrieve game events, e.g. NPC
dialogs
8
Emotion System
for clients to exchange the emotion icons
9
Chat Message System
for clients to communicate using message
(Strings)
10
Trading System
for clients to exchange the Game Items
Engine System Components
View
Control
Model
1
1
1
HttpConnector
Handler
1
1
1
+doGet()
+receive()
1
1
OnMEUtil
1
-collector
Collector
*
ByteConverter
*
+fullUpdateToBytes()
+eventResponseToBytes()
+softSynToBytes()
+newPlayersToBytes()
+newEventToBytes()
+extendMapToBytes()
+fightEventToBytes()
+loadPlayerProfile()
+playerLogin()
+playerLogout()
+playerRegister()
1111
OnMEControlStore
1
Coordinator
-coordinator
OnMEMapStruct
1
*
OnMEDB
*
OnMEPlayerStruct
*
FightServerConnector
1
OnMEEquip
*
control
World server class diagram
Game World Server Logic Flow
VIEW
CONTROL
HttpConnector.doGet()
Client Interface
Handler.receive
Handler.doXXX()
MODEL
HttpConnector.send()
1
HttpConnector
1
1
+Update
1
RequestHandler
1
*
1
*
ConnectionManager
*
*
Battle
BattleCleaner
+Retreive
0..*
1
1
1
Strategy
ActionHandler
*
1
Animation
1
*
1
1
Collector
1
1...8
Item
*
*
Character
Skill
*
Player
*
Monster
Battle server class diagram
Game Battle Server Logic Flow
ActionHandler.run
HttpConnector.doGet()
RequestHandler
Planning Stage
Processing Stage
Result Ready Stage
Client Library
Library Documentation

http://onme.cse.cuhk.edu.hk/sampleClientDoc/index.html
Base on Finite State Machine

By Class named “Logic”
Apply MVC model
User event
Common.View
View
Select view
Controller
Common.Logic
MODEL
Player, BagItem, etc…
Client Library
User input
GAME
MENU
WAIT
Event Ready
Implement your
own game by
inserting states
Just “fill-in” your
own game’s logic
INIT
End of tutorial
Thank You Very Much