Game Development Community

dev|Pro Game Development Curriculum

Torque 2D: Android Support and More!

by Michael Perry · 03/07/2013 (10:01 am) · 14 comments






Latest Updates, Android support, and more!






Greetings everyone! Torque 2D is improving every day, gaining momentum as more people join the effort. The sheer amount of improvements to the engine itself is incredible, but there are also some amazing things happening in Torque 2D not related to code. Keep reading to find out more!

Android Support

Before I proceed with the update information, I highly encourage everyone to visit the KickStarter for Torque 2D MIT On Android. Direct quote from MGT:

Quote:Max Gaming Technologies has launched a kickstarter to fund an android port of T2D MIT as well as a port for the Ouya. Everyone who backs the project at $25 or more will get access to the port once it is complete. Everyone else will have to wait 6 months for the port to go open source MIT on Github.

We also offer some support at the different tiers and the final Ouya port will be delayed until we get access to a console but we will give early access based off the SDK before that. We will also be porting the default toys that come with T2D as well. Any and all donations are welcomes, come help us bring this great engine to the android platform.


Latest Torque 2D MIT Updates

Scene Controllers
Scene controllers have been refined. There are now two broad classes of SceneControllers: GroupedSceneControllers and PickingSceneControllers. GroupedSceneControllers operate on SceneObjects that you add to them to perform whatever action you desired. The new AmbientForceController is one such type which will apply an ambient force to any object in its group.

PickingSceneControllers use the picking system and all allow you to select which groups and layers they affect. The region they affect is down to the individual controllers themselves though. For instance, the BuoyancyController now support a selected region of the Scene and because it is a PickingSceneController it can additionally filter by object groups and layers. The PointForceController is also a PickingSceneController but this operates on a specific radius. This controller like the buoyancy controller has a wealth of options.

Finally, SceneControllers now hook into the SceneRender so they can render an overlay such as is the case for the PointForceController and BuoyancyController which both render the regions they pick. Also, for developers, creating new SceneControllers is really easy.

Point Force Controller:


Buoyancy Controller:


Custom Taml Serialization Changes
You can read about the latest changes to Taml in Melv's latest blog.

Community Pull Requests
Minor improvements to the Vector class, fixes to the texture-packer exporter etc.

Visual 2012 Visualizers
Added custom visualizers for T2D into toolsVisualStudioVisualizerVS2012 for types:

  • AssetPtr to show module name and asset name. Show "No Asset Reference" if not referencing anything.
  • Vector to show vector elements
  • Vector2 to show X/Y
We will gladly accept community pull requests for new ones for useful engine types!

Background Clears
Fixed an issue where multiple SceneWindow were having their background cleared. Now, the background can be cleared at the Canvas level or each individual SceneWindow as shown here

Creating Polygon Box Collision Shapes
You can now create a polygon box collision shape without any arguments in which case it creates one the same as the SceneObject size.

Asset Changes
Added/Fixed various assets.

String Accessors
You can now access a string using:

  • .x .y .z .w (index 0 to 3)
  • .r .g .b .a (index 0 to 3)
  • .width .height (index 0 and 1)
  • ._n (index n)
  • .count (get a count of words equivalent to "getWordCount(...)")
Module Manager
Minor improvements removing redundancies that were left over from 3SS. Added the ability to completely unregister a module.

Asset Manager & Live Asset Updating
The ImageAsset now refreshes the texture from disk when itself is refreshed. This means that when an image asset is refreshed it will update its texture based upon its settings and all current animations using it will also be updated as well as anything currently using the image or animations such as sprites, scrollers etc. This allows live asset updating!

The ImageAsset now also allows you to specify the hardware texture filter mode of "Nearest" or "Bilinear" on a per ImageAsset basis to override the global setting which you can set using "$pref::T2D::imageAssetGlobalFilterMode" which you can find here.

Collision Callback Updates
As described here, the physics callback system has been modified to be more useful. You now get a "Scene:onSceneCollision()" and "Scene:onEndSceneCollision()" callback if both objects have their collision callback activated. Now however you get a "SceneObject::onCollision()" and "SceneObject::onEndCollision()" on either object that has its collision callback turned-on.

You can see this in action in the new PointForceControllerToy as well as other places where the "Planetoid" has its collision callback turned on allowing for a callback like:

function Planetoid::onCollision( %this, %object, %collisionDetails )
{
...
}

Collision Toy
Added a collision toy that shows you how to extract collision information. This toy shows you the contact point with a cross-hair.

MultiWindow Toy
New toy that demonstrates multiple windows on the same scene. Of course you can have multiple scenes with multiple windows or a single scene with many windows. The choice is yours!

CompositeSprite
The composite sprite now has its own picking system. Currently you can only do this using the sprites AABB but it'll be expanded to support more picking methods such as collision shapes and other geometric primitives useful for selecting sprites in various layouts like rectilinear and isometric.

Code Formatting
Much of the code outside of the "2D" folder still has the old Torque formatting and much is inconsistent. Anyone who wishes to tidy-up some of this code or has already done so then please submit it as a pull request. Please don't submit hundreds of files though, try to split it up into areas if possible.


Torque 2D Steering Committee Notes

So far, the Torque 2D Steering Committee has met twice. The first meeting was more or less an introduction, discussion of goals, and a few other light topics. Our most recent meeting involved a more in-depth analysis of what Torque 2D is missing, and how we can drive the community to help us fill those gaps. You can read and reply to our meeting notes in this thread.


Legacy Update

Torque 2D 1.8 and iTorque 2D 1.6 have received one final update. Shortly after released, a few crashes were discovered by the community. Despite our earlier report that we were not providing more updates, we knew we could not leave the engines alone with these showstoppers. The critical bugs are fixed and you can download the new files from your account.


Conclusion

That's it for this week folks. The future is still in everyone's hands, not just GarageGames. We are all driving the technology, so please continue to post your feedback, submit your code, and help us make Torque 2D the best engine it can be.

As usual, please spread the word. Especially, help MaxGaming with their Kickstarter in any way you can. Their work will benefit us all.

Regards,
Mich

#1
03/07/2013 (11:00 am)
Those string accessors are perhaps the neatest addition :)
#2
03/07/2013 (11:25 am)
@Ronny : For any old-school Torque users, string accessors are such a welcome addition. No more getword(%string,%index)!

--------

This is the first time I'm backing a Kickstarter project.

Their goal is 10,500$, really not that much money especially when you consider that WE, the community, will be the ones to benefit from this.

Even if you don't want to get early access to the tech, know that it will be released on github under the MIT license (just like T2D) 6 months after initial release.

I say everybody pledge at least a buck! Help T2D take over the world!


#3
03/07/2013 (11:39 am)
Always cool to see an update.

You really need to get those point force meteors to attack Russian and not the moon. ;)
#4
03/07/2013 (12:22 pm)
Thanks for the update on 1.8, but have you fixed the keyboard shortcuts problem? I'm using Lion (Mac). Do I need to update to Mountain Lion for the shortcut thing to go away?

Thanks, and great work on T2D MIT! :)
#5
03/07/2013 (3:09 pm)
Pledged! Been waiting for anything Torque on android!
#6
03/07/2013 (5:49 pm)
CAN WE CHANGE THE STANDARD TIME ON EARTH SO THAT 24 HOURS IS NOT A FULL DAY?

Seriously. I soooooo want to take time to work with this and I just don't have time! Dang it!

Ron
#7
03/07/2013 (5:53 pm)
@Ron : You can submit a pull request to the repository and we'll see what we can do but I can't guarantee that we can change the passage of time.

I think it's hard-coded legacy code and way too many systems depend on it.
#8
03/07/2013 (6:31 pm)
LOL, Simon. No problem, I can do a pull request now in my sleep :-)! Hope all is well with you guys. I know how things go when you volunteer for a committee. You guys are doin great keep it up!

Ron
#9
03/08/2013 (3:09 am)
Awesome news about T2D !

I second Ron... need also a 30 hour day :)
#10
03/08/2013 (5:29 am)
Amazing at how much has happened in just a month.

Even though I have no current need for an android port and could just wait until it gets released under MIT, I chipped in and encourage others to do the same. Getting this funded would get a big bullet point for platform support out of the way, attract more developers to T2D, who might contribute cool new features to the engine, attracting more developers, ... and the whole virtuous circle continues.
#11
03/09/2013 (11:02 am)
I'm loving the progress since the MIT decision! Most important thing that is missing is the editors. IMO that is what makes T2D stand out from the crowd of 2D libs and I probably wont port my current T2D game over to the new T2D until these are available. Good luck on the Android port getting funded! I'm looking for a web port myself... so someone get cracking on that ;)
#12
03/18/2013 (3:38 pm)
Michael, does supporting the 2d Android pipeline indirectly aid the 3d Android pipeline?
#13
03/22/2013 (6:51 am)
I got my money pledged, best of luck Max Gaming, we're pulling for you!