How does the Networking in Games like 'Draw Something' work?
Good Morning lovely Developers.
I recently had an Idea about an Android Game that uses the same Multiplayer concept like 'Draw Something'.
What I think about is like an Offline Game that turns Online one time if the player wish so. (sorry for bad explanation)
You basically have one Image ready with things in the background you have marked that one random player has to find.
Question is how to implement this in Unity that I can send this Image over Networking with the stored Data to some other player (I assume he must be logged in or something?) so he gets something like a notification and he can start the game and do whatever the game says to do.
How to find such a player, when he is currently not in the game?
And on the transmitter side you can start other games etc. until you recieve a notification if opponent has beat your game and sends you an image.
I havent started this project yet (except for some UI design) so there is nothing I can show you for building up your thoughts.
Just want some thoughts about how to start with the networking, what to read for this topic or just a script (prefer C#) of your previous projects I can study on.
This would be really helpfull.
Thank you and have a good day :)
Answer by sumitb_mdi · Dec 13, 2016 at 04:09 PM
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 :
2.1. Synchronous turn based.
2.2. Asynchronous turn based.
(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 :
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.
you sir deserve a giant cookie. this helped me a lot since I didn't really know how to search for this. google spit out completly unrelated results for "kinda offline multiplayer". thank you
Good to know that this helped you. Happy Coding.