So broadly the online games are divided into two major categories:
- Realtime
- Turn Based
The first category games are like Player vs Player (PvP) battle, Racing games, etc.
Till now, you might have figured out that your game falls under the second category.
Both the categories further divide into sub-categories, but lets dissect second category, as that is your focus right now.
The Second category is broadly divided as :
(These terminology are widely accepted, there is no standard documentation, so some people may call it something else, but let’s stick to the commonly used terminology)
Let’s understand them with example.
Synchronous Turn based:
Each player have their turn and can take permissible game action in a limited time.
Eg: Poker.
Asynchronous Turn based:
Each player have their turn, but can take infinite time to take permissible game action.
Eg: Draw Something, Chess (if not time bound), etc.
Why I am writing this theory ?
Because once you get the terminology correct, you can dive into the plethora of articles over web; on each of them
A good news for you, is that this last category is easiest to implement.
There are already multiple services that provide Async Turn based framework.
Like :
Google Play Services
Apple Game Center
Facebook
Amazon Web Services
In mostly all these frameworks, a common shared state is passed to the players (client), where only a single player is eligible to take actions and change that shared state at a given point of time, which is then passed to next player until the game ends.