Middleware for mobile multiplayer online games PELLERIN Romain
Middleware for mobile multiplayer online games PELLERIN Romain RIAM Project (1 year): JIMM (Bouygues Telecom, CNAM-Cedric, Pastagames) Research project: CNAM-Cedric, INT ETSI-Object. Web Mobile Middleware Workshop 1
Contents 1. Game middleware platform functionalities 2. Game middleware for mobile market overview 3. Gaming Services Platform (GASP): § § Objectives Implementation 4. Conclusion and Perspectives ETSI-Object. Web Mobile Middleware Workshop 2
Game middleware functionalities • Dedicated to multiplayer games • Game services for § Players: accounts management, lobby room handling, buddy management, high scores handling § Editors: game publishing (includes updates), players management, competition management § System administrator: monitoring, logging, load sharing • System services • Security, data exchange optimisation, load balancing, fault tolerance, persistency, monitoring, logging, data mining… ETSI-Object. Web Mobile Middleware Workshop 3
Game middlewares for mobile market overview • Existing middlewares for mobile multiplayer games Ø Proprietary platforms: Terraplay MOVE, Exit Games, In. Fusio EGE, Pixel Technologie JIVE, Kaya. K Interactive LIVE, Cash -U PECAN GAMING Ø No open source platforms for mobile (Massiv and Nel are for desktop environnements) • Status of commercial platforms Ø Proprietary platforms have specific architecture and concepts. Ø => incompatibility of interfaces • Games portability issues • No interoperability between platforms Ø => Normalization ETSI-Object. Web Mobile Middleware Workshop 4
Market overview (2) Normalization activity: Open Mobile Alliance (OMA) • Normalization started in 1999 in Mobile Gaming Interopérability Forum (MGIF) • MIGF integrated into OMA in 2002 • OMA ØFounded in 2002 by a set of ~200 companies (IBM, Intel, France Telecom, Motorola, Ericsson, Siemens…) ØGoal: standardize all technologies concerning mobile ØOne of the working group = Gaming Services which improves MGIF specifications ETSI-Object. Web Mobile Middleware Workshop 5
GAming Services Platform (GASP) Objectives • Implement OMA Gaming Services Specifications • Open source • Target – MIDP and Doja mobiles – Pseudo real-time games ETSI-Object. Web Mobile Middleware Workshop 6
GAming Services Platform (GASP) Implementation • Data model • Architecture • Events model ØEvent types ØMoo. DS protocol ETSI-Object. Web Mobile Middleware Workshop 7
GASP Data model Platform 1 Database Classes 0. . * Application 1 1 0. . 1 Master. Application. Instance 1 1 0. . * Application. Instance 0. . * 1 0. . * Actor 0. . * 1 0. . * Session 1 1 Actor. Session 0. . * 1 Rights User ETSI-Object. Web Mobile Middleware Workshop 8
GASP Architecture First. Login PLATFORM REPRESENTATION Platform Login Lobby DBManager extends Join com/calls Services Create association GASP DB IDManager In. Game Name MOBILE GASP Client GAME Start. AI OTA SERVER End. AI Quit. AI Client Game Logic Master. Application. Instance GASP Server Actor. Session Server Game Logic Quit COMMUNICATION MANAGEMENT ETSI-Object. Web Mobile Middleware Workshop GAMES REPRESENTATION 9
GASP Events model • 5 event types Ø Join. Event => A new player joins Ø Start. Event => Start of the game Ø End. Event => End of the game Ø Quit. Event => A player quits Ø Data. Event => In-game data received from JOIN actor. SID Username START END QUIT actor. SID DATA actor. SID Hashtable a player or the server game logic • 2 types of events listeners Ø Actor. Sessions (the players) Ø GASPServer (the server game logic) ETSI-Object. Web Mobile Middleware Workshop 10
GASP Events Model: Example PLATFORM REPRESENTATION MOBILE D Join? s. ID Join. AI a. SID Application. Instance on. Join. Event(e) MOBILE A GAME • listenners: Vector • actor. Sessions: Vector get. Events() SERVER • on. Join. Event(e) • raise. Event. To. Listenners(e) • raise. Event. To. Actor. Sessions(e) raise. Event (e) JOIN a. SID 4 Pseudo JOIN MOBILE B create. AS(s. ID) get. Events() In. Game JOIN a. SID 4 Pseudo get. Events() raise. Event(e) Actor. Session B Server Game Logic Actor. Session C raise. Event(e) Actor. Session A MOBILE JOIN a. SID 4 Pseudo raise. Event(e) get. Events() C Actor. Session D a. SID 4 GASP Server SERVLET CONTAINER ETSI-Object. Web Mobile Middleware Workshop 11
GASP Event model: Moo. DS • Mobile Optimized Objects Description & Serialization (Moo. DS) – Goal: Increase communication speed by reducing length of in-game data messages – Algorithm: Send the game objects by values (primitive types) <types> <type name=‘Update’> game. Package. Custom. Types <element name=‘a. SID’ type=‘short’/> <element name=‘x ‘ type=‘int’/> void encode. Update(Data. Output. Stream dos) <element name=‘y’ type=‘int’/> Moo. DS <table name=‘t’ type=‘double’> Generator <row/> … </table> </type> Update decode. Update(Data. Input. Stream dis) void encode. Update(Hashtable h, Data. Output. Stream dos) Hashtable decode. Data(Data. Input. Stream dis) … </type> types. xml Custom. Types. java Objects description file Class including Encoding/Decoding methods ETSI-Object. Web Mobile Middleware Workshop 12
GASP Events Model with Moo. DS PLATFORM REPRESENTATION Application. Instance • listenners: Vector • actor. Sessions: Vector • server: MGPServer • types: Custom. Types MOBILE get. Custom. Types() Custom. Types GASP Client encoded. Data In. Game on. Data. Event(e) SERVER Custom. Types raise. Event(e) • raise. Event. To. Listenners(e) • get. Custom. Types() • send. Data. To(a. SID, e) • on. Data. Event(e) encoded. Data put. Event(e) Client Game Logic GAME Actor. Session D GASP Server send. Data. To (a. SID, e) Server Game Logic • events: Vector get. Events() SERVLET • put. Event(e) • get. Events() CONTAINER ETSI-Object. Web Mobile Middleware Workshop 13
Conclusion & Perspectives • GASP is an open source Java platform for mobile mutiplayer online games • Status – Development according to a spiral model – First release = Prototype – On-going: Network load and machine load tests • Perspectives – Open source publication – Implementation optimizations regarding tests results – New functionalities: • Improved players communities management • Competition management, reflection on a generic competition framework • Multiple game execution model (automatic, proprietary…), reflection on a generic game execution framework ETSI-Object. Web Mobile Middleware Workshop 14
Bibliography [1] multijoueurs sur mobiles. Research Master report (DEA). CNAMCedric/INT/Paris 6. September 2004 (http: //bscw. enstbretagne. fr/pub/bscw. cgi/0/2731016) [2] R. Pellerin. Mobile Gaming Services, Services pour les jeux multijoueurs sur mobiles. Bibliography report. CNAM-Cedric/INT/Paris 6. June 2004 (http: //bscw. enst-bretagne. fr/pub/bscw. cgi/0/2731016) ETSI-Object. Web Mobile Middleware Workshop 15
OMA Gaming Services Specifications Application 1 1 0. . 1 Master. Application. Instance 1 Application. Instance 0. . * 1 0. . * Actor 0. . * 1 0. . * Session 1 1 Actor. Session 0. . * 1 User ETSI-Object. Web Mobile Middleware Workshop 16
GASP Client API org. mega. gasp. client. GASPClient Role • int first. Login(int user. ID, int username, String pwd) First connection • int login(int actor. ID, String username, String pwd) Connect to the platform • Vector get. Application. Instances (int session. ID) Get the game sessions list • int join. AI (int session. ID, int app. Instance. ID) Join a game session • int join. AIRnd (int session. ID) Join a random game session • int create. AI (int session. ID, int min, int max) Create a game session • int create. AIPriv (int session. ID, int min, int max, Vector actors) Create a private game session • String name(int actor. Session. ID, String pseudo) Change pseudoname • void get. Events(int actor. Session. ID) Get the platform events • void start. AI(int actor. Session. ID) • void send. Data(int actor. Session. ID, Hashtable data) • void end. AI(int actor. Session. ID) • void quit (int session. ID) ETSI-Object. Web Mobile Middleware Workshop Start the game Send data Stop the game Quit the game session Logout from platform 17
GASP Server API org. mega. gasp. server. GASPServer Role • void on. Join. Event(Join. Event je) Join. Event listenner • void on. Quit. Event(Quit. Event qe) Quit. Event listenner • void on. Start. Event(Start. Event se) Start. Event listenner • void on. End. Event(End. Event ee) End. Event listenner • void send. Data. To (int actor. Session. ID, Data. Event de) Send data to a specific player • void on. Data. Event(Data. Event de) Data. Event listenner ETSI-Object. Web Mobile Middleware Workshop 18
GASP Events Model: Moo. DS protocol – Example Update a. SID: short pos. X: int pos. Y: int time: long Time: long Hashtable « Upd 1 » Update Custom. Types encode. Update(dos, update) Update decode. Update(dis) void encode. Data(dos, hashtable) UPType a. SID Message sender ETSI-Object. Web Mobile Middleware Workshop pos. X pos. Y Moo. DS Bits Stream time Hashtable decode. Data(dis) Message Receiver 19
GASP Platform Distribution in the context of a Multi-Game Server PLATFORM REPRESENTATION First. Login Platform Login Lobby Join Services Create IDManager MOBILE OTA In. Game GASP DB DBManager Java. RMI Name Start. AI Master. Application. Instance Game Server End. AI Quit. AI Application. Instance Java. RMI Quit Game Server SERVLET CONTAINER ETSI-Object. Web Mobile Middleware Workshop Actor. Session GAMES REPRESENTATION Game Server 20
GASP Platform Distribution in the context of a Multi-Sub. Platform First. Login PLATFORM REPRESENTATION MOBILE Platform Login Lobby DBManager Join Services Game Server IDManager Create MOBILE OTA start. AI In. Game End. AI Name Quit. AI SUB -PLATFORM Java RMI Master. Application. Instance Game Server Java RMI Game Server Actor. Session MOBILE In. Game End. AI Name Quit. AI ETSI-Object. Web Mobile Middleware Workshop SUB PLATFORM start. AI Game Server Master. Application. Instance Actor. Session Java RMI Game Server 21
- Slides: 21