Game Development Community

dev|Pro Game Development Curriculum

T2D Minimal Starting Point

by David House · 03/19/2005 (2:51 pm) · 3 comments

Download Code File

I wanted to start a T2D project without any of the editors, menus, images, effects, etc. No sense in including things I don't need later on, so I trimmed out all the unwanted stuff from the T2D folder. The downloadable zip file contains a Minimal project to get you started. Just unzip the files to the /example directory under your Torque 2D SDK folder. It includes a RunMinimal.bat file as well.

To create a new project based on Minimal, you have 2 choices. Either having the project contained in the /example folder, or in a totally different directory structure. Here are the steps for either one:

-- Leaving the project in the /example folder --

- Copy/paste the Minimal folder
- Rename to whatever you want to call your project
- Copy/paste the RunMinimal.bat file
- Rename to Run.bat where is whatever you called your project above
- Edit the new Run.bat file and change the -mod Minimal to -mod , again changing the to whatever you called your folder above
- Now run the Run.bat file and your project will start


--- Moving the project to a different directory structure --

- Create your new target directory
- Copy the following folders to that new directory ( from the /example folder ):
common, Minimal
- Rename the Minimal folder in your target directory to whatever you want to call your project
- Copy the following files from the /example folder to your new target directory:
main.cs, OpenAL32.dll, T2D.exe
- Now open the main.cs in your target directory and make the following changes:
change $runWithEditors = true; to $runWithEditors = false;
change $defaultGame = "T2D"; to $defaultGame = ""; ( again, where is the name of the folder you changed from Minimal above )
- Now just run T2D.exe and your project will start


I know this is simple stuff, but maybe it will help someone?

#1
03/21/2005 (2:53 pm)
I'm sure quite a few of us have done this for our personal knowledge already but it's good you made it available as long it's only viewable by T2D owners. One thing I'd add, when using the -mod option, a few of the default game's cs files are run before the cs files corresponding to the mod are run. Use -game option to just run the mod's cs files.
#2
03/30/2005 (10:45 pm)
Hi,

What is -game & -mod ?

Thanks David about your help

topSurfeur
#3
04/19/2005 (10:27 am)
Cheers David - this is really handy for a newbie like me. As you said, its simple stuff, but it does save me a fair bit of messing around.

Cheers again,
Martin