220 likes | 388 Views
Middleware for mobile multiplayer online games. PELLERIN Romain. RIAM Project (1 year): JIMM (Bouygues Telecom, CNAM-Cedric, Pastagames) Research project: CNAM-Cedric, INT. Contents. Game middleware platform functionalities Game middleware for mobile market overview
E N D
Middleware for mobile multiplayer online games PELLERIN Romain RIAM Project (1 year): JIMM (Bouygues Telecom, CNAM-Cedric, Pastagames) Research project: CNAM-Cedric, INT
Contents • Game middleware platform functionalities • Game middleware for mobile market overview • Gaming Services Platform (GASP): • Objectives • Implementation • Conclusion and Perspectives
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…
Game middlewares for mobile market overview • Existing middlewares for mobile multiplayer games • Proprietary platforms:Terraplay MOVE, Exit Games, InFusio EGE, Pixel Technologie JIVE, KayaK 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
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
GAming Services Platform (GASP)Objectives • Implement OMA Gaming Services Specifications • Open source • Target • MIDP and Doja mobiles • Pseudo real-time games
GAming Services Platform (GASP)Implementation • Data model • Architecture • Events model • Event types • MooDS protocol
GASPData model Platform 1 Database Classes 0..* Application MasterApplicationInstance 1 0..1 1 1 1 0..* ApplicationInstance 0..* 1 0..* 0..* Actor 1 0..* Session 1 1 ActorSession 0..* 1 Rights User
extends com/calls association MasterApplicationInstance MasterApplicationInstance ApplicationInstance ApplicationInstance ApplicationInstance GAME SERVER MOBILE GASP Client GASP Server ActorSession Client Game Logic Server Game Logic GASP Architecture PLATFORM REPRESENTATION FirstLogin GASP Platform Login GASP DB Lobby DBManager Services Join Create IDManager InGame Name StartAI OTA EndAI QuitAI Quit GAMES REPRESENTATION COMMUNICATION MANAGEMENT
JOIN actorSID Username START END QUIT actorSID DATA actorSID Hashtable GASPEvents model • 5 event types • JoinEvent => A new player joins • StartEvent => Start of the game • EndEvent => End of the game • QuitEvent => A player quits • DataEvent => In-game data received from a player or the server game logic • 2 types of events listeners • ActorSessions (the players) • GASPServer (the server game logic)
ApplicationInstance • listenners:Vector • actorSessions:Vector • onJoinEvent(e) • raiseEventToListenners(e) • raiseEventToActorSessions(e) JOIN JOIN JOIN JOIN aSID4 aSID4 aSID4 aSID4 Pseudo Pseudo Pseudo Pseudo GAME SERVER GASP Server Server Game Logic GASPEvents Model: Example D PLATFORM REPRESENTATION MOBILE Join?sID JoinAI aSID onJoinEvent(e) A MOBILE getEvents() raiseEvent (e) raiseEvent(e) B createAS(sID) MOBILE getEvents() ActorSession D InGame ActorSession B raiseEvent(e) getEvents() raiseEvent(e) getEvents() ActorSession C C ActorSession A MOBILE SERVLET CONTAINER
<types> <type name=‘Update’> <element name=‘aSID’ type=‘short’/> <element name=‘x ‘ type=‘int’/> <element name=‘y’ type=‘int’/> <table name=‘t’ type=‘double’> <row/> … </table> </type> … </type> gamePackage.CustomTypes void encodeUpdate(DataOutputStream dos) Update decodeUpdate(DataInputStream dis) void encodeUpdate(Hashtable h, DataOutputStream dos) Hashtable decodeData(DataInputStream dis) GASPEvent model: MooDS • Mobile Optimized Objects Description & Serialization (MooDS) • Goal: Increase communication speed by reducing length of in-game data messages • Algorithm: Send the game objects by values (primitive types) MooDS Generator CustomTypes.java types.xml Class including Encoding/Decoding methods Objects description file
GASPEvents Model with MooDS PLATFORM REPRESENTATION GASP ApplicationInstance GAME SERVER • listenners:Vector • actorSessions:Vector MOBILE • server:MGPServer CustomTypes • types:CustomTypes getCustomTypes() raiseEvent(e) CustomTypes • raiseEventToListenners(e) GASP Server • getCustomTypes() encodedData onDataEvent(e) • sendDataTo(aSID,e) GASP Client InGame • onDataEvent(e) sendDataTo (aSID,e) encodedData Server Game Logic putEvent(e) Client Game Logic ActorSession D • events:Vector getEvents() • putEvent(e) SERVLET CONTAINER • getEvents()
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
Bibliography [1] R. Pellerin. GAming Services Platform, Plateforme pour les jeux multijoueurs sur mobiles. Research Master report (DEA). CNAM-Cedric/INT/Paris 6. September 2004 (http://bscw.enst-bretagne.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)
Application MasterApplicationInstance 1 0..1 1 1 ApplicationInstance 0..* 1 0..* 0..* Actor 1 0..* Session 1 1 ActorSession 0..* 0..* 1 User OMA Gaming Services Specifications
Role First connection Connect to the platform Get the game sessions list Join a game session Join a random game session Create a game session Create a private game session Change pseudoname Get the platform events Start the game Send data Stop the game Quit the game session Logout from platform GASPClient API org.mega.gasp.client.GASPClient • int firstLogin(int userID, int username, String pwd) • int login(int actorID, String username, String pwd) • Vector getApplicationInstances (int sessionID) • int joinAI (int sessionID, int appInstanceID) • int joinAIRnd (int sessionID) • int createAI (int sessionID, int min, int max) • int createAIPriv (int sessionID, int min, int max, Vector actors) • String name(int actorSessionID, String pseudo) • void getEvents(int actorSessionID) • void startAI(int actorSessionID) • void sendData(int actorSessionID, Hashtable data) • void endAI(int actorSessionID) • void quitAI(int actorSessionID) • void quit (int sessionID)
org.mega.gasp.server.GASPServer Role • void onJoinEvent(JoinEvent je) JoinEvent listenner • void onQuitEvent(QuitEvent qe) QuitEvent listenner • void onStartEvent(StartEvent se) StartEvent listenner • void onEndEvent(EndEvent ee) EndEvent listenner • void sendDataTo (int actorSessionID, DataEvent de) Send data to a specific player • void onDataEvent(DataEvent de) DataEvent listenner GASPServer API
Hashtable Hashtable Update Update « Upd1 » « Upd1 » aSID:short posX:int posY:int time:long aSID:short posX:int posY:int Time:long Update Update CustomTypes CustomTypes Update decodeUpdate(dis) encodeUpdate(dos,update) UPType aSID posX posY time void encodeData(dos,hashtable) Hashtable decodeData(dis) GASPEvents Model: MooDS protocol – Example Message sender MooDS Bits Stream Message Receiver
FirstLogin Login Lobby Join Create InGame MasterApplicationInstance Name MasterApplicationInstance ApplicationInstance ApplicationInstance ApplicationInstance StartAI Game Server Game Server EndAI QuitAI ActorSession Quit SERVLET CONTAINER GASPPlatform Distribution in the context of a Multi-Game Server PLATFORM REPRESENTATION Platform GASP DB DBManager Services IDManager MOBILE OTA JavaRMI Game Server JavaRMI Game Server GAMES REPRESENTATION
MOBILE MOBILE MOBILE startAI startAI InGame InGame MasterApplicationInstance MasterApplicationInstance ApplicationInstance ApplicationInstance ApplicationInstance ApplicationInstance SUB -PLATFORM ApplicationInstance ApplicationInstance EndAI EndAI Name Name Game Server QuitAI QuitAI Game Server Game Server Game Server Game Server ActorSession ActorSession Game Server Game Server SUB -PLATFORM GASPPlatform Distribution in the context of a Multi-SubPlatform PLATFORM REPRESENTATION FirstLogin Platform Login Lobby DBManager Services Join IDManager Create Java RMI OTA Java RMI Java RMI