Game Development Community

A couple of questions

by Taylor Ringo · in Torque 2D Beginner · 02/06/2013 (11:20 pm) · 31 replies

Hi everyone, I just downloaded the Torque 2D MIT repository, how do I set it up with? I saw that I needed Visual Studio, I have Express 2012. Can I use that? Also are there any XMAL(or TAML) Editors I can use to design GUI and Level Design?

About the author

It all started in the 9th grade when i was going to use Platfrom studio, then Game maker, then Xna now I'm with Torque2D

Page «Previous 1 2
#1
02/06/2013 (11:52 pm)
A new update has been made to the code which works with VS Express. If you find the VS2012 folder, then it should work.

TAML can be used with a normal text editor. There are no visual editors at the moment.
#2
02/07/2013 (12:15 am)
oh okay how do I set up the SDK? do I just open the Solution? are there any documentation/tutorials?
#3
02/07/2013 (2:20 am)
You will need to build the solution. You will find a Torque_*.exe file in the main folder of the SDK. Running this file will launch the sandbox.

There is no further documentation available at the moment AFAIK, but surely it will follow.
#4
02/07/2013 (5:33 am)
Personally, I'd wait till the new editors get released before I use it... IF they get released. I'm just going to use T2D 1.8 for now.
#5
02/07/2013 (5:44 am)
@Taylor - We are planning out some documentation right now. The process should move quicker once we have a steering committee. I am also recording some getting started videos right now, which I will upload next week.

To get you going, though:

1. Clone the repository.
2. Open up the compiler project
3. Switch to release mode
4. Compile
5. Run the executable to see the sandbox
6. Start reading the scripts in each toy to find out how to create sprites, physics, particles, animations, and so on

Compiling on Windows:

1. You will need Visual Studio.
2. Open engine/compilers/VisualStudio 2010/Torque 2D.sln
3. Switch to release mode using the drop down. It usually starts in Debug

Compiling on OS X:

1. You will need Xcode
2. Open engine/compilers/Torque 2D.xcodeproj
3. Edit the schemes to switch to Release mode

If you are not a programer and have not done of any of this previously, shoot me an e-mail: michaelp@garagegames.com. I will send you some pre-buit binaries so you can start playing with the engine immediately.

For editing TAML, any text editor will do. You will have an easier time if you use something intended for XML editing. I like to use Visual Studio for Windows, since it treats TAML files like XAML automatically. This provides some basic text highlighting and collapsing. On OS X, I use AppCode. You can also use Xcode for editing TAML, which is my second selection.

#6
02/07/2013 (5:47 am)
Quote:Personally, I'd wait till the new editors get released before I use it... IF they get released.
That is certainly an option for people who have licensed the older engines. For newcomers, I would advise against it. Torque 2D MIT (2.0) is a far better engine, even without editors. I can understand the need for editors, but you can actually get a lot done without them in the new engine. If you want to become proficient with the new T2D, using the old engines will not help you much with the exception of learning TorqueScript.

Editors are a very important topic, which we will begin discussing as soon as the steering committee is formed. We are also going to be adding a link for you to post your voice and vote for the next feature that should be worked on.
#7
02/07/2013 (7:18 am)
Well then, maybe I'll just wait till the docs come out. :)
#8
02/07/2013 (12:51 pm)
Trying to wrap my head around the modules concept still. After looking through the Sandbox files it seems like levels will now be separate modules? Is this the correct way to organize your game going forward?

Is this going to be covered in the getting started vids?
#9
02/07/2013 (1:03 pm)
@Eric - Not quite. A module can be something as simple as holding a collection of assets like ToyAssets, to being as robust as a full game like the TruckToy. You can use them however you want. A level is really just a Scene. A Scene can be persisted to TAML, like any other object. You can load that TAML file and assign it to a SceneWindow. There's no correlation between levels or modules.

Our sandbox is a collection of toys, not a collection of levels. Each toy has its own logic. Some are very basic with their logic, like SpriteToy which will just show a couple of sprites. Others have more complex logic with its own control scheme and physics resolution, like DeathBallToy.
#10
02/07/2013 (1:10 pm)
And yes, I'll be covering the concept of modules in the getting started videos.
#11
02/07/2013 (1:53 pm)
Thanks for the info Mich, makes more sense now. Can't wait to dig deeper into the new engine!
#12
02/07/2013 (2:35 pm)
@Eric - Great! I'm glad others are as excited as I am to be working with it.
#13
02/07/2013 (5:32 pm)
Played around a bit with the engine for a few hours last night. This is the way I approached it.
- I made a copy of the main.cs file in the root folder. [This step can probably be avoided, but I would like to retain the original file.]
- Copied the Sandbox module and renamed it. Modified all references to Sandbox within the main.cs files,the module.taml file and the scene.cs file.

Managed to get a new Sandbox running. Not sure if this is the best way to create a blank slate (sort of) to start writing my code.
#14
02/07/2013 (8:35 pm)
@Andy - How "blank" do you want the slate to be? The sandbox is not exactly a clean start. It's a great project that allows you to piece together multiple modules, but it does contain code that may not be useful to your own game project. It's a showcase with a lot of useful code, both in the toys and in the sandbox module. It's not exactly what I would start with in creating a fresh game, though. So again, do you want the barest of bare minimum?
#15
02/07/2013 (10:47 pm)
@Michael - I would love to see the blank slate that you guys come up with. I am just trying to find the easiest way to come up with my own code. But am sure there is a much efficient way of doing it.
Again, I wanted to make use of the T2D MIT code and that's one way my tiny brain suggested.

Looking forward to the videos & documentation.
#16
02/08/2013 (12:24 am)
@Andy - I just uploaded a bare module on my public Github repo that I made yesterday. I don't know if it is the "barest of the bare", but at least it is something until an official blank module or a project generator is available.

github.com/t2Dtutorials/T2D-Modules

edit: hmm, there should be a blank assets and fonts folder in there too, but it looks like Github didn't publish those, will have to figure that out.
edit2: fixed
#17
02/08/2013 (12:54 am)
Cheers Mike. Mine is a bit similar... but it had the additional files.

I think you should also add a note (Readme) that the main.cs in the T2D folder should point to this module, so that it can be launched. I suppose this is needed

// Load t2dtutorials module.
ModuleDatabase.LoadExplicit( "Template" );
#18
02/08/2013 (1:51 am)
Seems you guys are on top of things here but let me jump in for others perhaps reading this.

If you are pushing examples out to folks, prototyping or even showing a new feature or bug then I'd recommend just adding a module as a toy so you can pass it to folks with minimal changes i.e. just copy the toy into the modules folder and select it from the Sandbox. Note that you can also change, in the "preferences.cs" that is created in the root folder when you exit the Sandbox, to select the start-up module toy and its version.
$pref::Sandbox::defaultToyId           = "TruckToy";
$pref::Sandbox::defaultToyVersionId    = 1;
You can find the defaults for these (which are used in the absence of any "preferences.cs" or specific setting) in:
modulesSandbox1scriptsdefaultPreferences.cs

If you are not interested in the sandbox then you can just write yourself an entry module just like Mike/Andy have. You don't need to use the "modules" folder either. Inside the root "main.cs" you'll see a line like:

// Scan modules.
ModuleDatabase.scanModules( "modules" );

You can change this to be your own folder. You can also perform this action as many times as you like i.e. scan the "modules" folder and another folder such as "MyModules". There are no mandatory modules that the engine relies upon so you can do whatever you like here.

Following that scan you can load-up a module either by group or as in the example we provide, explicitly. This is done by the line:
// Load sandbox module.
ModuleDatabase.LoadExplicit( "Sandbox" );

You just place the module-Id there instead of "Sandbox" i.e. if your module Id is "Project1" then just put "Project1" in there.

Also note that you can version your modules. Note that each module is in a sub-folder of "1". If you copy your module into a sub-folder of (say) "2" and modify the "module-definition" XML file to have a version-Id of "2" then you can load-up that version specifically with:

// Load sandbox module.
ModuleDatabase.LoadExplicit( "MyProject", 2 );

Caution: If you have more that one module and don't specify the version then the system will load the latest i.e. it doesn't default to one, it actually defaults to loading the latest version of any module.

Also note that you can do this in the Sandbox and it'll show anything that's not version 1 with a "v2" or "v3" etc in its description.

Hope this helps.
#19
02/08/2013 (2:03 am)
Thanks Melv.
The intention is not to rush you guys with the documentation, but just to help others play around with the engine...

With the combination of Michael's, Mike's and your post, users should be get a headstart with their efforts.
#20
02/08/2013 (6:26 am)
Thanks for taking the time to write that up Melv.

Spent a good deal of time yesterday crashing the release build until I figured out the scene window needed a gui profile.

Plus, a huge thank you for the trace function (was that in previous versions of T2D?) and the echo info for the module and asset system. It has really helped while figuring things out.
Page «Previous 1 2