Gamesparks Tutorial. Tutorials This section offers a wide range of indepth tutorials to help you with detailed aspects of the platform Analytics Segmentation and Game Management Social Authentication and Player Profile Capabilities and User Permissions This tutorial explains how to create configure and manage Facebook Webhooks and GameSparks Integration Using Game Data In this tutorial we'll first explore the GameSparks This tutorial section provides a worked example of how to For this tutorial all configuration options that are not Welcome to our series of tutorials on GameSparks RealTime.
Introduction to GameSparksAccount SetupAuthenticationMatch and Challenge SetupSummaryGameSparks is a cloud servicewhich offers almost everything you might need for your game when it comes to backend solutions Among its many features are 1 User authentication 2 Customizable matchmaking 3 Turnbased or real time multiplayer 4 Server authoritative Cloud Code (which is essentially JavaScript) 5 Player data and game data storage 6 Leaderboards and achievements 7 Economy 8 Analytics and many more For a more complete list of features see GameSparks features description page GameSparks and the client app (in our case Unity) can communicate in a couple of ways 1 Client can send a RequestMany different premade Request types are available In fact you can create your own types called Events 2 GameSparks can react to a Request sending a Response Sometimes when things go wrong this might be an error response 3 GameSparks can also independently send Messages to the client You can use interceptors to execute your custom server code (called Cloud Code) i To create a GameSparks account head to the registration page After a successful login you will be able to create a new game configuration Documentation chapter available at the official documentation pageexplains how to create a new game Follow the instructions We won’t need any currencies set up at this moment Enable following platform features Events Multiplayer Cloud Code GameSparks offers several authentication methods We’ll use the simplest one which is username and password Users have to register an account before being able to use it We don’t have to configure anything on the GameSparks side to make it work To be able to match our players we have to configure a Match first Go to Configuration/Multiplayer Select Matches tab and click the ‘Add’ button Fill in the form as shown in the image below Each Match has to have at least one Threshold configured Thresholds are used to finetune the search algorithm You can set narrower or broader player skill requirements You can also specify a period of time after which (if no match is found) the next Threshold will be used If there are no more Thresholds matchmaking will end with MatchNotFoundMessage To learn more about Thresholds visit the official documentation page We won’t be using skillbased matchmaking yet so we’ll just add one Threshold that matches players at any skill level Click ‘Save and Close’ After two players are matched we need to create a Challengefor them (which in this case could be also called a room) To configure a Challenge switch to Challenges tab and click the ‘Add’ button Fill in the form as shown in the So far we have learned how to create a new game configuration match players and create a Challenge In the next partof this tutorial we’ll start with implementing the game logic (using Cloud Code) and finish GameSparks configuration so we could focus on building the Unity app in parts 3 and 4.
Tutorials GameSparks Learn
Community Tutorials The tutorials in this section have been prepared by 3rdparty GameSparks users The Knights of Unity TurnBased Multiplayer Game with GameSparks and Unity Part 1 Part 2 Part 3 Part 4 IMPORTANT! The tutorials in this section are solely and exclusively the product of 3rdparties.
Community Tutorials GameSparks Learn
IntroductionEvent CreationCloud CodeTest HarnessSDK InstructionsCloud Code plays a key role in the GameSparks Services You can use it to create custom logic and control the behavior of the configurable components you have built into your game Since you'll be Setting data to and Getting data from the database you should create Events 1 First navigate to Configurator > Events and click Add The Add Eventpage opens We'll use this first Event to set the coordinates Here's how we've set things up 1 We've given the Event a Short Code of Set_Pos 2 We entered a Name and a Description 3 We've also added an Attribute to the Event This is a parameter necessary for the Event to be executed 31 We've used POS as the Attribute Short Code This is the value we'll be passing in via either an SDK or the Test Harness 32 We set the Data Type for the Attribute to JSONbecause we'll be passing in a few variables into the Event as a JSON object 33 Lastly we'll also set a Default Value which will be useful when running our tests 2 Click Save and Close You are returned to the Eventspage where your new Event is added After you've finished setting up the Set Position Event you can go ahead and make the Get PositionEvent Set Event After creating the two Events you can attach some Cloud Code to them and prepare them for use Firstly for the Set PositionEvent 1 Navigate to Configurator > Cloud Code 2 Under Scripts select Events and click the Set Position Event A Set_Pos tab opens in the Cloud Codeeditor 3Now we can write the Cloud Code that will handle the position setting As you can see in this example all you need to do is getData that was sent with the Request get the current player using getPlayer and fi Get Event To enter the Cloud Code for the Get PositionEvent 1 Navigate to Configurator > Cloud Code 2 Under Scripts select Events and click the Get Position Event A Get_Pos tab opens in the Cloud Codeeditor 3Now we can write the Cloud Code The Get Position Event is essentially a reverse of the Set Position Event Here we get the Player using getPlayer then we retrieve the Script Data that was Set for this player using getScriptData Finally we use setScriptDatato set the position in the Resp 1 Firstly you will need to register a new player This can be achieved by using the RegistrationRequest To do so you'll need to navigate to the Test Harness and under Authentication select the RegistrationRequest fill in the JSON details and click Send Request 1 Note that in the RegistrationResponse the newPlayer parameter shows as true 2 Now you'll want to call the Set Position Event to set the X Y and Z coordinates in the player's Script Data To do so go to the LogEvent and select the Set Position Event Fill in the JSON details and click Send Request Note If you had Debug Requests ticked the Cloud Code Debugger will automatically open This only happens if the Request has some Cloud Code set on it Either step through the code or stop debugging You can read more about the debugger here 3 You can now validate that the POS has been set in the players Script Data by calling an AccountDetailsRequest 4 Finally you can retrieve the data stored in the player's Scri.
Actionscript Setup Gamesparks Learn
Using Cloud Code GameSparks Learn
Building a TurnBased Multiplayer Game with GameSparks and
RealTime Game Example GameSparks Learn
RealTime Multiplayer Game Example Introduction To get started we'll create a scene and set up all of our gameobjects such as the spawnpoints tanks Scene Setup In order to follow this tutorial you will need the gameassets available in here The assets used in this The Game HUD A.