Game Development Community

How to Increase Online Player Limitations

by Jake Kazmierczak · in Torque 3D Beginner · 08/06/2012 (2:21 pm) · 5 replies

How do I increase the amount of players that can be in one map online from 64 without rewriting the engine. Can we have 200 players on one map without great difficulty?
Thanks.

#1
08/07/2012 (2:25 am)
I don't think that there is an enforced limit.

in core\scripts\server\defaults.cs there is $Pref::Server::MaxPlayers = 64;
but you can change that to whatever you like.

The limiting factors that decide the max number of players that you can support are the speed of the machine running the server, and the bandwidth available to you. You will have to experiment :)

When you've discovered the limit for your particular setup, and you still need to increase the number of players that you can support, you will have to dive into the engine and start optimizing the networking some more.
#2
08/07/2012 (7:56 pm)
I think Tribes 2 was standard up to 128 players.

It's more down to the resources of the server as Guy mentions.

In the engine side of things you can try and remove any packet information you don't use in your game to further optimise it.
#3
08/08/2012 (12:07 am)
The only "hard" limit on player count in the engine is actually unintentional. The ServerQuery struct (see serverQuery.cpp) stores the max players for each server in a U8 variable meaning any servers with more than 255 players will overflow the var resulting in an inaccurate report. It could probably be fixed by making the variable a U16 or U32 (or not using the server query functionality at all).

Otherwise, Guy is right. The real limitation will be based on the hardware/bandwidth you have access to.

Aiming for 200 players per server is a decent starting point and shouldn't be difficult to reach with some engine changes. Here are some tips to point you in the right direction:

* Look at the packUpdate/unpackUpdate methods in the ShapeBase and Player classes to see what's being sent over the wire. Remove anything that's not necessary for your game. Your goal is to send as little data as possible.

* Tinker with the $pref::Net::packetSize, $pref::Net::packetRateToServer and $pref::Net::packetRateToClient variables to find the best balance for your game.

* Change the range at which objects are scoped to players. Vince Gee has a resource that does this.

* Tweak GameBase::getUpdatePriority() weightings to better fit your game. I've talked about getUpdatePriority()'s purpose in past posts (as have others) so I won't bother re-explaining it here.

#4
08/08/2012 (7:18 am)
That is great, 200 I think would do very well for what we are trying to do. Yah, I only know the basics to C plus plus and I'm planning on learning some networking plus Torque Script. I just wanted to get an idea of what we could do without dedicating too much time on just engine editing. Would 200 players work for a persistent world MMO FPS? Just curious if this makes a big difference or is this irrelevant.

Off topic, I was wondering about C plus plus in general. I watched a whole series of YouTube videos and learned the basics of C plus plus. To clear things up, after learning the basics to actually do something with C plus plus besides basic calculations and having the cmd screen I have to learn and install libraries right? Just wanted to make sure.

Thanks.
#5
08/12/2012 (1:09 am)
Quote:
I watched a whole series of YouTube videos and learned the basics of C plus plus. To clear things up, after learning the basics to actually do something with C plus plus besides basic calculations and having the cmd screen

u have watched video tut.which gives almost same type of assistance from teacher.

but i have learned only from 3 books.no teacher.
so far no problem to do the c++ work with t3d's common classes.only tuff and rough things is t3d's template,iterator...related things.most of t3d's these things are in short cut coding.
hard to understand for me.try to learn them more in deep.that is why i am trying now.

for libraries read official instruction(in Documentation folder)environment setup for visual studio.also u need to learn pyhsx/bullet set up if u want to use them