Game Development Community

dev|Pro Game Development Curriculum

Torque 2D 3.0 COMPLETE!

by Michael Perry · 05/03/2014 (5:13 am) · 62 comments

Torque 2D 3.0 Official Release

On February 5th, 2013, Torque 2D 2.0 was released to the world for the first time under an open source MIT license. Between then and now, over a year has passed with a lot of learning and adjusting to an open source development model. Slowly but surely, feature after feature was added to the engine, bugs were fixed, and documentation was written. Today we can proudly present to everyone Torque 2D 3.0.

As always, the source code is available via the Torque 2D Github repository. Precompiled binaries for Windows or OSX can be downloaded from the Release page.

Before diving into the details, the Steering Committee would like to thank once more everyone in the community who helped make this release possible. With the push from development to master, the contributors page on Github has finally been updated to reflect the great work Torque developers have put into the engine.

What’s New in 3.0


The following is a summary of the major changes and additions:

Android, Linux, and Web Support
The major focus of this release brings several additional platform publishing options for your game or application. T2D truly delivers on cross platform support, making it easy with one codebase to reach many different audiences on many different devices.

64-bit Applications
In addition to the standard 32-bit support we’ve always had, the engine can now compile as a native 64-bit application for platforms that support it.

Named Image Cells and Frames
Until now, image frames have always been referenced using a numerical index. Now, developers have the opportunity to give explicit ImageAsset cells specific names. Those names can then be used with all SceneObject derived classes that consume ImageAssets.

<ImageAsset
    AssetName="soldierWalk"
    ImageFile="@assetFile=soldierWalk.png">	
	<ImageAsset.Cells>
		<Cell RegionName="walk1" Offset="2 2" Width="103" Height="66"/>
		<Cell RegionName="walk2" Offset="179 100" Width="37" Height="35"/>
		<Cell RegionName="walk3" Offset="2 70" Width="65" Height="31"/>
		<Cell RegionName="walk4" Offset="161 137" Width="36" Height="41"/>		
	</ImageAsset.Cells>
</ImageAsset>

<AnimationAsset
    AssetName="soldierWalkAnim"
    Image="@asset=ToyAssets:soldierWalk
    NamedAnimationFrames="walk1 walk2 walk3 walk4"
    AnimationTime="1" />

Skeletal Animation
We are pleased to announce that an initial implementation for skeletal animation is now available. The first format supported comes from the animation program Spine.

t2dtutorials.com/img/SpineToy.png
Leap Motion Controller
The Leap Motion controller takes input from hands, fingers, and small tools that are moved just above its surface and provides their absolute position and rotation through the Leap SDK. Torque 2D offers built in integration and now includes a demo toy to show off how it works.

t2dtutorials.com/img/LeapToy.png
Xbox 360 Controller

Gamepad support has always been part of the engine, but now the necessary code to use an Xbox 360 controller with T2D has been added.

JSON Format for TAML
Joining XML and binary, developers can how serialize their game objects and scenes in the JSON format, with the engine being able to read-in or write-out this format as easily as the others.

{
    "Sprite": {
        "SceneLayer": "31",
        "Size": "100 75",
        "BodyType": "Static",
        "BlendColor": "SlateGray",
        "Image": "@asset=ToyAssets:highlightBackground",
        "Frame": "0"
    }
}

ConsoleMethodWithDocs
A major undertaking in the codebase, the vast majority of TorqueScript binding methods and global functions have moved into their own header files. This makes the engine code much easier to read and allowed us to further integrate Doxygen support for a comprehensive reference guide available in the wiki.

ScriptObject Behaviors
Behavior support was added to the ScriptObject class. If you enjoy writing behaviors, now there is an engine class outside of the Scene and SceneObjects which can use them.

Polar Coordinate Changes
One of the few changes made that would break any of your existing scripts - polar coordinates have been standardized throughout the engine to follow the typical polar axis convention where 0 degrees is horizontal and to the right.

upload.wikimedia.org/wikipedia/commons/1/13/Polar_graph_paper.svg
New Sandbox Toys
A few more toys were added to the Sandbox, giving new users even more practical examples to learn from. These include AudioToy, AngleToy, LeapToy, and SpineToy.

t2dtutorials.com/img/AudioToy.png

Change List


Below is a list of all changes that have been made to the development branch of the Torque2D repository since the 2.0 release and have now been pushed to the master branch and tagged as Torque 2D 3.0.

TAML supports reading and writing in JSON format
Batch renderer now works exclusively with triangles instead of quads
Fixed SceneObject.applyForce and applyLinearImpulse
Added signum convenience function (PR #56)
New Gui Object: GuiGridCtrl (PR #9)
Added missing TorqueScript methods to ParticleAsset/Emitter/Player, renamed a few static fields for consistency (breaking change) (PR #68)
Fixed ImageAsset typo - image width and height were swapped (PR #70)
All picking modes for CompositeSprite are now functional (PR #69)
TextureManager fix - replaced call to use expandPath (PR #83)
ParticleAsset creation fix - now writes out correctly to TAML (PR #84)
ParticlePlayer play and stop functions now correctly pause and unpause emitters (PR #85)
Added functions to get the explict width and height of cells to ImageAsset (PR #88)
Fixed AABB size in ImageFont (PR #97)
Fixed TAML bug with ImageFont (PR #99)
Fixed TAML bug with ShapeVector (PR #104)
Added Mac OSX 10.6 support (PR #101)
Added linear interpolation and smooth step functions, SceneWindow now uses these (PR #95)
OpenAL streaming audio fix (PR #106)
OpenAL pause and unpause audio fix (PR #115)
OpenAL shutdown fix (PR #114)
PointForceController getPosition definition fix (PR #110)
SimXMLDocument crash fix (PR #113)
Replaced most ConsoleMethod (and functions) with ConsoleMethodWithDocs for easier Doxygen reading, moved most console methods into their own ScriptBinding.h files. (PR #116)
Behavior support for ScriptObject (PR #121)
Angle/polar coordinate issue fixes (breaking change), AngleToy added to Sandbox (PR #123)
Input bug fix for OSX (PR #125)
Fix assert conditional in consoleNamespace.cc (PR #126)
Android platform support added
Xbox 360 controller support (PR #136)
Leap Motion controller support, LeapToy added to Sandbox (PR #137)
Added missing Mutex to StringTable::lookupn (PR #127)
Asset support for named cells and frames (PR #139)
Bugfix for SceneObject::getContacts (PR #142)
Fixed deleting a clone of an object breaking the original object (PR #143)
Fixed bug that prevented scene controllers from being read by TAML (PR #145)
Initial implementation of Spine support, SpineToy added to Sandbox (PR #146)
Doxygen file cleanup (PR #148)
Fixed some Xcode compiler warnings (PR #150)
64-bit platform support (PR #154)
Fixed GUI object namespace issue (PR #152)
Fixed crash when executing FileDialogs (PR #153)
Linux platform support (PR #138)
AudioToy added to the Sandbox
Exposed method CompositeSprite::getSpriteLogicalPosition in TorqueScript (PR #155)
Emscripten platform support (PR #157)
Fixed TAML binary writer crash (PR #158)
Fixed compile errors and warnings resulting from the Xcode 5.1 update (PR #159)
Windows platform fixes (PR #168)
SkeletonObject now respects scene layer depth settings (PR #171)
Named cell and frame improvements (PR #172)
Fixed iOS7 bug with audio not playing (PR #175)
Arm64 support (PR #176)
Removed PVRTexTool files (PR #177)
Android platform fixes (PR #174)
Visual Studio 2013 solution files added (PR #182)
Behavior Connection bug fixes (PR #183)

What’s Next for T2D


Now, it's time to go back to the drawing board. We are going to make some changes to the steering committee and how releases are pushed from development to the master branch, in addition to discussing 2014 plans for T2D. After you stop cheering for this release, go ahead and start discussing where the engine should go next. What do you think should happen with T2D? This 3.0 release has proven that a small community can make something great, now imagine what else we can do if we really rally together.

The official thread for T2D future discussion can be found here.

Closing with a Showcase


An engine is only as good as the games made with it. We’ve mentioned how thankful we are to the people that contribute to the engine itself and the community around it. We’re also deeply grateful to each and every developer that shares their finished or in-development game progress with us. Before ending this blog, there are a couple recent games or projects using T2D that we’d like to highlight.

Fire Platoon from Dark Infinity Software:


https://www.youtube.com/watch?v=rDPdVBs6wew
Website: darkinfinitysoftware.com/fireplatoon/index.html

Project Cry Wolf from Simon Love:


https://www.youtube.com/watch?v=F_X367kBiUI
Blog: www.garagegames.com/community/blogs/view/22716


You can be sure in 2014 we will be looking at ways to further showcase and promote Torque 2D games.

Mich Notes

This blog was written by Mike Lilligreen and Derek Bronson. In fact, the majority of the past four months of T2D development has been driven by Mike. Because of official GG work and personal life, I've had very little time to dedicate to Torque 2D. The good news is that the recent steering committee additions have proven successful. On top of that, the majority of the contributions have come from outside the committee, which is awesome! The open source effort is staying alive and can become so much more.

So I personally want to say thank you to Mike and Derek for keeping this project going, along with all the contributors. Everyone else should join me in saying so. Thanks guys!
#21
05/07/2014 (10:23 am)
Awesome! I'm looking forward to porting my game to all the things!
#22
05/08/2014 (5:09 am)
Download is giving me access errors.
#23
05/08/2014 (5:38 am)
Need more details Roger. What platform? What errors?
#24
05/10/2014 (4:25 am)
Hello everyone! I am new to Torque2d, I just downloaded Torque2D-3.0-win.zip from https://github.com/GarageGames/Torque2D/releases and when I double click Torque2D.exe or follow the wiki, it launches a blank full-screened app, and then I can't shut it off. Like all keys are disabled. I had to hard restart my PC to get rid from it. What might cause this? I also don't know how to launch the app in window mode. Any help would be much appreciated. Thank you!

My system is Windows 7 64 bit.
#25
05/12/2014 (2:17 pm)
Is there any talk about bring Torque 2D to PS4 and/or PS Vita?
#26
05/12/2014 (2:50 pm)
@solewalker - do you experience the same issue if you compile the source yourself? T2D runs in windowed mode by default. You can see the video settings in the defaultPreferences.cs file in the AppCore module.

@Stephen - I'm not aware of anyone in the community working on console ports at the moment.
#27
05/12/2014 (2:57 pm)
Any chance in the future?
#28
05/12/2014 (3:10 pm)
@Stephen : Developing for the PS4 requires a devkit, which have been lent to the first wave of PS4 developers for free for one year. Unless someone with a dev kit ports T2D himself, I think the chances are extremely slim.

I'd personally love to see T2D on 3DS or Vita.
#29
05/12/2014 (4:05 pm)
So basically the chances for T2D to make it on PS4/Vita very very slim. That's sad to hear.
#30
05/12/2014 (4:25 pm)
That ultimately depends on having the right developers with the appropriate skills contributing.
#31
05/12/2014 (4:28 pm)
@Stephen : sad? I don't agree; T2D runs on PC, Mac, Linux, Android, iOS and the web. That's more than enough ways to release a kick-ass game and make money from it.

Even if T2D were ported to PS4/Vita, you'd still need to get a license (from the console manufacturer, not for T2D, which will always be free) for the privilege of publishing something legally on it.

For comparison, look at Unity's statement regarding consoles

Quote:Unity for consoles is only available for companies that have become approved developers by the respective platform holder

Regardless of the engine, you have to jump through hoops if you plan on developing for consoles.

Microsoft seems to have a more open approach [url=http://www.xbox.com/en-GB/developers/id][/url] promising no costs as long as you get certification.

Either way, step 1, make a game, step 2, worry about the platforms you plan to port it on.
#32
05/12/2014 (11:20 pm)
I'm really excited to see the T2D is on all those platforms (especially Android and Linux) and I agree it has more then enough ways to release a game on. I was just curious to see if there was any talk on a port. I also did forget that you need a license to publish anything.
#33
05/13/2014 (4:51 am)
Quote:I also did forget that you need a license to publish anything.
A license from one of the "Big 3", as in Microsoft, Sony, or Nintendo. The T2D MIT license allows anyone to port the engine to any platform they want, with no restrictions or cost. It's a matter of getting approval and funds together to appease the console companies.
#34
05/13/2014 (7:44 am)
@Mike, no I didn't compile it from source. I'll try compiling it this weekend hopefully, and then see what happens.
#35
05/13/2014 (4:27 pm)
Oops, could have worded that better. Edited, thanks Mich!
#36
05/15/2014 (7:22 am)
My work on editors for T2D MIT 3.0 has begun. This is a personal project, not affiliated with Garagegames or the Steering Committee.
#37
05/16/2014 (8:32 am)
@Michael, sorry for the delay, Im trying to download widnows version, using firefox (with downthemall plugin) from a linux system. The file name changes from torque2d.zip to some number and then gives an "Access error".
#38
05/16/2014 (8:49 am)
What happens when you don't use downthemall?
#39
05/17/2014 (7:08 am)
Great news! My interests in development have pulled me over to T3D(the Dark Side!), but I'm glad to see T2D getting some love!

@Mich - Really glad to see you working with on the editors, even if it is a personal venture. A few months or so ago, I had created a simple modular button design that greatly improved the look of T2D buttons if you are interested in using it! It's super easy to use, because it's just an image you can drag and drop to replace the old:

Image updated in this newer post


My T2D project has been on the backburner for too long but, please, use this button(that goes for anyone, I don't expect any sort of credit just enjoy the button)!
#40
05/17/2014 (12:17 pm)
@Jesse - Nice! Thanks for the contribution. Excellent to get help this early.