Communicating with Players


You'll need to be able to communicate to your players for various reasons. Maybe you want to display a daily message, inform a player of a certain promotion, or send a player a token which they can use to retrieve their password.

GameSparks offers you several ways to send messages to your players with incredible ease, flexibility, and customization. This tutorial explains the different ways you can communicate with your players:


Messages are used to notify your players with events or information. GameSparks includes many native messages such as earning a new Achievement, acquiring a new high score, or losing a position on a Leaderboard. You can customize these messages or create new ones:

Messages through Cloud Code

Cloud Code is a great way to dynamically change strings/images/values within your game in real-time to communicate with your players. Some examples:

    //Sets the IP Address for the player to retrieve
    Spark.setScriptData("serverIPAddress", "");
    //Sets message of the day to view in-game, updates realtime
    Spark.setScriptData("dayMessage", "Smile! One day until the weekend!");
    //Sets buildVersion to control who gets to access to multiplayer
    Spark.setScriptData("buildVersion", "1.7");

Using SendGrid to Send E-Mails

GameSparks comes integrated with SendGrid, which gives you the ability to send e-mails to your players. If you exploit this, please make sure to save e-mails against your player for reference. For an example of how to use SendGrid for a password retention process, click here.

More Information! For more information about SendGrid, click here.