- Home /
How can I make a multiplayer game that can support 100 or more players?
Greetings of the day!
I want to create a multiplayer battle royal game where 100 players can join in a same room. The game is a 3d game and it has a base building feature too. The landmass is procedurally generated.
I get to know that Photon can only support up to 500 messages that means 25 players maximum. So Photon is not a option here I guess.
I do not know about mirror or other multiplayer framework like socket , but I believe they are not capable either (I did some research on google and found out that they can handle the same amount of players like photon. Please correct me if I'm wrong.).
I read somewhere that UNET and a dedicated server can help ,but I do not know how should I start.
If you are going to suggest me to create a dedicated server then please mention some books, articles or tutorials that can help me. My knowledge is limited in the case of dedicated server, but I believe I am a avid learner and I can manage it. All I just need some guidance that can help me to do this.
I am sorry if I said anything wrong ,and thank you for reading up to this point. You are a good person!
Answer by Captain_Pineapple · Jun 03 at 10:44 AM
Hey there,
in general i'd advice to not do this if this is your first networked game. A 100 person battle royale is hard to make and to optimize and is a really large scope. You will also find it difficult to testplay your project as it is hard to find a lot of players for such projects.
If you want to go forward with this anyways then:
Start with a sample project. Something where you and a friend can join a room and run around together. Idk, make it a simple shooter if you will. Use this to test out networking solutions for their usability. Try out the features that you want to have (Test if they are actually fun) - make this a small prototype for your actual game. This will help you a lot to bring up possible issues regarding networking and what you might need. If you have done some basic things with networking your time estimates and general programm plan will be way more accurate.
When you have done this head back to planning your real project. Start from scratch here. Do not reuse your prototype code!
Given the information you posted, when you are talking about Photon - did you mean their product "PUN"? Because if that is the case then absolutely don't do that. I am not really sure where you got the 25 players from but for an FPS-game this is absolutely incorrect. You can not use PUN for and FPS unless you are aiming for 4 people max. Key to this being that PUN is a "peer-to-peer" solution with the mentioned message cap at 500/s. (if you want further elaboration on this then let me know)
To create any game with a larger playercount then imo you must have a server. For this there are many solutions to choose from, they all have their upsides and downsides. For me DarkRift2 was the best solution I found but in the end things like Mirror or UNet can work as well.
You could check out this post here for some more decision help.
Things that will come in handy are the following things: Learn about docker and make your server instances run in a docker container. This can then be run locally and you can connect to this server instance on your local machine. When you feel ready to put up a testserver then you can grab a cheap VM on a hosting service like Strato (or any other - there are plenty), install docker and run your server on this VM just like on your local machine. But now everyone could theoretically connect there by themselves.
Docker will also be handy as most gameservices like PlayFab enable you to host server instances on their platform on VMs that they provide but to make it scalable you have to provide your servers in docker-containers.
Make sure you plan this really really good. Make sure that you are aware of the time this will need make a plan with a time estimate - then double that estimate. Make sure to not forget that a game like this will need things like a signup service, an account management and server management in general. (You could check out PlayFab for this - but beware this is another deep rabbithole, still probably better than trying to implement this on your own) Do not underestimate the time you will need to figure these things out. It is way more complicated than one could think at first glance.
Answer by attackontitanisop · Jun 04 at 04:30 AM
Hey @Captain_Pineapple,
I am really glad that you answered my question in such a detailed way.
I will look into the things you mentioned.
Oh yes, and I had created some prototypes with PlayFab before, so this won't be a issue for me. And, yes I was talking about photon pun. I made my first multiplayer game using PUN.
I will do everything I can to make my vision into reality. I just want to do something crazy. For now, I am create the procedural terrain with overhangs and stuff. As soon as I finish that I am going to learn the things you mentioned.
People like you are really awesome. You helped me. I will never forget you.
Can you provide me some links from where I can learn about DarkRift2 and Docker? Like books, courses or articles. You are good at this ; you can suggest me the best.
Hey,
glad that this was helpful.
i was able to figure out darkrift by using their official website which since then got heavily improved. Someone from the community also provides a comprehensive example project on github. On top the darkrift-community on their official Discord is really strong and can help you out a lot. (link on their website)
For docker i am not really sure. I don't really know where i started with this so i don't really have tutorial recommendations here.