Game Development Community

Question on File Locations

by TheHidden · in General Discussion · 03/20/2010 (4:33 pm) · 7 replies

I followed a lecture (calling it CH3) in my GSP class to create and start a lab/game off with
"C:\Programs\TorqueTGE_1_5_2\example\demo\CH3"
I also started doing a practice lab from
http://tdn.garagegames.com/wiki/Beginner/Torque_Intro
which puts those files in
"C:\Programs\TorqueTGE_1_5_2\example\GameOne"
Now, I have found myself getting the two mixed up, plus trying to remember which shortcut accesses which stuff:

"C:\Programs\TorqueTGE_1_5_2\example\torque\demo.exe" (direct)
will access the GameOne folder.
"C:\Programs\TorqueTGE_1_5_2\example\torque\Demo.exe -game demo"
from shortcut "Torque Game Engine Demo" will access /demo/CH3.
"C:\Programs\TorqueTGE_1_5_2\example\torqueDemo.exe -game tutorial.base"
from shortcut "Tutorial Base" will access neither, just the default tutorial.base folder.

Questions if I may...
> What is the difference between these three methods?
> Am I able to move/run from a non-Torque folder like "c:\test\game\"?
> Is there a method to combine the two into one game (CH3 and GameOne)?

Hope I asked correctly what is in my head.

Thank you.

#1
03/27/2010 (10:35 am)
BUMPER.... I really only need an answer to the first two questions.
Thanks.
#2
03/27/2010 (11:25 am)
OK, lets begin...

A typical TGE-Game has a exe, some dll's, a main.cs and the three folders common, creator and <yourgame>. These three folders are called Mods.

When you start your exe, TGE looks for a main.cs located in the same folder where the exe is. In your case it is the main.cs in the example-folder.

When you look into this main.cs you will see the global variable $defaultGame.

Example: $defaultGame = "starter.fps";

In this case TGE will load the Mod starter.fps. You can also write
$defaultGame = "Gameone";
After that, TGE will not load the scripts in the folder starter.fps but the scripts in folder Gameone.

If you dont want to modify the main.cs you can also tell TGE to load the Mod via parameter.

torqueDemo.exe -game starter.fps
torqueDemo.exe -game Gameone
torqueDemo.exe -game OrSomethingElse

Quote:
Am I able to move/run from a non-Torque folder like "c:\test\game\

Yes. And i would recommend that because sometimes you have to modify some scripts in the folder common and/or creator.

If you want to do that:

- create a folder where you want to place the files
- copy the folders creator, common and Gameone(as example) to the new folder
- do the same with torqueDemo.exe, main.cs, glu2d3d.dll, OpenAL32.dll, opengl2d3d.dll, unicows.dll and wrap.dll

- and, if you want, DeleteDSOs.bat

- open main.cs from your new folder and modify the global variable $defaultGame.

That's it.
#3
03/27/2010 (7:29 pm)
Thanks for the answers. Big help!

I tried your suggestion about having a separate copy. I made "c:\temp\torque". I put in there a copy of everything you mentioned (and for me I have the game folder as “dappergame”) and changed the main.cs entry, but the program crashes. Opening up a can of worms am I.

To mention, this is on Vista Ultimate SP2. Could I have missed something?

For the crash, I let it bring up VS for the debugger and I get this:

"torqueDemo.exe": Loaded "C:\temp\torque\torqueDemo.exe", Binary was not built with debug information.
"torqueDemo.exe": Loaded "C:\Windows\System32\ntdll.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\kernel32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\advapi32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\rpcrt4.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\gdi32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\user32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\imm32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\msctf.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\msvcrt.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\winmm.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\ole32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\oleaut32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\oleacc.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\wsock32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\ws2_32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\nsi.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\lpk.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\usp10.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\dinput8.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\hid.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\setupapi.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\wintrust.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\crypt32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\msasn1.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\userenv.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\secur32.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\imagehlp.dll"
"torqueDemo.exe": Loaded "C:\Windows\System32\apphelp.dll"
The thread "Win32 Thread" (0xfd8) has exited with code 0 (0x0).
The program "[1500] torqueDemo.exe: Native" has exited with code -1073740791 (0xc0000409).
#4
03/27/2010 (7:30 pm)
The console.log has this:

//-------------------------- 3/27/2010 -- 15:15:28 -----
Processor Init:
Intel Pentium III, ~2.40 Ghz
(timed at roughly 2.42 Ghz)
FPU detected
MMX detected
SSE detected

Math Init:
Installing Standard C extensions
Installing Assembly extensions
Installing FPU extensions
Installing MMX extensions
Installing SSE extensions

Input Init:
keyboard0 input device created.
mouse0 input device created.
DirectInput enabled.

Initializing chunk mappings...
o "TEXT" maps to TextChunk
o "SCHK" maps to UnknownChunk
o "SCHK" maps to SimChunk
--------- Loading MODS ---------
Loading compiled script dappergame/main.cs.
===================
===================
Running Chapter 3 demo
===================
===================
Loading compiled script dappergame/client/defaults.cs.
Loading compiled script dappergame/server/defaults.cs.
Loading compiled script dappergame/client/prefs.cs.
Loading compiled script dappergame/server/prefs.cs.
Loading compiled script creator/main.cs.
Loading compiled script common/main.cs.

--------- Parsing Arguments ---------

--------- Initializing MOD: CH3 ---------
Loading compiled script dappergame/client/init.cs.
Loading compiled script dappergame/server/init.cs.
Loading compiled script dappergame/data/init.cs.
Loading compiled script dappergame/data/terrains/grassland/propertyMap.cs.
Loading compiled script dappergame/data/terrains/scorched/propertyMap.cs.

--------- Initializing FPS: Server ---------
Loading compiled script common/server/audio.cs.
Loading compiled script common/server/server.cs.
Loading compiled script common/server/message.cs.
Loading compiled script common/server/commands.cs.
Loading compiled script common/server/missionInfo.cs.
Loading compiled script common/server/missionLoad.cs.
Loading compiled script common/server/missionDownload.cs.
Loading compiled script common/server/clientConnection.cs.
Loading compiled script common/server/kickban.cs.
Loading compiled script common/server/game.cs.
Loading compiled script dappergame/server/scripts/commands.cs.
Loading compiled script dappergame/server/scripts/centerPrint.cs.
Loading compiled script dappergame/server/scripts/game.cs.

--------- Initializing FPS: Client ---------
Loading compiled script common/client/message.cs.
Loading compiled script common/client/mission.cs.
Loading compiled script common/client/missionDownload.cs.
Loading compiled script common/client/actionMap.cs.
dappergame/client/init.cs (49): Unable to find function initCanvas
Loading compiled script dappergame/client/scripts/audioProfiles.cs.
Loading compiled script dappergame/client/ui/defaultGameProfiles.cs.
Loading compiled script dappergame/client/ui/PlayGui.gui.
Could not load this GL function: glGenTextures
Could not load this GL function: glBindTexture
Could not load this GL function: glTexImage2D
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Failed to load profile bitmap ((null))
Could not load this GL function: glGenTextures
Could not load this GL function: glBindTexture
Could not load this GL function: glTexImage2D
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glGenTextures
Could not load this GL function: glBindTexture
Could not load this GL function: glTexImage2D
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Failed to load profile bitmap ((null))
Could not load this GL function: glGenTextures
Could not load this GL function: glBindTexture
Could not load this GL function: glTexImage2D
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glGenTextures
Could not load this GL function: glBindTexture
Could not load this GL function: glTexImage2D
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Could not load this GL function: glTexParameteri
Loading compiled script dappergame/client/ui/ChatHud.gui.
#5
03/27/2010 (7:49 pm)
Why does torquedemo.exe not see any other game folders made under /example, except for the GameOne from the Torque website? Also, why does "torqueDemo.exe -game demo" not see games in /example, nor load (client crashes) when trying to run GameOne which was copied from /example to /example/demo? What is the different with this "demo" folder over the "example" folder, which I am figuring right now is the "root" game folder?

Thanks again.
#6
03/28/2010 (2:16 am)
Quote:
Why does torquedemo.exe not see any other game folders made under /example, except for the GameOne from the Torque website?

Did you modify the global variable $defaultGame in main.cs?



Can you send me your project (as a zip, including the exe) you made under "c:temptorque"? I will look into it.
info@darkware.de

Do you have the latest DirectX 9.0c under Vista? Don't confuse with DirectX 10. As far as i know Vista and Windows 7 have both versions (9 and 10) installed parallel.
#7
04/12/2010 (7:20 am)
Yes, changed the variable a few times, but that is for opening a game right away, which does not work for the games in the other paths. It does not seem games in "\TGE_1_5_2\example" and ""\TGE_1_5_2\example\demo\" are not interchangeable.

I will clean out some needed stuff compress a game, and show you what I mean.

I also could not get it to run in a different folder, say c:\temp, but I got another post on that.

I will get to these and reply back first chance I get.

Thank you!