|
|
|
|
|
by aerovistae
1958 days ago
|
|
Context: I started building a synced browser game, having never done anything similar before, and realized that multiplayer game state isn't supposed to be stored in a database, the way firebase works. It's just kept in a server's active process memory, so there's no reads/writes to a DB involved. Otherwise realtime speed would be impossible. I never knew this before, having never worked on it or thought about it. But if you want such a setup, you basically have to write it yourself. And that's hard. I just wish there was a SaaS (much like firebase) where you sign up and have an API that lets you define the data that your game-state involves (which may be a large schema), and then provides you with a suite of methods for letting clients create, find, and join group sessions ("games", "matches", however you want to call them) where the game-state is synced across all clients in that session until the game ends, with each client being able to modify the game-state within defined limitations (i.e. play the game.) I suppose the server would have to know under what conditions a game ended so that it could notify all players and end the session. It just seems very daunting to me. |
|
With that said, I also want something like this and definitely think it's a problem worth pursuing. I know there's Photon for Unity but I don't know what it actually provides and it's obviously tied to a specific engine.