Is it proper to use Much many object values for Data?

Hi,
I’m using table to save and load data which is very fine but the problem comes when viewing this data to the client because tables doesn’t replicate to client so i had to create object values. But does this large amount of values affect memory or game performance ? it will likely be 100+ value
and if it does what is the best way to store all this large amount of data in way that both server and client can view.

Edit : More values get added during player progress such as clothes,weapons in inventory and so on.

3 Likes

Tell me what do you think? Does this not look psycopathic? Simple answer is No. If the values are object values then yea sure if they are just names and stuff would be better to have them as a string table e.g: “Sword, Katana, Knife” is a string table of

local MeleeWeapons = {"Sword","Katana","Knife"}

(IDK what string table is actually called)

2 Likes

You don’t have to use these instances to enable the client to access this data. You could always use Remote Events to fire changes in this data to the client.

Alternatively, you could look into a state management library such as Rodux. This makes the stuff you seem to be asking about easier to do.

2 Likes

Using base values will take more memory, and won’t be as quick to access (value), compared to regular variables. So if you can try to limit your object values, and perhaps also include some attributes if possible. You can keep track of “info” that you might map out using base values in a table called “info”, example:

local ShopInfo = {}
ShopInfo.LegendarySword  = {
   Damage = 15,
 Price = 150000,
 Duraability = 15000
}
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.