Do I have the right approach
by Christian Boutin · in Torque Game Engine · 10/23/2004 (7:28 am) · 5 replies
I got the Torque engine a couple of weeks ago and after toying inside of it (using the provided VC6 workspace) I'm ready to start a project.
As a third-party developer who may rely on getting new versions of the Torque engine as the project advances, I feel that a priority is to make sure I leave the torque code tree alone and add whatever code I need to add in my own project. That way I can always get latest builds of torque without wondering if I'm going to delete any change I might have made.
I decided to create a project at a completely different place and include the Torque Lib project as a dependency. After tweaking alot of paths (like turning many $(WkspDir) into $(ProjDir) for special build commands) and including all the lib's dependencies into the project I finally managed to compile it all. I only added one .cpp file that only has a single line : "int a=0;" just so that it's not completely empty.
This is where it gets weird. The executable VC6 spits out is 2.5 megs in release, 5.6 in debug. While when I recompile the Torque Demo the executable is 3.2 megs in release and 7.7 in debug. (the demo.exe provided with the torque demo package is a mere 1 megabyte, what was it compiled with I wonder).
When I try to run my newly made executable in my game's folder I get an fatal error at "console.cc@941 Error, Null setData fn". Now before I plunge in and try to debug this (or simply revert back to making Torque Demo the main project and just add files to it), I'm just curious as to how people usually build their workspace.
Do you use Torque Lib as a lib that you link to to power your games? Or do your games simply include all the sources of Torque Demo plus the additionnal sources for your games? Or do you simply modify the Torque Demo files and run a windiff everytime there's a new Torque build? Lastly, are there any articles that discuss this topic (I didn't find any).
Thanks alot!
Christian
As a third-party developer who may rely on getting new versions of the Torque engine as the project advances, I feel that a priority is to make sure I leave the torque code tree alone and add whatever code I need to add in my own project. That way I can always get latest builds of torque without wondering if I'm going to delete any change I might have made.
I decided to create a project at a completely different place and include the Torque Lib project as a dependency. After tweaking alot of paths (like turning many $(WkspDir) into $(ProjDir) for special build commands) and including all the lib's dependencies into the project I finally managed to compile it all. I only added one .cpp file that only has a single line : "int a=0;" just so that it's not completely empty.
This is where it gets weird. The executable VC6 spits out is 2.5 megs in release, 5.6 in debug. While when I recompile the Torque Demo the executable is 3.2 megs in release and 7.7 in debug. (the demo.exe provided with the torque demo package is a mere 1 megabyte, what was it compiled with I wonder).
When I try to run my newly made executable in my game's folder I get an fatal error at "console.cc@941 Error, Null setData fn". Now before I plunge in and try to debug this (or simply revert back to making Torque Demo the main project and just add files to it), I'm just curious as to how people usually build their workspace.
Do you use Torque Lib as a lib that you link to to power your games? Or do your games simply include all the sources of Torque Demo plus the additionnal sources for your games? Or do you simply modify the Torque Demo files and run a windiff everytime there's a new Torque build? Lastly, are there any articles that discuss this topic (I didn't find any).
Thanks alot!
Christian
About the author
Recent Threads
#3
To clarify; the Torque "demo" is only a demo because of the scripts (*.cs). Take away the scripts and you've got the Torque Game Engine (or Torque Shader Engine). Sure, there are some specific C++ files for specific things you may not require but they are probably few and far between.
To then answer your question; add your own custom C++ files and drive them using the scripts, either modifying the existing packages or develop your own if the FPS script-architecture doesn't suit.
The Torque Library should, for most purposes, be ignored as it's only there to support some of the library tools. It isn't a method to utilitise components of the TGE.
As an example; take the stock TGE, add your own C++ file (into your own directory off the 'engine' directory), customise your scripts and you're golden.
I would highly recommend that you go through the existing example and understand what's going on, bearing in mind what I've said. Don't go looking for the elusive bare-bones C++ application, it doesn't exist. As I've said, the C++ demo is only a demo because of the scripts and although this isn't totally accurate, it's good basis for getting started. Take the stock TGE and add a blank "main.cs" script file and you've got a bare-bones app although it won't be very useful.
As far as I understand, there are different genre packages such as turn-based, RTS being developed and most of this work is script-based.
Hope this helps,
- Melv.
10/23/2004 (7:40 am)
Christian,To clarify; the Torque "demo" is only a demo because of the scripts (*.cs). Take away the scripts and you've got the Torque Game Engine (or Torque Shader Engine). Sure, there are some specific C++ files for specific things you may not require but they are probably few and far between.
To then answer your question; add your own custom C++ files and drive them using the scripts, either modifying the existing packages or develop your own if the FPS script-architecture doesn't suit.
The Torque Library should, for most purposes, be ignored as it's only there to support some of the library tools. It isn't a method to utilitise components of the TGE.
As an example; take the stock TGE, add your own C++ file (into your own directory off the 'engine' directory), customise your scripts and you're golden.
I would highly recommend that you go through the existing example and understand what's going on, bearing in mind what I've said. Don't go looking for the elusive bare-bones C++ application, it doesn't exist. As I've said, the C++ demo is only a demo because of the scripts and although this isn't totally accurate, it's good basis for getting started. Take the stock TGE and add a blank "main.cs" script file and you've got a bare-bones app although it won't be very useful.
As far as I understand, there are different genre packages such as turn-based, RTS being developed and most of this work is script-based.
Hope this helps,
- Melv.
#4
10/23/2004 (8:07 am)
Thanks alot for the tips. I must admit that this "bare-bones C++ app" is what I was aiming for. I'll just change my approach. I've already got most of the scripting part figured out though, I already made my own GUI and environment, shapes and objects using the demo alone (before buying it). I'll go back to the drawing board and come up with a new workspace. Thank you all.
#5
10/23/2004 (8:09 am)
Thanks alot for the tips. I must admit that this "bare-bones C++ app" is what I was aiming for. I'll just change my approach. I've already got most of the scripting part figured out though, I already made my own GUI and environment, shapes and objects using the demo alone (before buying it). I'll go back to the drawing board and come up with a new workspace. Thank you all.
Torque Owner Stefan