OnME Platform Tutorial Ken Hui System Analyst OnME Research Laboratory.

42
OnME Platform Tutorial Ken Hui System Analyst OnME Research Laboratory
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    216
  • download

    0

Transcript of OnME Platform Tutorial Ken Hui System Analyst OnME Research Laboratory.

OnME Platform Tutorial

Ken HuiSystem Analyst

OnME Research Laboratory

ContentPart 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

Part 1: Overview of OnME Platform

System Architecture

1. User2. Player3. Monster4. Item5. Battle

1. Map2. Event3. NPCs

1. GUI Elements2. Server Communication

Game ServerDatabase Client

Game Server Interaction

Map Event

Player

Game World

Logic Flow

Game World Time Line

server

User 1 User 2

Communication Unit – “Control”

How is the “Game World” affected by clients??

Engine Components

Component 1: Database

Schema (Please refer to OnMEPlatform-UsageGuide.doc 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

Component 2: Editor

1. User Friendly2. Easy to learn3. WYSIWYG

Component 3: Servers

It is Centralized and DistributedProvides clustering and zone-subdivision techniques for massive player load balancingAllow asynchronous game state synchronization for client to optimize the network delay limitationEnable flexible modification for different type of mobile application

Component 4: Client Library

Library Documentation http://onme.cse.cuhk.edu.hk/sampleClientDoc/index.html

Simple Client has packaged in Object and Source Code licenseBase on Finite State Machine

By Class named “Logic”

Apply MVC model

View

MODEL

ControllerSelect view

User event

Change modification

queries

Mod

el u

pdat

esCommon.LogicCommon.View

Player, BagItem, etc…

Client Library

Implement your own game by inserting statesJust “fill-in” your own game’s logic

INIT

GAME

MENU

WAIT

Use

r in

pu

t

Even

t Read

y

Part 2: Usage of OnME Platform

Getting Started

Set up your OnME server

What’ve you got? onmeworld (world server) onmebattle (battle server)

Place the files in the following link c:/Program Files/Tomcat4/webapp/

Start up your OnME server

Open the command prompt Start->run->cmd

Type the command cd “Program Files”/tomcat4/bin catalina.bat run

Prepare your OnME client

Open the Emulator Start->

All Progams -> J2ME Wireless Toolkit 2.2->KToolbar

Open the OnME client project

Press Open Project -> OnMEGame

Build your OnME client

Press build and then run

Run your OnME Client

Run the client in theWTK2.2 EmulatorRegister a new accountChoose the server: Local Server (localhost)

Please Try and Enjoy!!

Introduction to OnME Editor

OnME Editor

Game Map Editing Make your game more attractive

Game Event Editing Make your game more meaning and

playable

Palette

Basic component of a Game MapPalette is a png file that is composed of basic grids of the mapEach grid is of size 16 x 16 pixelsExample: a palette with 20 grids

Game MapA Game Map is a composition of palettes, like a puzzlee.g.

Edit Game Map

Try the OnME Editor

Open the OnME EditorOpen the resource folderC:\Program File\tomcat4\webapps\onmeworld\map\map_72

How 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

Restart your server

Stop the tomcat server by pressing ctrl-c in the command promptType in catalina.bat run to start the server again

Then you can see the changes you’ve just made!!!

Game 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

Control

Control is the unit of eventEach event is composed of one or more controls

Types 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 player’s mission

variable) Unconditional Jump SetMission AttributeJump (for checking player’s attributes) ItemQuantityJump (for checking player’s item quantity) Jump (for moving the player to another map)

Edit Game Event

Game Event Example

Open an event file C:\Program File\tomcat4\

webapps\onmeworld\map\map_72\event_72_01.evt

Components of Event Editor

Map 72 is shown here

Dialog sentences

NPC information

Event controls

Run the event script

The interface for modifying event

NPC (drag and drop, editing name)Sentence (editing dialog)Testing the event by altering player’s information

Try to make a simple event

Try to change the dialog first, make a new event if you wantRemember to save the eventReload the server Open an IE browser and type in

http://localhost/onmeworld/HttpConnector?gamereload

Use Case Studies

Use Case 1:Create 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

Use Case 2:Create 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-> 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

Use Case 3:Create a simple mission

Step 1 Design the NPC’s 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

Question & Answer