Once I complete my contract work, I’ve decided that I would like to spend some time exploring one of my previous game a week games further (not as part of Game a Week). One of the main things that I am planning on implementing in this game is a networked multiplayer feature. As I have no real experience with networking, I’ve decided to spend the next few weeks using my Game a Week challenge to also assist in me learning how to implement networking in Unity.
The idea for week’s game was the most basic idea that I could think of that would require multiple players to complete: it is a game where one player (it doesn’t matter who) simply has to reach a goal. Because the goal is sufficiently out of reach, multiple players have to work together to achieve this goal. I figured that this would be simple enough as a game and would allow me ample time to learn the basics of networking.
What went right
I got a networked multiplayer game to work. Thanks to a wonderful tutorial that I found by Paladin Studios, I had networking up and running in Unity in no time. This tutorial covered a lot of the things that I was wary of (such as simple synchronization), and was super super helpful (Thanks, Paladin!). Though the stuff that I’ll need to do for my game will be a bit more complicated, this gave me a pretty good base of knowledge to work off of in the upcoming weeks.
What went wrong
A lot of the networking code that I ended up implementing for this game was incredibly messy and essentially un-reusable. I was hoping to be able to continuously build off of each week’s code as I go through this networking sub-challenge, but due to poor time planning and general lack of understanding of networking as I was going along, this week’s networking code ended up as a giant spaghetti mess.
What I learned