Game Development Community

Several dedicated servers on the same machine

by Bisher Tarakji · in Technical Issues · 03/23/2006 (4:13 am) · 7 replies

Hello
I am trying to run several TGE dedicated servers on the same machine. When I run a client, and use Query LAN, the client finds only one server.
What is the way to run several dedicated servers running the same game, on the same machine?

thanks and regards

#1
03/26/2006 (8:24 am)
Any answers for this post?

thanks
#2
03/26/2006 (9:40 am)
I don't know how to get query lan to work,
but it seems like if you set each one up on its own port
then connecting manually should work fine.

eg in the client:
new GameConnection().connect("localhost:");

is 28000 by default.
#3
03/26/2006 (11:32 am)
Thanks for the help.
But then, how would you run several dedicated servers with different port each?

thanks again
#4
03/26/2006 (11:35 am)
In server/defaults.cs:

$Pref::Server::Port = 28000;

you'll need to blow away prefs.cs & .dso in the same folder, too.


also,
as a general tool for getting things done,
i highly recommend getting a good find-in-files utility.

then you can jsut search everything for "28000" and very quickly find what you need.

best,
orion
#5
03/27/2006 (5:11 am)
So you would create a prefs.cs for each dedicated server?

best
#6
03/27/2006 (6:26 am)
No, change it in the default.cs as the prefs.cs is created out of the default.cs. You may want to delete the pref.cs and change in the file default.cs the line:
$Pref::Server::Port = 28000;
to for example:
$Pref::Server::Port = 28050;
to let this instance listen on port 28050.

Martin
#7
03/31/2006 (2:56 pm)
The port will change when you launch the server if the game finds the other one in use.

I.E:
Server 1 - 28000
launch server two, tries 28000, notices the port is bound, tries 28001, clear, binding port.

It's somewhere in one of the common files - forget where.