Starting from scratch
by Richard Jones · in Torque Game Engine · 02/13/2002 (7:34 am) · 7 replies
Hi,
Although its really useful to edit existing demos, when I start out on a project I like to start with a clean slate. Is there a framework available to start a "blank project"?
Although I have done DirectX programming in C++, I have come mainly from a VB background with which I have used a closed source DirectX engine. At the moment I'm having difficulty in establishing what code is for the engine and what is game specific. Is this right:
When I load up the SDK project workspace all the appropriate sub-projects are loaded. I assume all engine code is in "Torque lib files" and all code specific to a particular game is in another folder eg "Torque Demo files". And of course you have all the folders for the different tools as well.
I think the main difference between other engines I have used compared with Torque is the existence of the scripting language.
Does this mean most of the game code would actually be done in scripts? I assume it is rare you would need to edit the actual Engine code, and if you need to add additional features you add or edit classes in the game specific C++ directory?
I'm going to have a look at this scripting language now just to see how it interacts with the C++ code and hopefully everything will become clearer.
Am I on the right lines?...
Thanks very much
Although its really useful to edit existing demos, when I start out on a project I like to start with a clean slate. Is there a framework available to start a "blank project"?
Although I have done DirectX programming in C++, I have come mainly from a VB background with which I have used a closed source DirectX engine. At the moment I'm having difficulty in establishing what code is for the engine and what is game specific. Is this right:
When I load up the SDK project workspace all the appropriate sub-projects are loaded. I assume all engine code is in "Torque lib files" and all code specific to a particular game is in another folder eg "Torque Demo files". And of course you have all the folders for the different tools as well.
I think the main difference between other engines I have used compared with Torque is the existence of the scripting language.
Does this mean most of the game code would actually be done in scripts? I assume it is rare you would need to edit the actual Engine code, and if you need to add additional features you add or edit classes in the game specific C++ directory?
I'm going to have a look at this scripting language now just to see how it interacts with the C++ code and hopefully everything will become clearer.
Am I on the right lines?...
Thanks very much
About the author
#2
So what Visual C++ code is exclusive to the demo app? Or is all the demo specific code in scripts?
What's confusing me is the files in "Torque Demo files" and "Torque lib files" seem to reference the exact same files. Why is this needed?
In other C++ engines I have seen, when you work on your own app, the only reference to the engine itself is a dll in "External Dependancies". All the C++ code that is visible is specific to your app. If you want to edit the engine code then you load up a seperate project. Hence, starting a new project is easy. You reference the dll, and start with a blank file.
What I'm trying to get my head round is how you go about starting a new project using Torque. In other words, when GarageGames had the Torque engine in front of them and said: "Right, lets create a demo app", what process did they go through in Visual C++ to get started?
Thanks again.
02/13/2002 (10:06 am)
Thanks for your help.So what Visual C++ code is exclusive to the demo app? Or is all the demo specific code in scripts?
What's confusing me is the files in "Torque Demo files" and "Torque lib files" seem to reference the exact same files. Why is this needed?
In other C++ engines I have seen, when you work on your own app, the only reference to the engine itself is a dll in "External Dependancies". All the C++ code that is visible is specific to your app. If you want to edit the engine code then you load up a seperate project. Hence, starting a new project is easy. You reference the dll, and start with a blank file.
What I'm trying to get my head round is how you go about starting a new project using Torque. In other words, when GarageGames had the Torque engine in front of them and said: "Right, lets create a demo app", what process did they go through in Visual C++ to get started?
Thanks again.
#3
02/15/2002 (4:19 am)
Ok, I'm starting to get to grips with it now. Does everyone create their game using the Torque Demo as a framework or do some people start right from the beginning?
#4
Just my opinion.
02/15/2002 (4:32 am)
Most of us use the demo framework and modify it to get the results we desire. It takes care of the basics and saves alot of time getting started on your game. I'd say use what is given in the demo rewrite,discard and add what you want. And If you cant get the effect or performance etc you want with the scripts, tweak and add to the engine.Just my opinion.
#5
I'm probably being rather pedantic, but I'm just trying to understand the directory structure.
At the moment I'm creating my game (called Rocket Man) by editing the actual demo (I have a backup) so I have a rather crude directory structure:
RocketMan\Example\Fps
I downloaded a very good demo of Crime Force and the developer had the directory structure:
CrimeForceTest\CrimeForce
How did they (or anyone else) create their own directory names and still base their project on the demo? The reason I ask is that "example" and "fps" seems to be hard coded in the C++ project files so I can't see how you can create a new project that doesn't have those directories in.
So If I want to start a project based on the demo with the directory structure of
RocketMan
--Common
--RocketMan
--Show
instead of
RocketMan
--Example
----Common
----Fps
----Show
how do I do it?
This may be a silly question as well but I'll ask it anyway: :)
When you start adding your own C++ code, will that be effected when you download the latest official engine release?
Coming from a VB background I'm probably looking at all this from the wrong angle so any help would be great. I'm used to just referencing a dll and clicking File-New to get a new 3D engine project underway! :)
Thanks for your help.
02/15/2002 (2:40 pm)
ThanksI'm probably being rather pedantic, but I'm just trying to understand the directory structure.
At the moment I'm creating my game (called Rocket Man) by editing the actual demo (I have a backup) so I have a rather crude directory structure:
RocketMan\Example\Fps
I downloaded a very good demo of Crime Force and the developer had the directory structure:
CrimeForceTest\CrimeForce
How did they (or anyone else) create their own directory names and still base their project on the demo? The reason I ask is that "example" and "fps" seems to be hard coded in the C++ project files so I can't see how you can create a new project that doesn't have those directories in.
So If I want to start a project based on the demo with the directory structure of
RocketMan
--Common
--RocketMan
--Show
instead of
RocketMan
--Example
----Common
----Fps
----Show
how do I do it?
This may be a silly question as well but I'll ask it anyway: :)
When you start adding your own C++ code, will that be effected when you download the latest official engine release?
Coming from a VB background I'm probably looking at all this from the wrong angle so any help would be great. I'm used to just referencing a dll and clicking File-New to get a new 3D engine project underway! :)
Thanks for your help.
#6
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2119
I was starting to write something similar when I remembered about that.
Basically, Dont really worry about the directory structure at first.
You could copy the FPS directory and name it Rocketman and run the exe with -mod Rocketman etc. But for now your best bet is just make a backup of FPS and go in and start opening up the CS files. Read the new resource that Joe just posted on the TGE scripting language. You will find alot of information digging around the resources(hey, thats what they are there for).
As to your question about updating the source. Read the CVS documentation and if you have specific questions after that then ask again.
Just my opinion
02/16/2002 (4:39 am)
I'd suggest reading this: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2119
I was starting to write something similar when I remembered about that.
Basically, Dont really worry about the directory structure at first.
You could copy the FPS directory and name it Rocketman and run the exe with -mod Rocketman etc. But for now your best bet is just make a backup of FPS and go in and start opening up the CS files. Read the new resource that Joe just posted on the TGE scripting language. You will find alot of information digging around the resources(hey, thats what they are there for).
As to your question about updating the source. Read the CVS documentation and if you have specific questions after that then ask again.
Just my opinion
#7
Thanks for your info. I'm still a bit confused on how CVS works though. Lets say I want to add the GuiBitmapButton control (as specified in one of the tutorials) into the engine so I can use them in the interface for my project. To get this functionality you need to modify the guiCanvas.cc file among others. How can you make sure that the files you have modified do not get overwritten by an official engine update when you select Modify-Selection from WinCVS? If the solution is to miss out all user-modified files from the update, won't this cause inconsistencies?
There's obviously a solution to this issue otherwise the SDK would be completely un-workable. I just don't know what it is! :)
Thanks.
02/20/2002 (5:16 am)
Hi,Thanks for your info. I'm still a bit confused on how CVS works though. Lets say I want to add the GuiBitmapButton control (as specified in one of the tutorials) into the engine so I can use them in the interface for my project. To get this functionality you need to modify the guiCanvas.cc file among others. How can you make sure that the files you have modified do not get overwritten by an official engine update when you select Modify-Selection from WinCVS? If the solution is to miss out all user-modified files from the update, won't this cause inconsistencies?
There's obviously a solution to this issue otherwise the SDK would be completely un-workable. I just don't know what it is! :)
Thanks.
Torque Owner Greg Findlay
For adding new features it depends on the feature you want to add or edit. If you want to add AI or change the physics then you'd edit the engine. If you want to change the way a gun fires or add new weapons then you'd alter scripts. It all depends on what you want to do.
Alc