Title: OnME Platform Tutorial
1OnME Platform Tutorial
Ken HuiSystem AnalystOnME Research Laboratory
2Content
- Part 1 Overview of OnME Platform
- System Architecture
- Logic Flow
- Engine Components
- Database
- Editor
- Server
- Client library
- Part 2 Usage of OnME Platform
- Getting Started
- Introduction to OnME Editor
- Case Studies
3Part 1 Overview of OnME Platform
4System Architecture
Game Server
Database
Client
- User
- Player
- Monster
- Item
- Battle
- Map
- Event
- NPCs
- GUI Elements
- Server Communication
5Game Server Interaction
Map
Event
Game World
Player
6Logic Flow
How is the Game World affected by clients??
Game World Time Line
server
User 2
User 1
Communication Unit Control
7Engine Components
8Component 1 Database
- Schema (Please refer to OnMEPlatform-UsageGuide.d
oc section 5) - User
- ID, username, password, etc
- Player
- ID, HP, Attack, Defense, etc
- Item
- ID, name, usage, etc..
- Battle
- ID, monsterIDs
- Monster
- ID, Characteristic, etc
- Fully tested for MySQL DB.
- Reasons for MySQL,
- Widely supported by community, such as phpMyAdmin
UI configuration tool - Free for academic research
9Component 2 Editor
- User Friendly
- Easy to learn
- WYSIWYG
10Component 3 Servers
- It is Centralized and Distributed
- Provides clustering and zone-subdivision
techniques for massive player load balancing - Allow asynchronous game state synchronization for
client to optimize the network delay limitation - Enable flexible modification for different type
of mobile application
11Component 4 Client Library
- Library Documentation
- http//onme.cse.cuhk.edu.hk/sampleClientDoc/index.
html - Simple Client has packaged in Object and Source
Code license - Base on Finite State Machine
- By Class named Logic
- Apply MVC model
User event
View
Controller
Common.Logic
Common.View
Select view
Change modification
queries
Model updates
MODEL
Player, BagItem, etc
12Client Library
INIT
- Implement your own game by inserting states
- Just fill-in your own games logic
GAME
User input
MENU
Event Ready
WAIT
13Part 2 Usage of OnME Platform
14Getting Started
15Set up your OnME server
- Whatve you got?
- onmeworld (world server)
- onmebattle (battle server)
- Place the files in the following link
- c/Program Files/Tomcat4/webapp/
16Start up your OnME server
- Open the command prompt
- Start-gtrun-gtcmd
- Type the command
- cd Program Files/tomcat4/bin
- catalina.bat run
17Prepare your OnME client
- Open the Emulator
- Start-gt
- All Progams -gt
- J2ME Wireless Toolkit 2.2-gt
- KToolbar
18Open the OnME client project
- Press Open Project -gt OnMEGame
19Build your OnME client
20Run your OnME Client
- Run the client in theWTK2.2 Emulator
- Register a new account
- Choose the server
- Local Server (localhost)
- Please Try and Enjoy!!
21Introduction to OnME Editor
22OnME Editor
- Game Map Editing
- Make your game more attractive
- Game Event Editing
- Make your game more meaning and playable
23Palette
- Basic component of a Game Map
- Palette is a png file that is composed of basic
grids of the map - Each grid is of size 16 x 16 pixels
- Example a palette with 20 grids
24Game Map
- A Game Map is a composition of palettes, like a
puzzlee.g.
25Edit Game Map
26Try the OnME Editor
- Open the OnME Editor
- Open the resource folder
- C\Program File\
- tomcat4\
- webapps\
- onmeworld\
- map\map_72
27How to Edit?
- Choose the grid of palette
- Right click on the map to paste fill the grid
- Select a rectangle for filling
- Right click for filling the whole rectangle
- Copy and paste are enabled
- Use Ctrl-c and Ctrl-v
- Remember to save your map
28Restart your server
- Stop the tomcat server by pressing ctrl-c in the
command prompt - Type in catalina.bat run to start the server
again - Then you can see the changes youve just made!!!
29Game Event
- Missions, Interactions, Transactions, etc..
- Three components
- Event Trigger
- Event DB (sentences)
- Event Content
- Naming Conversion
- event_xx_yy.evt
- where xx is the ID of the map
- yy is the ID of the event
- You can see some example in the resources folder
C\Program File\tomcat4\webapps\ - onmeworld\map\map_72\event_72_yy.evt
30Control
- Control is the unit of event
- Each event is composed of one or more controls
31Types of control
- There are 12 controls available
- Dialog
- Multiple Choice (store the user choice using
temporary variable) - To Battle
- Alter (combination of Increment and Decrement)
- Exchange (for exchanging items only)
- Multiple Choice Jump (for making choices with
temporary variable) - Conditional Jump (for checking players mission
variable) - Unconditional Jump
- SetMission
- AttributeJump (for checking players attributes)
- ItemQuantityJump (for checking players item
quantity) - Jump (for moving the player to another map)
32Edit Game Event
33Game Event Example
- Open an event file
- C\Program File\tomcat4\
- webapps\onmeworld\
- map\map_72\
- event_72_01.evt
34Components of Event Editor
35Run the event script
36The interface for modifying event
- NPC (drag and drop, editing name)
- Sentence (editing dialog)
- Testing the event by altering players information
37Try to make a simple event
- Try to change the dialog first, make a new event
if you want - Remember to save the event
- Reload the server
- Open an IE browser and type in
- http//localhost/onmeworld/HttpConnector?gamereloa
d
38Use Case Studies
39Use Case 1Create a new NPC to sell a new Item
Step 1 Create a new item entry in database design.Item table
Step 2 Create a new NPC in a map
Step 3 Create a new event sentence DB
Step 4 Create a new event script, selling, for the new NPC
Step 5 Create the trigger (linkage) for this NPC to the new event script
40Use Case 2Create new battle map
Step 1 Use DB tools to add new monsters in the database design.Monster table Optional
Step 2 Use DB tools to add new battle in the database design.Battle table
Step 3 Select File-gt New Resources Directory, and then create a new map
Step 4 Modify the PNGs your new resources directory by Photoshop or Paint
Step 5 Edit palette configuration files, map_XX_base_prob.conf and map_XX_ext_prob.conf
Step 6 Reload the map
Step 7 Modify the maps, including world map and battle map.
Step 8 Copy the new map directory to current servers location
Step 9 Restart tomcat server
41Use Case 3Create a simple mission
Step 1 Design the NPCs locations and Select one of the mission bits in the map of NPC Mary located. (e.g. bit 10, 1024)
Step 2 Use DB tools to add new Item, Stephen Letter, to design.Item table
Step 3 Add two NPCs in the map
Step 4 Build the event for Stephen
Step 5 Build the event for Mary
Step 6 Assign the suitable trigger linkage for NPCs and events
Step 7 Copy the new map directory to current servers location according to following conversion
Step 8 Restart tomcat server
42Question Answer