Need help to understand

Hey! So I would like to understand a little about how people exactly develop games in their manner. The game I am developing includes data save system. Please read the 2 points below and tell me which is preferable or a better option.

  1. Doing most of the logic and functions server side, saving data everytime some value changes, then giving output and values to client side.
  2. Doing most of the logic and functions client side, saving data only before player leaves, only communicating with the server when needed.

Right now I currently use a hybrid method with profileservice through which data is saved better and is easier to use. But the problem is that theres too much data going around which is a problem considering the game will mostly be PVP based. So lag cannot be tolerated by people that easily.
I am still new to game development so I pretty much jumbled my entire process and everything is scattered now.
I had to create this topic again due to previous one not getting enough replies and no helpful solution.

1 Like

My way of thinking is that if the process you are doing is related to anything visual, I would have it done in the client side as the visual will appear smoother. Anything that is not visual and runs the main part of your game, you should do it on the server side. Data saving is only done on server side as doing it on client will have vulnerability, but even then Roblox doesn’t allow saving data on client side.

2 Likes

I don’t know if I understand your question all the way through, like with you mentioning “too much data going around.”

I think ProfileService offers some tools such as automatic data saving (and I would guess auto save configurations as well) making there no need to explicitly save the state of the player’s data every time a field is updated. (This seems a bit excessive any ways.)

A module called ReplicaService was also developed to work alongside ProfileService, which you can use to handle client-sided updates on specific fields in the player’s data, although I do not exactly know the API on how to set it up.

In general though I do not see an immediate problem with transmitting the entirety of the player’s data back to their client, unless data is constantly being updated, possibly leading to increased server ping. Then again, the majority of player data is pretty insignificant as far as size goes, unless it holds massive object-serialization attributes or what-not.

1 Like

Thanks for the detailed explaination. What I meant by data going around was my use of remote events and functions.

As this would be a mostly PVP based game it would mean that there would be lots of data jumping around when for example player kills a mob, the player is gaining multiple things like exp, money, items, etc. This data is used to mostly calculate certain things like the players level or the amount of damage done to the mob, etc.

Also, what I meant by saving data all the time was just filling the template I use for the data save of profile service which I actually do not know if it auto saves the data when the player might have problems like connection loss or device issue that makes player leave. What I do know is it saves the data when the player leaves.

I will also check up on ReplicaService you mentioned. Thank you.

1 Like

I completely agree on that. Ofcourse anything visual would be done on client side. The server will mostly be doing functions and calculations and giving that data through remote events and functions. And ofcourse the data will be saved through server by taking values given to the player.