Game Development Community

dev|Pro Game Development Curriculum

Torque 2D MIT 2.0 Now Available!

by Michael Perry · 02/05/2013 (2:46 pm) · 117 comments






It’s here! The MIT licensed Torque 2D GitHub repo is ready!




The day you’ve all been waiting for has arrived. The MIT licensed version of Torque 2D is now available on GitHub. For those that just want to jump in and fork or download the engine, the link to the repository on GutHub is listed below. While it's cloning, keep reading to find out what makes Torque 2D a great choice for your game development?

Main repository with source code and twenty toys

If you just want to grab a precompiled version of the repository, you can download it here: Torque2D-2.0.zip. Note that this is not hooked up to the GitHub repository. This is just an export.

History of Open Source Torque 2D

Previously, Eric and I both posted blogs announcing our upcoming release of Torque 2D under the MIT license. If you haven’t already read through those, please head over to them now before continuing:
Torque 2D MIT Coming Soon
The Future of Torque 2D is Open Source!
Open Call: Join the Torque 2D Steering Committee

We are expecting that moving Torque 2D to a MIT license will greatly expand both the engine’s reach and our community. That means more developers to talk with, a larger audience for your tools and art packs, and more games, simulations and other products being created and released.


i.imgur.com/uoyyhuC.png i.imgur.com/FIMRY5q.png


What is Torque 2D?

In simple terms, Torque 2D is an extremely powerful, flexible, and fast engine dedicated to 2D game development. The following is a breakdown of the core facts about the engine:

Currently supported platforms:
* Windows
* OS X
* iOS

Support for new platforms is surely on the way. In fact, YOU get to help us decide what we should work on, be it Linux, Android, editors, or just simple bug fixing.

Languages:
* Core: C++
* Windows: C++ and Windows API
* OS X: C++, Objective-C, and Cocoa API
* iOS: C++, Objective-C, and Cocoa touch API

Main Features:
* Box2D physics
* Simple and flexible sprite system
* Composite system capable of rendering thousands of images and animations with little performance impact
* Integrated asset system that manages all your asset loading and unloading in an optimized manner
* Flexible module system that makes rapid prototyping a snap and code reusability a simple matter
* TexturePacker Support
* TAML serialization format (like XAML and XML)
* Batched rendering
* Multiple collision shapes
* Built-in unit testing framework, cross platform
* Solid behavior system for packaging reusable game logic that can be applied to multiple sprites in different projects

In addition to the core engine languages, you can script all your game play via TorqueScript. This is a C-like syntax language that is very simple to learn and utilize for your projects. Additionally, persistent files such as particles, levels, GUIs, and more are stored as "TAML" (Torque Application Markup Language). If you have ever edited XML or XAML in the past, you should feel more than comfortable with TAML.

Blazing Speed
Blazing fast performance on Windows, OS X, and iOS. On desktop platforms, you can have thousands of sprites, particles, and physics objects running at once without ever dipping below the 60 fps mark. While more limited, iOS hardware can run the engine at a solid 60 fps, even with hundreds of objects interacting on screen.

There is so much more, which you can read about in the blogs from Torque 2D architect, Melv May:

Torque 2D MIT Part 1
Torque 2D MIT Part 2
Torque 2D MIT Part 3
Torque 2D MIT iPad Truck Demo
Torque 2D MIT Live TAML


i.imgur.com/DtGL666.png i.imgur.com/HxwWefe.png


Working with Torque 2D

We have chosen to use GitHub to host the Torque 2D repositories. GitHub has become the place for open source projects on the Internet and makes it easy for the community to participate in growing a product. You’ll want to create a GitHub account if you want to do anything more than just download the current version of Torque 2D.

Currently there is only the master branch for Torque 2D’s source code and sandbox project (with 20 toys to play with). If you wish to use GitHub for your own development then you will want to fork the master branch and then clone it to your local computer.

If you’re not familiar with using the Git distributed revision control system, the GitHub website has a lot of useful information at help.github.com. I also highly recommend their GitHub for Windows and Mac tools. These tools make it easy to clone a branch to your computer to start working with the files, commit changes locally, and finally synchronize your changes back to your branch on GitHub. GitHub also provides a Subversion view into their repositories if you so desire. Additionally, internal GG developers have been using SmartGit for official development. It is one of the best paid solutions for Git clients you can find.

If you’re looking to just download the current version of Torque 2D to your computer, GitHub will automatically generate a ZIP archive for you at any time.

In addition to the master branch, a development branch will soon be available. This is where all of the bug fixing, system enhancements, and new features will initially be placed. This branch is not considered as stable as the master branch as it hasn’t gone through the full Quality Assurance process yet. If you want to have the latest version and are prepared for frequent updates then you’ll want to fork the development branch. Over time the work done in the development branch will be merged back into the master branch as outlined in the product’s roadmap (which, at this time, still needs to be defined by the Steering Committee).

Everyone has Read Access starting today! Just use the links at the top of this blog to get started.


i.imgur.com/fr0raHd.png i.imgur.com/pZCg3Mx.png


Discussing Torque 2D

The GarageGames web site has always been about the community, which really has been our greatest asset. With the move to an open source Torque 2D we will continue to offer a focal point for the community. Starting today, we will be moving to the following forum structure for Torque 2D:

T2D Beginners Forum
T2D Professional Forum

Both of these forums will be open to the public and you are free to post to them with your GarageGames account. However, these two forums will be moderated differently. Please see the sticky thread at the top of each forum for more information. The legacy engine forums will be set to private to avoid confusion for new users and those who do not wish to wade through years of posts on older tech.

Additionally, we have an IRC channel hosted by MaxGaming. You can access the channel using the following information:

Server: irc.maxgaming.net
Channel: #garagegames

I'm usually idling in the room under the handle [GG]Mich. This is a great way to get live feedback on your projects and get quick answers about Torque 2D. Anytime you see someone with a [GG] tag, it's safe to assume they work for GarageGames and will be happy to answer your questions.

i.imgur.com/vMCeIHs.png i.imgur.com/46f2AAy.jpg


How do I participate in growing Torque 2D?

In order for Torque 2D to grow we need your help and that of the community. Many of you have already been doing this by submitting bug fixes to the forums and new resources. I don’t believe that this needs to change, especially for engine modifications that may be too specialized to be included in the master or development branches.

However, if you would like to take a more active approach to help grow Torque 2D then you can jump in and start using GitHub’s community development features. For submitting bug fixes, and enhancement or feature requests GitHub has an easy to use ticketing system found under the Issues tab of a repository.

www.gnometech.com/torque/images/blog-2012-09-19/2012-09-18-GitHubIssues.jpg


From here you may create a ticket and give it an appropriate label (Bug, Feature Request, etc.) so it may easily be tracked. The Steering Committee will then review the ticket, add it to an appropriate Milestone, and assign the ticket to a user as required.

If you’d like to contribute code changes back into Torque 2D then you’ll want to fork the development branch. This creates a copy of the development branch for you to work with and check in your own changes. GitHub outlines how to fork a branch, keep it up to date with the source branch, and commit your own changes here: help.github.com/articles/fork-a-repo.

When you are ready to submit your code changes to Torque 2D you create a Pull Request. You may read more about pull requests here: help.github.com/articles/using-pull-requests.

www.gnometech.com/torque/images/blog-2012-09-19/2012-09-18-GitHubPullRequests.jpg


Specifically, you’ll create a Pull Request from your branch to the Torque 2D development branch. The Pull Request allows for a discussion of the proposed changes, and additional changes may be required before a Pull Request is accepted by the Steering Committee. You must ensure you have the full rights to the code you are submitting in order for us to include it in future updates.


i.imgur.com/aWt4J5W.png i.imgur.com/OACa9Y0.png



What is the Steering Committee?

To maintain the open source Torque 2D master and development branches, a committee has been set up that has Write Access and may respond to Pull Requests. This Steering Committee is dedicated to making the best core version of Torque 2D so that others can build upon a reliable foundation. To that end, one of the first tasks of the committee is coming up with the T2D roadmap based on the community’s input.

As of today, the Steering Committee consists of the following GarageGames members:
  • Melv May
  • Michael Perry
  • Eric Preisz
However, we don’t believe that the Steering Committee should only come from GarageGames. Over time we will fill the ranks of the committee with users like yourself. To find out more, see this blog for details: Open Call: Join the Torque 2D Open Source Committee

We look forward to all the exciting projects we will see using Torque 2D. Please do not hesitate to post blogs of forum posts often to show what you are working on. Now, what are you waiting for? START USING TORQUE 2D!!!


i.imgur.com/drW6fky.jpg i.imgur.com/KWm8g7k.jpg


Regards,
Mich
#61
02/06/2013 (11:47 am)
Congratulations. By the way, does anybody have a Visual Studio 2008 solution? I would be very grateful.
#62
02/06/2013 (1:28 pm)
Crazy demo. Some of the fx looked almost like 3d cloth sims. Impressive stuff.
#63
02/06/2013 (4:06 pm)
Can we get TAML is T3D too?

Edit:
That demo is like watching a summary video by Freddy Wong! Nice!
#64
02/06/2013 (4:09 pm)
@Frank - Let your voice be heard here. Remember, Torque 3D is also open source. Nothing is stopping anyone from integrating it. Get a crowd rallied behind the feature, get some folks working on it, then submit a pull request for the T3D master branch.
#65
02/06/2013 (8:36 pm)
Looks great guys, compiled and ran fine. The sandbox/toy mechanism is very cool, I cant quit playing with the monster truck...lol
#66
02/06/2013 (10:01 pm)
Hey I just downloaded Torque 2D MIT, how do I set it up? Are there any editors? this is my first time using it...
#67
02/07/2013 (2:17 am)
There's nothing worse than waiting for something cool and then getting tons of errors when you try to compile it for the first time. That's happened with so many different tools...

...but not this time! Build, run, woot!

Great job, guys! I can't wait to dig into this.
#68
02/07/2013 (5:30 am)
@Taylor:

Sorry, this version doesn't have editors. The devs are working on documentation which should definitely clear things up.
#69
02/07/2013 (5:41 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.
#70
02/07/2013 (7:30 am)
Would it be worthwhile to come up with a conversion starter script? Something that will take your old level files and assets and convert them to the taml / MIT format? It doesn't have to be perfect but something like this might help people make the jump from Torque2D/iTorque2D classic to MIT.

If any of you are working on such a script it would be nice to know.
#71
02/07/2013 (7:34 am)
Works like charm with VS 2012!
Great work guys!
#72
02/07/2013 (9:03 am)
^^That would be great! I'm not working on that, but it would be awesome to have!
#73
02/07/2013 (4:27 pm)
I've been looking at the code since yesterday and so far everything I've looked at in the toys is very well structured.

Simply : it's a pleasure to work with, thank you for this engine.
#74
02/07/2013 (6:51 pm)
Umm What happened to the updated code in the pull request section that had the updated project files for Vs 2012? They were thier earlier today and now all the issues that were being tracked along with the code fixes for them are gone..
#75
02/07/2013 (6:53 pm)
Uggg never mind.. Sigh gonna take me a bit to get used to github. I was in the wrong repo
#76
02/08/2013 (12:36 pm)
I like the fact that this engine is becoming more open, it appears as if this version will require significantly more knowledge to use, not only with the loss of the editor.

I began using torque 2d a number of months ago, and I have never touched the source code. Despite a few issues stemming from my own incompetence, I found that the old engine was extremely easy to learn, even for someone with little to no programming experience. reading this post and its comments, I cannot help but be disappointed with the amount of preexisting programming skill that this seems to require.

while I am not opposed to learning, I can't seem to find any sort of resource to allow a completely inexperienced user to learn. if someone could point me towards such a resource, it would be much apprecciated.

-James
#77
02/08/2013 (12:44 pm)
@James - Tutorials and docs are being planned now. I'll actually be releasing a short getting started video next week that will get you going. Until then, I highly suggest you study the script code for the default toys in this order:

1. SpriteToy
2. FlipToy
3. ScrollerToy
4. SceneLayerToy
5. CompositeSpriteToy
6. MoveToToy
7. RotateToToy
9. SphereStackToy
9. PyramidToy
10. ChanToy
11. AquariumToy
12. DeathBallToy
13. TruckToy

Review the script code for the above toys will guide you through Torque 2D's important systems, starting with the simplest and ending in the most complex.
#78
02/08/2013 (1:13 pm)
So excited to start working with this. And... I can! It works on OSX! Compiled, baby. Too cool.
#79
02/08/2013 (1:19 pm)
Thank you for replying, Mr. Perry.

I'm sure that those resources could be helpful, and I will indeed look into them, but what I lack is the knowledge on how to use any of this code in even the most rudimentary sense. I have never touched C++ in my life, and this wasn't at all an issue in the earlier versions of the engine, what with the editor and torquescript compiler therein, which made the engine great as a platform for first time programmers, but at this point I have no idea how even begin.

-James
#80
02/08/2013 (2:22 pm)
James,

Sounds like you should stick with Torque 2D classic for awhile. At least until the editors and documentation for the new T2D (MIT) are up and running.

Even though T2D MIT is the future, as I'm sure you know, we just released an update to the classic version of T2D (check My Account > My Products to download the update if you haven't already).

We made a decision to release T2D without editors, rather than make the community wait. Its not for everyone, but for a long long time there have been a lot of folks out there who have begged GarageGames to release early and more often. Not only have we done that, I think we've done one better by going open source from here on out. Frankly, its a pretty big cultural shift for the whole company (and I suppose a lot of our long time customers as well).