I’m new making multiplayer games, and read over the zero to hero guide. I am amazed at how easy it is to create multiplayer games in Unity. My question though is, Lets say I learn the unity system really well and make a cool 10 player game. This game is awesome, and I decide I want to turn it into a MMO 1000 player game. I know I need to upgrade to something like photon or Raknet. How much of what I have learned, and how much of the code that’s been written will still be usable? Once I decide to upgrade will the whole program need to be rewritten?
I like the simplicity of the built in unity, but I don’t want to be wasting time learning something that’s useless in a large scale or completely different from how I will be doing it later.
By the way this isn’t a “I want to make the next great MMO title” thread. I’m just interested in learning the proper way of doing things on a large scale.
So the way I’m looking at it is I’m better off learning to use something like Raknet separate then even bothering with the built in multiplayer. Raknet seems like the only free alternative I could find. This is just a hobby so I don’t want to be spending any money. I guess its time to start reading about Raknet. :?
One other question, I would like opinions on whether learning Unity’s networking will help with the learning curve of something like raknet or photon. Or should I just start with one of them. I am not new to programming but am completely new to any kind of networking.
it will give you a basic idea of how these things work yeah.
But to do something yourself you will need to do it, think about it and read up about it.
RakNet btw is only an option if you build standalones and own Pro, otherwise its a no go.
Photon / SFS Pro both work with pro and free and in the webplayer (and on iphone)
You can reuse stuff like interpolating but things like RPCs or state synch stuff you have to do on your own.
But with raknet this shouldnt be a problem!
I am already using my own console-raknet server and raknet DLL for unity with players, items and mobs using SQLite for persistency on serverside and it works fine till now (but didnt test it with hordes of players yet)
On the serverside it just gets a little bit fishy with c++ and threading, thats where the hard work and the debugging begins
IMHO, the best approach is: Start with a single-player game (to learn the basics of Unity - unless you already have that experience which I would be assuming from your posting). When you feel comfortable with that, go with Unity’s built-in networking to get your feet wet with networking and get a first feeling for “real-time distributed systems” (which is what multiplayer games really are).
Then, when you feel comfortable with that, go ahead with Photon or Raknet (I don’t know that much about Raknet - but with Photon the key difference is that you’d be using a separate networking server instead of having everything inside of Unity; with Raknet, the main difference is probably that you’ll have to mess with C++ a lot which is why I don’t care too much about directly using Raknet … IMHO, C++ is “the wrong abstraction level for what I want to do” ).
Obviously, you will make a lot of decisions (and consequently create implementations) that way that will turn out to be “shortsighted” in the end (because you have to do stuff significantly differently when moving from A to B and from B to C). It will be a bit of extra-work, too (due to those “shortsighted decisions” and the resulting refactorings when you made “the right decisions”). But the nice thing is that your mind will gradually adapt to the increasing complexity instead of being overwhelmed when confronted with all of it at the same time.
Also, if you create a game for 10 players first and then decide to go for 1000 players, you will very likely have to throw significant parts of your game to the trash and re-design them from scratch, simply because when you design for 10 players, you can make a lot of assumptions and do a lot of stuff that will break your neck when you head for 1000 players (in fact, it might turn out that 1000 players simply doesn’t work at all with your game design - unless your idea of “1000 players” is 100 separate “sessions” with 10 players each ). But again: I think it’s better to go that “step by step” route because nevertheless the experience you have from doing the low-scale stuff will help you a lot in doing your higher-scale stuff.
One thing that I would recommend on that route, though: Stay away from NetworkView-synchronization and use RPCs instead. Using RPCs in Unity is still really simple and IMHO NetworkView-synchronization is simply too specific to Unity to move it to another approach (unless of course, you implement a similar abstraction yourself).