Multiple dedicated missions on one server?
by David Dougher · in Torque Game Engine · 01/26/2002 (7:38 pm) · 20 replies
Is there some way that you can set up multiple dedicated missions on one server? I would like to test multiple players going from one mission area to another without having to buy six systems to test it out. I can obviously shut down a mission and start another but I want the players to be able to freely move from one mission to another - this means all missions have to be "live" on dedicated gameservers to be reachable. So can a single machine host more than one dedicated mission?
If not (as I suspect is the case) how hard would it be to make it the case?
If not (as I suspect is the case) how hard would it be to make it the case?
About the author
Owner - Pariah Games, Adjunct Professor - Bristol Community College, Mentor - Game Design - Met School Newport, Mentor - Game Design - Met School Providence
#2
Dark
01/26/2002 (11:16 pm)
I think it's possible to run more than one server as long as you have each server running on different ports. I'm not sure if you can get 6 of them runnin on the same machine. You'll have to have a lot or ram.Dark
#3
So make 7 copies, and start teh 6 of them as servers (on different ports) and the use the last (on a different port) to join the game.
I have not tested this in any way but give it a try.
// Clocks out
www.flashthunder.com
01/27/2002 (12:09 am)
I think you have to make a new copy of your game on the server for each instance you want to run.So make 7 copies, and start teh 6 of them as servers (on different ports) and the use the last (on a different port) to join the game.
I have not tested this in any way but give it a try.
// Clocks out
www.flashthunder.com
#4
01/27/2002 (2:17 am)
You can create a huge mission with multiple missionareas.
#5
01/27/2002 (6:12 am)
While I am giving Karsten's reply a try, I'd like to hear a bit more about your reply fi. How do you create a large mission with multiple mission areas on the same machine?
#6
I was thinking of attempting to make massive maps but I fear that with the code I've already added games larger than what the engine was meant to take will get quite bandwidth intensive. It'd be smart to just hook a player up to the next server when they finish the mission. It'd just seem like they're loading a new level in a single player game.
Nice idea
01/27/2002 (6:36 am)
This is a good idea.I was thinking of attempting to make massive maps but I fear that with the code I've already added games larger than what the engine was meant to take will get quite bandwidth intensive. It'd be smart to just hook a player up to the next server when they finish the mission. It'd just seem like they're loading a new level in a single player game.
Nice idea
#7
When I tried the same thing launching from a single subdirectory the missions appeared to run correctly, but a check of the system memory told a different story. A memory leak resulted that would inevitably drain and crash the whole system over time. Even with no activity going on in the levels the leak was steadily progressing draining about 2K per second.
So it is possible. Developers will have to guard against memory leaks. I'm still interested in your idea fi. For those who have followed some of my other posts, Obviously I am interested in a large persistent world and I would be interested in any progress or issues any of you have encountered.
01/27/2002 (7:13 am)
To fill in a bit on answering my own question. Testing is a good thing. It appears that you can have multiple missions running simultaneously on the same system. I tried running multiple missions from a single torque subdirectory, and from multiple torque subdirectories. The results were interesting. When running from different directories the levels ran perfectly for the limited testing I did. I still have to spend some time working out the handoff so in this test case I simply started different servers and clients on the same system and selected different missions.When I tried the same thing launching from a single subdirectory the missions appeared to run correctly, but a check of the system memory told a different story. A memory leak resulted that would inevitably drain and crash the whole system over time. Even with no activity going on in the levels the leak was steadily progressing draining about 2K per second.
So it is possible. Developers will have to guard against memory leaks. I'm still interested in your idea fi. For those who have followed some of my other posts, Obviously I am interested in a large persistent world and I would be interested in any progress or issues any of you have encountered.
#8
People connect to a server and choose the mission (area) they want to play.
You could do this by using a SimGroup.
After you have selected your mission area, only objects and spawnspheres from this SimGroup would be handled.
In fact you put everything into a SimGroup for each mission, except sky, sun and terrain.
You can limit the size of precipitations, lightnings and waterblocks, so they are only visible in your current mission area.
It might look like this:
greetings
Daniel
01/27/2002 (8:43 am)
Using more mission areas than one is very similar to the Rocket Arena principle.People connect to a server and choose the mission (area) they want to play.
You could do this by using a SimGroup.
After you have selected your mission area, only objects and spawnspheres from this SimGroup would be handled.
In fact you put everything into a SimGroup for each mission, except sky, sun and terrain.
You can limit the size of precipitations, lightnings and waterblocks, so they are only visible in your current mission area.
It might look like this:
//--- OBJECT WRITE BEGIN ---
new SimGroup(MissionGroup) {
new ScriptObject(MissionInfo) {
name = "Your very first Command";
desc1 = "Illustrates large water volumes, underwater haze,";
desc2 = "and underground buildings.";
desc0 = "A simple test mission with lot\'s of water. ";
};
new Sky(Sky) {
position = "336 136 0";
rotation = "1 0 0 0";
scale = "1 1 1";
};
new Sun() {
direction = "0.57735 0.57735 -0.57735";
color = "0.988000 0.985000 0.980000 1.000000";
ambient = "0.500000 0.500000 0.500000 1.000000";
};
new TerrainBlock(Terrain) {
rotation = "1 0 0 0";
scale = "1 1 1";
squareSize = "8";
position = "-1024 -1024 0";
};
new SimGroup(Mission01) {
new ScriptObject(MissionInfo) {
name = "Mission01";
desc0 = "In this MissionArea, you have to fight, too";
};
new MissionArea(MissionArea) {
area = "-1024 -1024 2048 2048";
};
new Precipitation(Precipitation) {
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
};
new Lightning(Lightning) {
position = "-1024 -1024 1024";
rotation = "1 0 0 0";
scale = "2048 2048 1024";
};
new SimGroup(PlayerDropPoints) {
new SpawnSphere() {
position = "-88.0618 -20.8792 264.964";
rotation = "0 0 -1 86.1256";
scale = "1 1 1";
};
new SpawnSphere() {
position = "-67.6627 50.2865 263.196";
rotation = "0 0 -1 86.1256";
scale = "1 1 1";
};
};
new WaterBlock(Water) {
position = "-1024 -1024 17";
rotation = "1 0 0 0";
scale = "2048 2048 200";
};
new TSStatic() {
position = "-934.788 -25.0511 225.947";
rotation = "0 0 1 64.7442";
scale = "1 1 1";
};
};
};
//--- OBJECT WRITE END ---As you see, all objects for each mission (area) are placed in the SimGroup 'Mission01', including spawnspheres, waterblocks, shapes, weapons, items, etc.greetings
Daniel
#9
Still if it could be worked out it would allow you to reuse territory and what people could see in it.
I can see this as being a really interesting way to create time-travel scenarios. Same place/different time period. A lot of people wandering around and the server could tell who was in what period by the mission they were on.
It could then limit the people you could see in game and the player handles all the objects in the game environment. Of course, fighting would be a nightmare for the server, but for an exploratory world Like Myst it would be wild. Buildings rise and fall in various time periods while hundreds of people wander around in the same area unaware of the others passing thru the same space.
On a different note - I am unable to get -dedicated servers running. No matter how I format the -mission parameter it keeps saying that it is unable to find the mission. Can somebody post a simple dedicated code line with a mission that does connect and work, please?
I have tried everything from
torqueDemo.exe -dedicated -game fps -mission c:\torque\example\fps\data\missions\scorchedPlanet.mis
to
torqueDemo.exe -dedicated -mission scorchedPlanet
without success. I have tried with and without extension, pathways, driveletters, game parameter and with the slash symbol the other way. Nothing seems to work. I had it working before. Is this a new bug?
01/27/2002 (9:12 am)
Thanks fi. I think I see where you are going. I don't think it would work in this particular case since multiple people would be traveling between mission areas at the same time and the server would somehow have to distinguish between who is on what mission and allow/prevent who can see whom in a given area. Still if it could be worked out it would allow you to reuse territory and what people could see in it.
I can see this as being a really interesting way to create time-travel scenarios. Same place/different time period. A lot of people wandering around and the server could tell who was in what period by the mission they were on.
It could then limit the people you could see in game and the player handles all the objects in the game environment. Of course, fighting would be a nightmare for the server, but for an exploratory world Like Myst it would be wild. Buildings rise and fall in various time periods while hundreds of people wander around in the same area unaware of the others passing thru the same space.
On a different note - I am unable to get -dedicated servers running. No matter how I format the -mission parameter it keeps saying that it is unable to find the mission. Can somebody post a simple dedicated code line with a mission that does connect and work, please?
I have tried everything from
torqueDemo.exe -dedicated -game fps -mission c:\torque\example\fps\data\missions\scorchedPlanet.mis
to
torqueDemo.exe -dedicated -mission scorchedPlanet
without success. I have tried with and without extension, pathways, driveletters, game parameter and with the slash symbol the other way. Nothing seems to work. I had it working before. Is this a new bug?
#10
Go on: MOD/server/init.cs
As you see, you have to start as a dedicated server and you have to use the full path.
.EXE -dedicated -mission "fps/data/missions/test1.mis"
this should work. Not tested.
greetings
Daniel
01/27/2002 (9:59 pm)
Your parameters are parsed in your MOD/main.cs//--------------------
case "-mission":
$argUsed[%i]++;
if (%hasNextArg) {
$missionArg = %nextArg;
$argUsed[%i+1]++;
%i++;
}
else
error("Error: Missing Command Line argument. Usage: -mission <mission_name>");Go on: MOD/server/init.cs
function initDedicated()
{
enableWinConsole(true);
echo("\n--------- Starting Dedicated Server ---------");
// Make sure this variable reflects the correct state.
$Server::Dedicated = true;
// The server isn't started unless a mission has been specified.
if ($missionArg !$= "") {
// Need to intialize the network before starting up the server.
setNetPort($Pref::Server::Port);
createServer("MultiPlayer", $missionArg);
}
else
echo("No mission specified (use -mission filename)");
}As you see, you have to start as a dedicated server and you have to use the full path.
.EXE -dedicated -mission "fps/data/missions/test1.mis"
this should work. Not tested.
greetings
Daniel
#11
01/28/2002 (5:00 am)
Nope. Tried that. Thanks for checking it though. Even retried with the quotation marks. (I did forget those.) I believe that I have worked through most of the major combinations. If somebody has done it recently with the head version of the software I would like to see exactly what you put in.
#12
You could easily transition from one game server to another. When a player hits a trigger, you could send the client a remote script command with the ip of the server to connect to. The starting server could also save off stats to be reloaded by the destination server (or talk directly to it using the tcp object). With judicious use of client side gui management, it could be a pretty clean transition and would be "seemless" to the player. This could be totally scripted.
01/28/2002 (9:51 am)
You can run multiple game servers on a single machine. Each has to be assigned it's own port in a config file. The Dynamix host machines each had 5-6 servers running on it (Dual CPU machines). They were all run out of the same directory with different "-prefs" arguments to sepecify a config file for each game server. The config files set the server name, port, etc.You could easily transition from one game server to another. When a player hits a trigger, you could send the client a remote script command with the ip of the server to connect to. The starting server could also save off stats to be reloaded by the destination server (or talk directly to it using the tcp object). With judicious use of client side gui management, it could be a pretty clean transition and would be "seemless" to the player. This could be totally scripted.
#13
01/28/2002 (11:38 am)
Thanks Tim. That is exactly the direction we wish to go in.
#14
Oh for those who care... the correct sequence is from the torque/example directory (or whatever directory you use)
torqueDemo.exe -dedicated -mission fps/data/missions/name_of_your_mission_here.mis
01/28/2002 (3:40 pm)
I'm not sure why but the -mission is working perfectly on the machine I have at work and failing at my machine at home so to those who tried to help - thanks - it is obviously some kind of user or programming error on my part and I'll have to track it down.Oh for those who care... the correct sequence is from the torque/example directory (or whatever directory you use)
torqueDemo.exe -dedicated -mission fps/data/missions/name_of_your_mission_here.mis
#15
01/28/2002 (5:40 pm)
Thanks for posting any helpful hints about your own progress.
#16
I have one set to port 28000, the standard one, and one set to 3078. The problem is, the client *always* connects to the 28000 one, not matter what.
For the client I'm testing with, I changed ALL instances of 28000 in all the script files to 3078. Then I do a direct connect to the IP in question (not through master), and I still end up connecting to the server that's on 28000, and not the one that's on 3078. The server computer has its OWN IP address, but does sit on the same LAN as the client. They go through a hub to each other and the internet, not through a router.
Any ideas ?
02/02/2002 (6:12 am)
Well, I've tried running two copies of the server (from two different folders), and the dedicated servers run just fine.I have one set to port 28000, the standard one, and one set to 3078. The problem is, the client *always* connects to the 28000 one, not matter what.
For the client I'm testing with, I changed ALL instances of 28000 in all the script files to 3078. Then I do a direct connect to the IP in question (not through master), and I still end up connecting to the server that's on 28000, and not the one that's on 3078. The server computer has its OWN IP address, but does sit on the same LAN as the client. They go through a hub to each other and the internet, not through a router.
Any ideas ?
#17
torquedemo -connect myipaddress:3078 would fix the problem.
06/24/2005 (3:27 am)
I'm sure Ken already figured this out (it's been three years and he's a smart guy), but I happened to be integrating a seamless world server into TSE recently and came across this thread. On the odd chance that anyone else has this problem you can rig the server port into the IP address. So something like:torquedemo -connect myipaddress:3078 would fix the problem.
#18
08/28/2005 (4:04 pm)
I am also interested in hearing about the seamless server set-up. I am looking into this for my own game. Does anyone have any links?
#19
11/21/2005 (5:39 pm)
I thinks this seamless server set-up would be great!!! I built an entire gameworld in didifferent game engine and found that it was a nightmare trying to switch game areas. Please forward any updates or links about this. Can't wait!!
#20
11/01/2006 (9:39 am)
I am interested in this as well. Please advise if any one finds the solution to this. I want players to join in world ONE, and when they finish that level, switch to world TWO , and so on.
Torque Owner Architecture@Uni Melbourne