So I am an indie game developper, I can manage making the game, I already made some games, but I was thinking about making it Multiplayer, is it so difficult than offline games?
The game is simple, when playing PvP it has basic movements like chess or Tower defense, nothing fancy, so no lag problems I think, however, I don’t know if I need any advanced programming skill? I have just average coding experience (1 year of coding).
Can you guys pleas tell me what will I need? any tips? (ps: I am not gonna be hosting the game, I will use just Amazon or Unity services fo that, if you know any better alternatives let me know)
It’s much more difficult to make multiplayer games. You have to sync the game state somehow and do it with the minimum bandwidth usage as infrequently as possible without introducing gameplay issues.
Chess and Tower Defense are wildly different in terms of multiplayer design so you’ll need to be more specific.
Thank you,
The game consists on attacking other player towers, you select your troops and select one of his towers to attack, the attack won’t consist of too much animation just very little ones.
The player will have a personal profile with a bunch of agents he can buy, but nothing complicated.
If you take the amount of time you expect a single player version of that game to take to complete, multiply that by 3, you’ll have a rough guesstimate of how much time the multiplayer version will take to complete.
If it’s turn-based, it won’t be too hard. If it’s real-time, prepare yourself for a grueling battle . The hardest thing in real-time multiplayer is syncing two different clients (or a client and a server) that are separated by, e.g. 0.1 or 0.2 seconds of network transit time.
For example, if the player hits a button, it would take lets say 0.1s for the action to get to the server, and 0.1s more to get to a fellow player. That’s way too long for a fast-paced game. So depending on your game, you have to make all sorts of predictions of the future, controlled de-syncs and re-syncs, the ability to rewind the (entire) game state (particles, animations and all) if your prediction is wrong, and all sorts of other meddling into the fabric of space and time.
And in case you get through all of that, you will likely hear crickets on your server a week after launch.
This, if you’re a small indie studio/person I don’t recommend making a multiplayer-only game. At the very least, put in bots (good enough so that one wouldn’t get bored only playing with bots) so that the game wouldn’t die instantly on launch.
It’s an RTS game, you move your units in the game, but not with turn, both players can move the units any time in the game, for example baloonTD on mobile, the 2 players play at the same time.
The game is a tactical one, I think the bots should be really smart with a lot of code lines for each level, you think it’s still easier than multiplayer?
Choosing peer-to-peer over a client/server architecture won’t necessarily make it easier. It’ll just change the problems you will have to solve. One immediate example that comes to mind being how will you handle people who are behind a NAT.
Nah actually I have time, I have one free month ahead (I can work on it more than 5/6hrs a day) + after I can manage to work on it 1h -2h per day,will that be suficient?
If anyone knows the steps to make a multiplayer, can you please write them down? just the general steps and I will look more into them, just so I have a better prespective, I wanna know eveything I will need, will be really halpful
Lockstep simply trades one set of network problems for a different set. It solves the problem of needing to send large amounts of data across the network. It solves the syncing issues. It largely solves issues with cheating.
But at the same time it introduces its own issues. You will need to make your system entirely deterministic. Unity is not deterministic in the slightest. That means rewriting physics, random, frame handling, time and so on. Its not a job for the faint hearted.
You should start by researching the available networking API’s. Maybe try out a few of them. Unity has deprecated the built in Unet API, and has not released its replacement, so I’d recommend going with a 3rd party API or writing your own socket implementation at this time.
Generally you’re going to have to design your game with consideration for:
How you sync the game state between the players
How your game will tolerate various levels of network latency
What data should be sent reliably, and what data should be sent unreliably
What network architecture you’re going for
How to limit the impact of cheaters
How you will implement match making
If a player hosted architecture, how you will allow a player to host the game behind their firewall or NAT router
How you store and authenticate any player accounts, if any
How you will store and update any player progression, if any
Depending on how you want your game to work, there could be a lot more, or some of the above could be ignored, but that list should be a good start.
I’d probably take a look at Photon first, since it is generally well regarded, handles some of the issues above on its own, and has a low CCU free tier you can use while your game is in development.
You have two basic paths available. You can approach the problem in the manner outlined by @Joe-Censored where you research and learn how to build your own solution. Alternatively you can use an existing solution from the Asset Store.
A quick search of the Asset Store turned up “RTS Engine”. It’s a complete framework for creating an RTS with support for multiplayer using Unity’s current networking solution. It’s received good reviews and has been updated within the past couple of weeks showing the developer is still actively supporting it.
Unity may have deprecated it but the community has continued developing it. It’s had a number of bug fixes as well as improvements and some of the limitations (eg SyncVars) have been lessened.