Game Development Community

Modifing the engine?

by Danny Csaky · in Torque Game Engine · 11/20/2005 (11:02 pm) · 3 replies

In torque, what is considered to be the engine, what files are compiled into the exe, is it the folder named engine? and if I change any script located in the engine folder do i need to recompile the engine?

If so this would take a long time to test and debug a new script. I know that you might say thats why you should do it in torque script, but for some commands you can't

#1
11/21/2005 (12:25 am)
The engine itself is essentially the C++ code and changing the engine is a result of changing the C++ code. It is also the C++ code that is compiled into the exe. The folder named engine contains the engine source code, but is not used for the game itself once you distribute your product (AFAIK).

Once the engine is compiled, basically the game's "engine" is the .exe and .dll files in the root of the "example" directory. When launched, it loads your content and scripts located in subdirectories of the example folder. Your game will be one of these folders (eg. starter.fps, starter.racing, or in my case prototype.rpg), and within it will be all your scripts, images, DTS and DIF geometry.
#2
11/21/2005 (3:47 am)
You don't have to stick to the standard directory structure AFAIK, you can specify paths in various game files.
#3
11/21/2005 (5:31 am)
Some terms here that may be confusing you:

1) "script". This means specifically TorqueScript, not c++ code. TorqueScript is located in .gui and .cs files only (well, theoretically the mission file (.mis) is TorqueScript as well). Script is never compiled into your executable, and is not considered part of the "engine".

2) There is no "script located in the engine folder". This is not an absolute requirement, but demonstrates the need for the definition in 1) above I think.

C++ files (.cc/.h), as well as a few assembly (.asm), and a couple of lex/yacc files are all part of the executable compilation process ("engine"), and any changes to those files requires a build of a new executable. Changes in .cs and .gui files are TorqueScript, and are automatically byte-code compiled (which is very different from building a new executable) for you at runtime, assuming they are properly exec()'ed into your game.