I would like to start off by saying that I know the difference between client-side and server-side, along with what you’re supposed to do with them (server should handle data and client should handle rendering, is the gist that I’ve got). I’m more confused about how to actually handle these.
I have a minesweeper game I’m making, but I had an issue since I was handling everything server-side, including rendering, that when a player stepped on a tile it would take at times half a second for their tile-touch to actually get rendered. To fix this, I made it so that when people stepped on a tile on their board (in this game, everybody gets their own board), it would run on the client for that player, and then the server would update it for other players later. The issue with this is that then for the player who stepped on that tile, the client AND the server have both now spawned certain things in or done certain things twice.
My solution to this problem will be to make it so that the server does not deal with rendering at all, and everytime a client steps on a tile, it will send a remote event out to every other client to render that change, and send another event to the server to log the data from stepping on the tile (change the player’s stats, etc). I feel like this wouldn’t work though, since a good player will step on at least 3-5 tiles a second (possibly more), and the game would be doing this for up to 10 players.
Is this the most effective way to solve the issue? I’m new to optimization, and this is my first real post on the dev fourm. I will be checking this very actively, so let me know if any clarifications are needed I’ll be happy to clarify!
Link to the game:Competitive Minesweeper - Roblox (it may or may not be in a working state right now, I’m not sure)