- Home /
Can players host a server individually on your game for free
Hi, I'm an armature at multiplayer concepts and coding, and I don't quite understand multiplayer/online connectivity at all. I want to make my first online multiplayer game because I've been making a lot of single player games that just aren't as fun, problem is, I have no money to pay for dedicated servers, my understanding is, is that paying for dedicated servers cost money for internet traffic, though could players use there computers as the server, and would it be free of charge for me and or the player, meaning players can host servers on my game and players can join the server, via a code or ipv4, or even a server list. So theoretically if i had say 100 people currently playing my game or even a 1000 if you will, they could all host a server and people could join, also is 20ccu 20 people max in a server hosted by someone or is it on the whole game, do i use this server method using photon or no, so many questions! Please awnser them.
I've messed around with Photon a couple times. This doesn't seem to be a solution if you want to make a game where someone is the host and people can join their game. Photon is room based, so players connect to a central server that you can host yourself or on the Photon Servers. 20 ccu will be all players connected to that server. This could be 20 players in 1 room, 2 players in 10 rooms etc. But only 20 people can connect to your server simultaneously. So it doesn't mean you can have an infinite amount of rooms with 20 players for instance. I guess if you want to make a game where one person is host and other people can join them, you could look into NetCode for GameObjects. I haven't used it myself, so im not 100% sure, but it looks like it is capable of just that. https://docs-multiplayer.unity3d.com/
Answer by sacredgeometry · Dec 15, 2021 at 12:36 AM
There are lots of ways to do this. Probably the simplest way would be to allow one of them to host the server and to have other people connect to it as clients. The only problem is there will be overhead on the serving computer if they want to play too.
Other than that most people dont have fixed IP addresses so unless you do something like dynamic DNS or set up a VLAN they are going to have to share a new IP address with people every-time they lose theirs.
Your answer
Follow this Question
Related Questions
PUN - Choose random Hero for player 0 Answers
How To Destroy An Object Server Side When Using OnTriggerEnter 1 Answer
Kill System, who killed who (UNET) 1 Answer
Multiple Cars not working 1 Answer