I am going to implement a "game lobby" for my game (which is a new topic for me). The game works the following way:
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!
The cleanest approach for this would be a client server model as you guessed.
This simplifies client code a lot, as compared to database approach, but you need to setup and maintain a server.
You will anyways need a centralized entity (as a matchmaking service provider) if you want to let the user choose a random game. So I would suggest to go for setting up a server.
Following libraries might be helpful.
There are many more... just search
Hope this helps.