Barotrauma

Barotrauma

View Stats:
rgarrett Sep 7, 2021 @ 6:58pm
Specs to host a server without lag?
Can someone point me in the direction of upload / download speed that is considered good and PC specs for server hosting?

Id like to upgrade my internet and PC for hosting.
< >
Showing 1-5 of 5 comments
Slaiiz Sep 8, 2021 @ 1:38pm 
If your game runs at a comfortable frame rate, the server should run equivalently. This is because most of the code is shared between the client and the server, and sprite rendering has little impact on performance.

Oh sorry I only read half the post.

I launched a one-player, 8 bots dedicated instance and played a game for about 9 minutes, generating as many events as I could in order to simulate a genuine game.

The maximum number of packets per second peaked at around 400.
The average bandwidth while in game was 88 kbps, it didn't include voice. It should be safe to multiply that number by the number of players and still get a reasonable estimate.
I then tried doing nothing for a while, the bandwidth consumed averaged to 69 kb/s.
Finally, I tried streaming roughly white noise (very imperfect) over the microphone while still doing nothing ending up with an average of 120 kb/s. Intuitively I would think the bandwidth alone for one voice would be 120 - 69 = 51 kb/s.

Given those numbers, assuming a 16 player server and that all of them use their microphone I can come up with about 2.224 Mb/s, not including protocol overhead. It's really not much, at least here, even for DSL. And I'm still unsure about the accuracy of these numbers, considering I don't even test in real conditions, but it seems reasonable.

Anyway, if you use custom submarines, remember that all players will have to download them from you, some may be a few megabytes large. That's my only worry.

And yes, important point by The Flaming Pike about Wi-Fi, if it's unstable like mine usually is, the rubberbanding will be unbearable. Old desktop PCs like eMachines? Tried it, the game runs in slow motion for both clients and server. Horrible.
Last edited by Slaiiz; Sep 8, 2021 @ 4:21pm
The Flaming Pike Sep 8, 2021 @ 3:08pm 
Hi, I'm not a tech expert but I would say the prime requisite is to have the fastest internet connection. Hosting is not that demanding for a computer - you can actually use very old computers with "poor" specs as permanent hosting devices, or microcomputers like the raspberry pi for example. You could take an old PC that you don't use and run Barotrauma's dedicated server executable and it would work even if that PC couldn't run the actual game since it would be too demanding.

Of course, if you plan on hosting and playing with the same computer, it has to be strong enough to load the game rather quickly. If you currently have frame rate issues while playing Barotrauma and you want to host, it will probably result in a bad hosting experience.

If you want the fastest internet ( and better hosting capabilities ) I would advice to connect the device you're using to host directly to your modem with an ethernet cable.

If you use wi-fi, it's best to use the 5ghz band instead of 2.4. 2.4 is used by many devices that can interfere with your connection and thus provoke random lag issues for people who play on your hosted game. Besides, 5ghz is just way faster. Also, make sure that your wi-fi connected device isn't too far from your router/modem. Walls will diminish the transmission's efficiency. If your PC can't switch between 2.4 and 5ghz, you might want to consider buying a wi-fi usb device that you connect on your PC's usb port, since they all offer 5ghz now. Those are between 15 and 50 bucks depending on which ones you buy. I think with 30 or 40 bucks you can get a very reliable one, but some which are cheaper can do the job as well. Just make sure they state you can use 5ghz band before you buy.

In any case, you can call your internet service provider and tell them you want to host a game. They may be able to offer good advice and even remotely set everything up for you - like port forwarding if necessary, for example.
Last edited by The Flaming Pike; Sep 8, 2021 @ 3:29pm
rgarrett Sep 8, 2021 @ 3:51pm 
918.3

Mbps download

17.9

Mbps upload

Latency: 7 ms

Processor: Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 CPUs), ~3.7GHz
Memory: 65536MB RAM ddr4

Card name: NVIDIA GeForce RTX 2070


i have those specs but sometimes my servers arent as good as i would like for other peoples ping.
rgarrett Sep 8, 2021 @ 3:54pm 
thanks for all the info ports already forwarded.

i might try to plug my pc directly into my modem instead of my router. i am the only one on the internet hardwired to the router and its a decent router if bypassing my router could improve i might try
Slaiiz Sep 8, 2021 @ 3:59pm 
Looking good, can't imagine you'd have any issues with that. Plus, Intel CPUs usually have better single-threaded performance so that's a good fit for the game. Just be close to the access point if using Wi-Fi.

Don't need to "bypass" your router, that .1 ms extra ain't gonna do nothing, plus there are inherent security risks in doing so, not worth it, don't bother (assuming it's the typical modem-router-firewall appliance provided by your ISP).
Last edited by Slaiiz; Sep 8, 2021 @ 4:09pm
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Sep 7, 2021 @ 6:58pm
Posts: 5