Does the number of players connected impact the overall game performance?

Hello,
so I am a total noobie when it comes to developing multiplayer games, but soon will be working on one so right now just doing some research.

Now I don’t know how it all works, but does the number of players connected impact the overall game performance? So if my game is generally optimized and like 10 or 50 players join, does it make a difference or the performance is being affected by something else? I would guess the wi-fi connection, but how does that work? If one player has really bad internet do the entire server slow down for all the players or do only that player lags out?

Also how do you detect if player is currently lagging out?

I hope it all makes sense, but I would really appreciate some help on this topic. Thank you!

How much it effects CPU performance depends on the game, if you make an RTS and one more player joining adds 100 more units to the game, then yes, there is a big impact. If its an FPS and one more player joins then the impact on the server CPU is minimal. If your game is optimized for a lot of players then the CPU won’t be your bottleneck.

Depending on which network library you use they might decrease in performance with more players joining, but there are also many network libraries that are optimized for a lot of connections, so think about that when you are choosing a network library.

Each player adds of course to the network bandwidth required to run, it really depends on your game too, if its an FPS then I don’t think this will ever be a problem, if its an RTS with thousands of units then it’s more difficult to handle, if you tell us more about your game it woud be easier to help you.

If you have a client-server architecture and one player lags then only that connection is affected, but depending on what lag compensation you use server side then other clients might be slightly affected.

Each network message can contain time stamps, from the time stamps you can calculate their ping, if a player doesnt send any input because he is not doing anything then the client usually still sends heart beat messages, if the server doesnt receive any heart beat messages or inputs for X amount of time then the client timed out.

1 Like

Thank you! My game will be open world survival FPS game. There won’t be that many things happening in terms of what player can spawn. The player will be able to build stuff, drop items and stuff like that, but I guess it shouldn’t be a problem? All the things will be optimized, like dropped items will despawn overtime and if further away from the player will disappear and etc. Also I think on using Mirror. As I heard many great things about it and I also want my game to support lots of players as the map will be quite big.

I have opened a new thread on a different issue (also multiplayer related) and would really appreciate your input on this topic. :slight_smile: