I am going to implement a "game lobby" for my game (which is a new topic for me). The game works the following way:
- Users chooses "random game".
- The device connects to a specific URL where I will implement some game logic (like name of players in the session, name of the game session itself and so on).
- The URL returns values to the device so the game can load them and start.
My question is: What is "the best" way to do this? Should I have a database with different game sessions that contains all the information for each game session. Or should I start a script on the server (one script equals on game session) for each game that starts that holds the information that is necessary?
I was on the thoughts to have this as a socket to socket game. But I think it will be easier with the client-server approach since the server then will take care of most of the logic and the devices only needs to concentrate on one single connection at a time.
Any help or advice is appreciated!