Game Server without GUI?
by Tim Hutcheson · in Torque Game Engine · 04/11/2005 (8:20 am) · 16 replies
Is there a simple set of changes that can be made to allow running a server without an expensive game capable graphics card being used just to handle the GUI? I thought I saw a thread about this when I first studied all the threads after buying the engine but came seem to search it up now.
tnx,
tnx,
About the author
#2
04/11/2005 (8:35 am)
Thanks Anthony, but will that work if I just want to run the server locally, without connecting players through the master server?
#3
04/11/2005 (8:45 am)
Yes it works fine.
#4
So if I form a shortcut
C:\Torque\SDK\example\torqueDemo.exe -dedicated -mission file:///C:/Torque/SDK/example/starter.racing/data/missions/racing.mis
it should work?
But it doesn't...console log says it can't find the mission file in stage 2 load.
04/11/2005 (9:07 am)
Hmm...So if I form a shortcut
C:\Torque\SDK\example\torqueDemo.exe -dedicated -mission file:///C:/Torque/SDK/example/starter.racing/data/missions/racing.mis
it should work?
But it doesn't...console log says it can't find the mission file in stage 2 load.
#5
04/11/2005 (9:12 am)
C:\Torque\SDK\example\torqueDemo.exe -dedicated -mission "starter.racing/data/missions/racing.mis"
#6
04/11/2005 (9:15 am)
Ahhh...that's what I started with but w/o quotes and then started guessing all sorts of possibilities. tnx
#7
04/11/2005 (9:42 am)
Try "~/data/missions/racing.mis"
#8
04/11/2005 (9:49 am)
Nope. Doesn't work. I've tried many of the usual suspects, like .\starter.racing\data\missions\racing.mis with and w/o quotes etc.
#9
Torque apps expect the working directory of the OS to be the directory that the application itself resides in, but for some reason Windows sometimes allows a working directory to be (not) set in a different location...and TGE won't allow that (for security purposes).
04/11/2005 (10:19 am)
You need to have your shortcut define the working directory of the application as part of the shortcut. I can't remember the specific syntax, but there is a way to do it.Torque apps expect the working directory of the OS to be the directory that the application itself resides in, but for some reason Windows sometimes allows a working directory to be (not) set in a different location...and TGE won't allow that (for security purposes).
#10
Is that what you mean?
BTW, I've searched the source (using .Net IDE) for the string "LOADING MISSION", which appears in the console log just before the problem appears, and I can't find it in either the c++ or the .cs files. If I knew where to start I would just step this through with the debugger until I find the actual parsing of the mission string. Any idea where this is? Can't find where the code implementing the script "loadMission" function is either.
Rats.
Thanks again all.
04/11/2005 (10:31 am)
The Start In field of my shortcut is set to C:\Torque\SDK\exampleIs that what you mean?
BTW, I've searched the source (using .Net IDE) for the string "LOADING MISSION", which appears in the console log just before the problem appears, and I can't find it in either the c++ or the .cs files. If I knew where to start I would just step this through with the debugger until I find the actual parsing of the mission string. Any idea where this is? Can't find where the code implementing the script "loadMission" function is either.
Rats.
Thanks again all.
#11
Edit: and if your start dir is set like you said, try using starter.racing\data\missions\racing.mis
(no quotes, windows slash style. if that doesn't work, try quotes. I personally never run a dedicated server on windows, so I'm not sure of the exact syntax myself).
04/11/2005 (11:10 am)
The mission loading script is in /example/common/server/missionLoad.cs.Edit: and if your start dir is set like you said, try using starter.racing\data\missions\racing.mis
(no quotes, windows slash style. if that doesn't work, try quotes. I personally never run a dedicated server on windows, so I'm not sure of the exact syntax myself).
#12
Is that what you mean?
BTW, I've searched the source (using .Net IDE) for the string "LOADING MISSION", which appears in the console log just before the problem appears, and I can't find it in either the c++ or the .cs files. If I knew where to start I would just step this through with the debugger until I find the actual parsing of the mission string. Any idea where this is? Can't find where the code implementing the script "loadMission" function is either.
Rats.
Thanks again all.
04/11/2005 (11:41 am)
The Start In field of my shortcut is set to C:\Torque\SDK\exampleIs that what you mean?
BTW, I've searched the source (using .Net IDE) for the string "LOADING MISSION", which appears in the console log just before the problem appears, and I can't find it in either the c++ or the .cs files. If I knew where to start I would just step this through with the debugger until I find the actual parsing of the mission string. Any idea where this is? Can't find where the code implementing the script "loadMission" function is either.
Rats.
Thanks again all.
#13
This lookup is only used during -dedicated startedup but not when loading the game as single player.
So how is it that the two strings "starter.racing/data/missions" and "racing.mis" are not in the dictionary when strarting in -dedicated mode? Or to put it the other way, how are they supposed to get into the dictionary?
Sorry if I turn out to be obtuse about this but it's my first foray into the guts of TGE.
Does anybody else get this particular mode of start up to work correctly? It just stock TGE demo.
Tim
04/11/2005 (12:25 pm)
So far, it seems like ResManager::find (const char *fileName) never finds the target file when using the dictionary to look it up, since dictionary.find (path, file) retuns null. The strings seem perfectly formed relative to any other strings it looks up correctly.This lookup is only used during -dedicated startedup but not when loading the game as single player.
So how is it that the two strings "starter.racing/data/missions" and "racing.mis" are not in the dictionary when strarting in -dedicated mode? Or to put it the other way, how are they supposed to get into the dictionary?
Sorry if I turn out to be obtuse about this but it's my first foray into the guts of TGE.
Does anybody else get this particular mode of start up to work correctly? It just stock TGE demo.
Tim
#14
Quite honestly, I thought that was the -only- way to do it, but assumed that I was wrong based on what people said above.
You may want to try a clean make and build with the dedicated build flag, and try it then, other than that I don't know what to tell you, other than WFM on linux and our project...
04/11/2005 (12:38 pm)
Well, the only other thing that this thread doesn't talk about is that for our scenario at least, we do a make dedicated on our executable before we use -dedicated as a command line argument.Quite honestly, I thought that was the -only- way to do it, but assumed that I was wrong based on what people said above.
You may want to try a clean make and build with the dedicated build flag, and try it then, other than that I don't know what to tell you, other than WFM on linux and our project...
#15
#if defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD)
so it's not likely having any affect on this.
tnx
04/11/2005 (12:54 pm)
Yeh, it's weird. the DEDICATED build flag is only used inside of#if defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD)
so it's not likely having any affect on this.
tnx
#16
using simply
-dedicated -game starter.racing -mission "starter.racing/data/missions/racing.mis"
04/11/2005 (2:15 pm)
For the record, it works!!! I deleted the entire Torque directory and rebuilt it from scratch. So I have no clue what I had messed up but thanks to all that tried to help. using simply
-dedicated -game starter.racing -mission "starter.racing/data/missions/racing.mis"
Associate Anthony Rosenbaum
that will start a dedicated server and load the mission file.