Customizing your Game Parameters (Optional)

Game Parameters offer you the opportunity to customize different types of games that players can compete in. Through the Skillz Developer Portal, you can create any number of Game Parameters, and assign them different values in each tournament that you configure. When a player enters a tournament, the Game Parameters for that tournament will be passed in to the game so that you can initialize the match based on the parameter values.

 

Step 1: Determine what parameters best apply to your game

The first step in using Game Parameters to customize player matches is to identify what parameters you should use. This is highly specific to each game, but consider any factors that could be altered to offer players a variety of experiences.

Some examples of common game variables that are controlled through Game Parameters are:

  • Level of difficulty
  • Size or length of the game
  • Different game objectives
  • Different weapon sets or types of enemies
  • Game mode
  • Environmental factors

There is an almost limitless number of possible Game Parameters that you could identify. We recommend you come up with a set of core parameters that you can modify in different tournaments to offer players a variety of gameplay experiences.

 

Step 2: Add Game Parameters through the Skillz Developer Portal

If you have not already done so, Game Parameters may be added to your game’s tournaments through the Skillz Developer Portal. Log in to the Developer Portal and go to ‘My Games’. Then select the game you want to add Game Parameters to, and go to the tournaments section. From here, you can add as many Game Parameters to each tournament as are needed.

Game Parameters are specified as key-value pairs. Be sure that the parameter names that you use as keys are consistent between all of your tournaments so that your code doesn’t have trouble reading in the parameters later. Any parameters you input on the Developer Portal will be passed to you when making the call to launch Skillz.

Game Parameter changes are testable in real time on Sandbox. Just force close your app and restart it – the new tournaments should show up. This will help you quickly find the optimal tournament configuration.

 

Step 3: Apply Game Parameters within your game

Once you’ve decided what your Game Parameters should be and added them to your tournaments with appropriate values, you’ll then need to incorporate those Parameters into your game. This will of course be different based on the platform you are developing on.

When you are initializing a game from Skillz, you can read in your Game Parameters and then make initialization decisions based on the values of your parameters.

By combining different tournament structures with different sets of game parameters, you have the ability to customize your players’ experiences. Even after launching your game from the app store, you can continue to add and modify the tournaments you offer through the Skillz developer portal.

To illustrate this, we will use an example of a Unity C# game, with a single tournament. In this tournament, we have added two game parameters: Difficulty and TimeLimit.

We will read in these two parameters and then initialize our game based on the values of the parameters. Here is the implementation:

void setGameParameters ()
{
gameParams = SkillzCrossPlatform.GetMatchRules();
string difficulty = gameParams["Difficulty"];
Int32 timeLimit = Int32.TryParse(gameParams["TimeLimit"])
}

Inside of the method, we are reading the difficulty and time limit out of the dictionary as strings. Since TimeLimit is supposed to be an integer, we use the Int32.Parse() method to convert it. Finally, we can start either an easy game or a hard game based on the values of the Difficulty game parameter.

 

Step 4: (Optional) Automatic Difficulty

If you’d like to create different gameplay experiences according to the player’s skill level, implement Automatic Difficulty for iOS or Android.

 

Next steps

Next, we’ll show you all the steps needed to finalize things and launch your game into the appropriate app store.