Hey,
I am developing my first multiplayer game, it is a “casino” game. I have horse racing as one of my games that i’ve coded in it. Right now i have two versions of the game:
#1) a server version that needs to be running, it handles the games.
#2) a main version of the game for (front end) users where you actually play
The way i currently handle the game’s data is this:
I have a database, i write EVERY single change that happens in the game, to my database (including horse’s positions). I am able to sync positions of the horses in real time with everyone who is in the game this way. Now this is really bad, because horses move fast, and i write around 15 writes per second, meaning i am doing another 15 reads on users end to update the horses positions… What would be the
Here is two possible solutions i have been thinking:
Solution A) Should i be using a multiplayer solution like fish networking or something? And sync the horse race on everyones screen that way?
Solution B) I could stop writing the horses positions to database in the server => then i would have to read the winning horse’s data on user’s front end app to know which horse is going to win => i would then just trigger the race to start on everyone’s clients at the same time, and it would render the race because we know which horse will win.
^^but i think solution B) is bad because i think saving the winning horse to the users app isnt ok… and some smart guy can read that data then and abuse this…
Any ideas? idk if i explained this well enough… Thanks in advance!