Sign In Register

How can we help you today?

Start a new topic

Is my approach right to keep/access game data?

Hi GS,

 

Let’s consider below table. Which represent weapons upgrade cost.


image


I am planning to write server authoritative code. So this table must present on server as well as on client(to show upgrade cost to players).

 

I found out following:

1. I must push this table in “GameDataServices”(set index on ‘ID’ field). So that I can access table data from cloud code. 

2. Another copy need to push in “Downloadable”. So that client can show upgrade cost to player.

 

My query is:

1. Am I right in above approach? ‘Con’ of above approach is that if product manager wants to change cost, cost will be changed at 2 places. Logically it should be at 1 place only. 


2. Fastest way to get value is, if I write SQL query as below which will return only 101

Select upgrade2cost from table weapons where ID = ‘W1’

 So I need not to deal with json at all.

 Is there a way to run sql query which returns '101' only?

 

Thank you 


hello GS support, 


Please comment.

hello GS support,


I believe I put query in right forum. In case you want me to move it in some other forum let me know.



If i understand correctly, you would be better off using a metacollection to store the data and create costs as an array with each cost being the array number upgradeCost1 would be index[0])

Login to post a comment