Sign In Register

How can we help you today?

Start a new topic

Purpose of properties

What is the purpose of properties and correct use cases?


I can't determine what the benefits are, are properties persistent? Does each player/account have their own instance of properties or are they used more for world events etc?


A few examples would really help, thank you.


Hi Ian,


Have you had a chance to look at our documentation here on properties (https://docs.gamesparks.com/documentation/configurator/properties.html) Properties give you a mechanism for customizing your player experience without being restricted to platform capabilities. Using Properties, you can store your own JSON configuration on the portal and attach this to objects, such as Virtual Goods, Achievements, and Leaderboards. You can access Properties directly through Cloud Code and assign Property Sets to players through Cloud Code. When you create a Property, you create an arbitrary data set which you can then exploit for custom game configuration. As the property data is arbitrary this makes them agnostic in terms of their use cases but for example a property could be set that defined how the UI should look for a given player, as this is a shared configuration it might make sense to define a single property rather than assign this in scriptData for each player. I hope this helps.


Kind regards,

 - Steve



Could be properties used for having a progress history of an achievement ?

For example, if a player is completing an achievement, a propertie value of 5 in this achievement means that achievement is completed.

Hi Victor,


Achievements are stored on the player document - access them with Spark.getPlayer().getAchievements() in Cloud Code.


If you want to track supplemental values/stats against players with achievement unlocks, you could either store this data on the players scriptData (for small amounts of data), or use our Game Data Service for persistence. You can't have players change values for Properties. They are read-only via your client, and when you make a change to them on the Portal, you need to publish a new snapshot for the changes to be reflected on a live, so they are not suitable for this kind of stat tracking. 


Best,
Paul


1 person likes this
Login to post a comment