Quick Connect: Registering Players

Favorite This Post!
0 Votes
Posted by Lavon on May 14, 2014

Quick Connect is a service that allows you to register and store user information so that players can log into your game later. You can always build your own user registration and login system if you want and just provide an auth token to Player.IO but this is an easier way to do it.

Setup Registration Scene In GBS

Registration Form Scene In GBS

We have provided a simple registration screen built in a GBS project for your users to register in game. You need a Text "Input Renderer" to recieve registration input from the user.

GBs Toolbar

Click the "T" symbol from the quick object tool bar.

%STEP_TITLE%

Go to the properties panel tab and change the Type dropdown to "Input Field" this will give you an input field for your user. You can set a default size for your renderer or leave Auto Resize checked and the input control will expand as the user types to display all text.

Storing User Input

%STEP_TITLE%

Once the user has clicked a "Register" button that you will create you can access the text that was entered and send off the registration details to the Player.io servers via the "Multiplayer Register Action"

Player.IO Registration Action

%STEP_TITLE%

Player registration only requires the Game ID from the Player.IO cloud service and the username and password. Click the expression icon to tie the Username field to username input box via an expression.
If you want to make email registration a required field then you have to log back onto Player.io and go the Quick Connect Simple User settings page and check the email required box.

When a successful registration is received the current player is automatically considered to be logged in and the Player.IO service is connected. You will probably want to trigger some sort of action to start the game right away or take them to the game start screen or connect them to a room on the server for multiplayer communication.

Listen for registration errors or any error by adding a mulitplayer capture error action to a Rules component. This action will return a string with the error message.


Congratulations on finishing this tutorial! Found it helpful? Spread the word...


Comments

There are no comments yet!


Anyone can leave a comment!


You just need to signup for an account or log-in before you can comment.