1 / 21

AMUSE: Multi-User Gaming Platform Overview

Learn about AMUSE, a platform for developing multiplayer online games. Discover its features, API guide, limitations, and future developments. Join the community to contribute!

pcuevas
Download Presentation

AMUSE: Multi-User Gaming Platform Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AMUSE Agent-based Multi User Social Environment

  2. Agenda • Overview • Main features • Developing amuse-based applications • API Overview • Quick startup guide • Current limitations and future works

  3. AMUSE • A software platform that facilitates the development of distributed multi-user applications where users compete/cooperate to achieve private or common goals. • The primary focus is on multi-player on-line games • Based on JADE and on its extension WADE • Communication and discovery • Administration mechanisms of the server-side components • Open source since the 5th of December 2013 • 0.9-alpha version • Experimental version • http://jade.tilab.com/amuse • In this first version supports Android clients only • There is a lot to do  Whoever is interested in contributing to the Community is very welcome

  4. Application1 client Application1 client ApplicationM servercomponents Application1 servercomponents JadeAndroid Amuse client lib JadeAndroid Amuse client lib Architecture Android Play Store User-1 - Register - Install - Configure - Start User-2 Appl Admin Interface Application developer ... Development environment Amuse server components PaaS approach Wade Distributed Runtime DB • Application types • Server-based • Client-only host-1 host-N host-D

  5. Core Features • User Management • Registration/authentication of application users • Basic user profile management • Text Message exchange • With automatic store-and-forward support • Peer-to-peer Pipe Management • Establishment of a direct connection between two clients • Transfer of application specific information over that connection • Raw clock synchronization • Support for performing actions at the same time

  6. B PROPOSE Gaming Features REFUSE PROPOSE A C • Peer-to-Peer Match Coordination • 1-to-1 matches • Match organization based on the Invitationmetaphor • Match info are kept locally and asynchronously persisted on server • Supports Client-only applications • Centralized Match Coordination • N-players matches • Support for players joining and leaving an ongoing match • Match organization based on the Tablemetaphor • Require Server-based applicatins ACCEPT INFORM (B, C) REQUEST (GetRandomUsers) UpdateMatch UpdateMatch AMUSE Server

  7. B Gaming Features A C • Peer-to-Peer Match Coordination • 1-to-1 matches • Match organization based on the Invitationmetaphor • Match info are kept locally and asynchronously persisted on server • Supports Client-only applications • Centralized Match Coordination • N-players matches • Support for players joining and leaving an ongoing match • Match organization based on the Tablemetaphor • Require Server-based applicatins REQUEST (CreateTable) AMUSE Server REQUEST (JoinTable) INFORM (MatchStarting) INFORM (MatchStarting) INFORM (MatchStarting) REQUEST (JoinTable)

  8. B Gaming Features A C • Peer-to-Peer Match Coordination • 1-to-1 matches • Match organization based on the Invitationmetaphor • Match info are kept locally and asynchronously persisted on server • Supports Client-only applications • Centralized Match Coordination • N-players matches • Support for players joining and leaving an ongoing match • Match organization based on the Tablemetaphor • Require Server-based applicatins AMUSE Server REQUEST (Move) INFORM (Result) INFORM (PlayerMoved) INFORM (PlayerMoved)

  9. AMUSE Client API • com.amuse.client package • Entry point: com.amuse.client.android.AmuseClient • Connection with the AMUSE server platform (method connect()) • User authentication (method setLoginManager()) • Server clock synchronization (method serverCurrentTimeMillis()) • Access to features (method getFeature()) • Features • Core (com.amuse.client.features.core) • UserManagementFeature • TextMessageFeature • PipeManagementFeature • Gaming (com.amuse.client.features.gaming) • MatchCoordinationFeature (peer-to-peer match coordination) • GamesRoomFeature (centralized match coordination)

  10. AMUSE Server API • Only needed for server-based applications • Required to implement the server-side logics of a game managed by means of the centralized coordination approach (GamesRoomFeature) • Entry point: com.amuse.agents.gra.GamesRoomAgent • A JADE Agent that must be extended to redefine a set of callback methods that are invoked • When clients create tables (handleTableCreated()) • When a sufficient number of player joined a table and the match can start (handleMatchStartup()) • When players Join/Leave a table with an ongoing match (handlePlayerJoined(), handlePlayerLeft()) • When a player moves (handleMove()) • When activating the server side logics several GRA agents can be started each one implementing a Games Room that contains many Tables.

  11. Startup guide: Amuse server platform - Installation • Download required packages • Amuse platform • WADE 3.3 + PersistenceAdd-on • Install (unzip) WADE and Amuse ... |--wadeSuite/ |--wade/ |--add-ons/ |--... |--amuse/ |--platform/ |--cfg/ (all amuse configurations) |--lib/ (amuse libraries) |--log/ (amuse logs will be produced here) |--src/ (amuse sources) |--tools/ (amuse administration tools) |--...

  12. Startup guide: Amuse server platform – DB Configuration • Configure and start the Amuse DB • H2 (full Java Open Source DB), but other DBs should work as well • Start the H2 DB server • wadeSuite/wade/add-ons/persistence/lib • java -jar h2-1.2.123.jar • Configure Amuse to use H2 • Create a suitable directory to hold DB files (e.g. amuse/H2) • amuse/platform/cfg/hibernate.cfg.xml • Create the Amuse schema • amuse/platform/tools • ant create-db • Require ANT 1.7.0

  13. Startup guide: Amuse server platform - Activation • Configure the single-application-mode • amuse/platform/cfg/types.xml <properties> <Property name="singleApplicationName" value="Test"/> <Property name="singleApplicationType" value="CLIENT_ONLY"/> ... • Tell WADE where to find amuse wadeSuite/wade/projects/ |--default.properties |--amuse.properties amuse/platform • Activate the WADE Bootdaemon and the Amuse Main Container • wadeSuite/wade/bin/ • startBootdaemon • startMain amuse project-home=

  14. Startup guide: Client part • The client part of an amuse-based application is an Android App • Create an Android project in Eclipse • Download the Amuse Android Client and unzip it locally • Create a lib/ directory in your Android project, copy the libraries • JadeAndroid.jar • amuseCommons.jar • amuseAndroidClient.jar from amuse/android-client/lib/ directory to the lib/ directory in your project • Add the above libraries to your project build path

  15. Startup guide: Android manifest hints • Amuse based clients interact with the Amuse platform and with other clients • Give the Android App the INTERNET permission <manifest xmlns:android="http://schemas.android.com/apk/res/android" ... > ... <uses-permission android:name="android.permission.INTERNET" /> ... • All communications are carried out by JADE • Declare the Jade MicroRuntime service <application android:name="MyApplication" ....> <service android:name="jade.android.MicroRuntimeService" /> ...

  16. Startup guide: Platform connection code snippet (1/2) By default 2099 Properties pp = new Properties(); String ip = getResources().getString(R.string.amuse_host); pp.setProperty(MicroRuntime.HOST_KEY, ip); String port = getResources().getString(R.string.amuse_port); pp.setProperty(MicroRuntime.PORT_KEY, port); amuseClient = newAmuseClient(getResources().getString(R.string.app_name), getApplicationContext()); amuseClient.setConnectionProperties(pp); amuseClient.setLoginManager(newLoginManager() { @Override publicvoidaskLoginInformation(Callback<LoginInfo> callback) { // This is the first time the user logs in with this terminal --> Show // a form to let him type in his username and password. // When done, invoke the callback onSuccess() method passing login // information in the LoginInfo object ... } });

  17. Startup guide: Platform connection code snippet (2/2) amuseClient.connect(new Callback<Void>() { @Override publicvoidonSuccess(Void arg0) { // Connection to the Amuse platform OK // From now on it is possible to access and use features ... } @Override publicvoidonFailure(Throwablethr) { if (thrinstanceofLoginError) { // Wrong username/password or, for new accounts, username already // in use or not valid. Show a suitable message to the user ... } else { // Connection error. Show a suitable message to the user ... } } });

  18. Startup guide: Server part (1/2) • The server part of an amuse-based application is a WADE application • Create an Eclipse Project for a WADE application following the instruction in the WADE Development Tutorial • Copy the amuse.jar e amuseCommons.jar libraries to the lib/ directory of the created project and add them to the project build path • Develop a class that extends GameRoomAgent • Create the applications.xml file in the cfg/ directory of the created project <Application> <agents> <Agent name="room1" className="myPackage.MyGRAExtensionClass"/> </agents> </Application>

  19. Startup guide: Server part (2/2) • Use that Run Configuration to run and debug the server-side logics of your application • Create a Run Configuration with • Main class: com.amuse.StartApp • Program arguments: <application-name>

  20. Current limitations and future works • Amuse Platform • Uncompleted Application sand-box • Missing Graphical Application Management interface • Amuse client • Ready-made activities to manage common views (login, list of friends ...) • Services to manage asynchronous events when the application is not in foreground • Support for other technologies • Additional functionality • Achievements support • Integration with main Social Networks • Support to define virtual players • Development support • Examples • Eclipse Plug-in to facilitate the development of server-side logics

  21. Thanks for the attention • Amuse web site – http://jade.tilab.com/amuse • Distribution package download • SVN access • Amuse Startup Guide • Support – jade-develop@avalon.tilab.com • You must subscribe to the mailing list

More Related