When to implement multiplayer during development?
Hello, I want to start off by saying I'm working on the first game I want to bring all the way to Steam. I will be building it in Unity. I'm in the very early stages and before I continued much further, I wanted to learn more about adding multiplayer, since it will likely be an entirely online game. It's going to be round based, with up to 6 players in total(Think Mortal Kombat but on a larger scale).
There are a few things I wanted to be sure of, getting started with multiplayer:
- Since I already know my game will have multiplayer, should I add multiplayer to the game now and work around it for the rest of development? <- This seems like an obvious question but I wanted to know if I should start now or worry about it later, when it is uploaded on Steam, to implement steamworks.Net.
- Should I use Unity's multiplayer HLAPI or steamworks.NET in preparation for Steam?
- Can I test multiplayer with steamworks(in the unity editor), without paying the $100 and uploading the game to Steam?
- Would peer to peer be the best option, given the small lobby sizes?
Edited 13 Jan 2020. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 10 · 100% up
- Kind
- Text
- ID
- eob7ms
3 comments
For any real time networking game, you need to be working online as soon as possible. You need to start working on it now. In fact, invent a time machine, go back 6 months ago and start then.
The reason why is because of all the bugs and issues that come up because of lag. You mentioned it is a bit like Mortal Kombat, so timing is very important, so being able to react is also very important. Now imagine someone a few hundred miles away hits the uppercut button and his screen shows your health at near zero. Then, on your machine you hit block just in time to block his move, but he doesn't know that yet. To him, he just knocked you out, but to you, you just parried his attack with a kick to the ribs. How do you deal with that? This is just one of thousands of "small" issues that come up in network games. Starting early with the implementation will help you spot and fix these issues early on.
Slightly off topic, but here's a quick tip I tell anyone looking to build a multiplayer game. Make sure every action has a 200 ms "start action" animation that can be rolled back without affecting game state. That ought to cover you for 90% of the issues you'll have with real time lag.
As for HLAPI vs Steamworks, well, use whichever you feel ticks all the boxes for you. Both have a reliable UDP wrapper, and both have multiplayer "lobbies" of sorts. I'm on my phone right now so I can't check the current feature set of either of them at the moment, but I'd wager Unity's implementation will be better for your purposes.
Yes, you can test multiplayer steam API without paying the submission fee. They have a few guides on the Steamworks website that will help you get started there.
As for the peer to peer aspect, well, unless you have a bucket of cash to throw at some servers, then yeah, you are limited to peer to peer only.
Hope that helps.
I can’t speak to the specific services from questions 2-4, but if you’re implementing multiplayer and especially online multiplayer and especially especially a game where online multiplayer is the focal point... You better be implementing those features very early on.
I would want to make sure that my game still felt fun with some latency through all phases of balancing, and that there was a large amount of time to resolve any networking issues
I'm going to go against the grain and say make your game playable before worrying about adding multi-player. The reason is to correct as many base issues as possible before adding such a large component as multi-player. Otherwise you may end up overwhelmed with bugs on both sides. If you can handle that, or are working with a team, add multi-player features early, but isolate them for testing purposes.
I've been a professional programmer (and game developer), and this approach has been far more efficient for me. Modularization is everything, but ultimately do what's best for you. There's no "right" answer.