Handling - MobileGamingLabMobile/MGL GitHub Wiki
###4. Handling ####4.1 Set up a new game Since a GUI for the editor was not realized, creating a new game needs to utilize the REST interface for the editor directly. The API offers multiple function to create new objects, edit or delete them. In principle all the data structures previously stated are reflected here. The general workflow on setting up any of the objects is that first a new and empty object is created, which is sent back to the user. The most important part of those objects is their ID, because for all manipulations done with the object it is required to state the ID. Out of convenience the following overview about the creation of objects will not list the access token, which is required to authenticate the editor in the system and to verify their rights to edit. However this token is REQUIRED and cannot be left out. The token can be obtained after a simple login, where it is sent as part of the response object. The token needs to be sent either as part of the body or the query on the parameter “acces_token” or it can be passed as part of the header of the request document at the parameter “x-access-token”. Intentionally the main purpose of the editor was to provide an easy way to create games, mainly by visualizing the components, handling the server requests and setting the links between the components. In the current state the editors need to execute their requests manually and they need to note down the component ID by themselves. To achieve this one can use a RESTClient browser plugin. We used for debugging the plugin RESTClient.
######Create new game
Those requests are just some examples how you can create objects with the editor API. To get an overview about the full functionalities of the editor, please look up the API description.
####4.2 Playing the game on the mobile terminal The first step is to install the application via an .apk file which can be found on the server. After starting the MGL-app the user is asked to sign in with an existing account or to register.
To personalize an account the user may add information about himself, such as name, profession, country or city. Those will be displayed on the personal profile page.
All games are shown on the gameselect page. These can be filtered to display only those the user has created or is subscribed to (those functions are also provided on the profile page). Furthermore a search bar and a rating system help the user finding games to fit his interests.
When selecting a game further information is displayed and the game can be started via a button. Additionally comments from other players and a link to the author are provided.
After starting a game the user is asked to select a role. Finally the actual game page is displayed. It contains a centered map with markers, several buttons for tasks, items, options and help and labels, e.g. with the current task or if a new task has been added. Furthermore the user can choose between the available tasks.