How do I create a new game (Resurrected)
by Dave · in Torque Game Engine · 10/20/2005 (12:49 pm) · 10 replies
Hi all,
First of all, I have searched the forums and found several threads regarding this topic. However, I cannot make sense of the replies. From the look of the responses of the previous questioners, they didn't either. So I thought I'd try again and perhaps define what I want to do as clearly as I can. So...
I have just bought the product and used the installer to install it. I now seem to have a "demo" exe, which I built according to the getting started instructions. All of the tutorials I can find relate to this demo. What I want to know is "If I have a completely blank directory, how do I start to create a new game?" That is, I don't want to make a game based on the demo.
So for example with the Dark Game SDK (another 3D package I have), I create a main program and then start writing commands like maximise window, or create terrain, or move object or whatever. Then I compile it and the engine runs it.
1) How do I do that starting with a blank slate in Torque?
2) Where on earth is the engine? Is the demo the engine? If not, how do I start the engine on its own to use the tools?
Thanks very much,
T.
First of all, I have searched the forums and found several threads regarding this topic. However, I cannot make sense of the replies. From the look of the responses of the previous questioners, they didn't either. So I thought I'd try again and perhaps define what I want to do as clearly as I can. So...
I have just bought the product and used the installer to install it. I now seem to have a "demo" exe, which I built according to the getting started instructions. All of the tutorials I can find relate to this demo. What I want to know is "If I have a completely blank directory, how do I start to create a new game?" That is, I don't want to make a game based on the demo.
So for example with the Dark Game SDK (another 3D package I have), I create a main program and then start writing commands like maximise window, or create terrain, or move object or whatever. Then I compile it and the engine runs it.
1) How do I do that starting with a blank slate in Torque?
2) Where on earth is the engine? Is the demo the engine? If not, how do I start the engine on its own to use the tools?
Thanks very much,
T.
About the author
#2
Thanks,
Dave.
10/20/2005 (1:07 pm)
Thanks for the quick reply Chris. I'll take a look. How do you actually run the base tutorial though? Where is the engine?Thanks,
Dave.
#3
$defaultGame = "tutorial.base";
10/20/2005 (1:35 pm)
Change the $defaultGame in main.cs to tutorial.base, like so:$defaultGame = "tutorial.base";
#4
To start from a blank page all you need is your executable engine and a blank main.cs file. It's up to you how you structure your directories and how the game execution kicks off with main.cs. You will likely want to use at least the common mod from the example directory so you can use the in game editors to create your missions.
Hope that helps!
10/20/2005 (2:35 pm)
Dave Torque is structured to allow add-ons which makes the default directory structure somewhat difficult to grasp at first. The source directories are also somewhat confusing at first glance. The "demo" that you compiled is your engine and you can change the name of the executable via project settings in your compiler. The example folder where your demo is placed is the root folder of your game, anything in this folder and it's sub-folders is what you would package to distribute your game (minus any debug dlls). The engine when starting bootstraps by loading main.cs and executing it, this script has the job of setting up the path for script and data loads (or the "mods") and starting execution of your game by starting the scripts. Each of the subdirectories in the example folder are "mods" these mods contain code and game shapes, graphics, sounds and music. The "common" mod contains generic basic game functionality and contains the bulk of the torque script API and the editors. It is not strictly required for your game. The other folders contain tutorial or starter games which can be thought of as templates to get your game kick-started.To start from a blank page all you need is your executable engine and a blank main.cs file. It's up to you how you structure your directories and how the game execution kicks off with main.cs. You will likely want to use at least the common mod from the example directory so you can use the in game editors to create your missions.
Hope that helps!
#5
10/20/2005 (4:08 pm)
Also check Code sampler tutorial demos.garagegames.com/codesampler.com/trq_tutorial_base.zip
#6
Thanks again folks, I daresay I will become a common pest for the next few weeks....
Dave.
10/21/2005 (3:44 am)
Guys that was great, thank you very much. Craig your explanantion was exactly what I needed, it should be added to the "getting started" doc or the FAQ as it was such a clear and concise overview. I've pasted it into notepad and saved it as a reference.Thanks again folks, I daresay I will become a common pest for the next few weeks....
Dave.
#7
10/21/2005 (5:37 am)
Just an update to say that this short thread really opened my eyes. I can now understand the directory setup, what the engine is, I've downloaded and installed, and successfully run, the base tutorial. I can zip around the appropriate scripts, and find the general context and syntax of them fairly self-explanatory (although I don't have a clue about the API yet obviously). Great stuff! Thanks a million.
#8
10/21/2005 (5:03 pm)
A real good resource on how to create a game from scratch is the book "3D Programming All In One" by K. Finney. He covers file structures in this book for TGE. I also recommend getting his second book as well (Advanced 3D Programming All In One) , it picks up where the first book left off.
#9
10/22/2005 (7:48 am)
Oh no! I ordered the advanced book from Amazon thinking it was the first one, didn;t realise there were two. It takes weeks for stuff to get to Ireland from the UK, so that's why I was asking my questions. Damn, now I'll have to go and find the first book. Thanks mark, I would have been puzzled when the advanced book turned up and didn't do the basics!
#10
10/22/2005 (3:06 pm)
Well You should get the first book becouase second continues and expand what was previously "scratch the surface" in the first one :)
Torque 3D Owner Chris "DiGi" Timberlake