Game Development Community

Torque 2D Development - Integrating with Torque 3D

by Deborah M. Fike · 08/11/2009 (12:14 pm) · 38 comments

static.garagegames.com/static/pg/blogs/jason-hetu/Torque-2D_Development-Blog-Header.png

You might have heard here or there that a lot of time has been devoted to integrating the Torque 2D codebase with the Torque 3D codebase. Because there's a lot of confusion over this issue, I'd like to give you some more detailed information on the work that's being done between these two engines.
static.garagegames.com/static/pg/blogs/deborah-marshall/Jessica_Torque2.jpg

Quick Jaunt Down Torque Memory Lane


Before we talk about what's happening now, though, it may help to understand how Torque Game Builder was originally developed. To read a much more detailed (and hilarious) version of events, you can refer to Melv May's past blog on the subject. The big takeaway is that we saw a huge need for game development tools that the "bigger" fish in the pond just didn't see. Casual games were on the rise, and more studios were focusing their resources on making 2D games for places like XBLA, casual portals, and mobile platforms. So we took the original Torque Game Engine, started a new branch in subversion, and built a new codebase which eventually became Torque Game Builder.

Because of the 2D specific features we built into TGB, we decided to keep the two codebases separate. Since it's launch, Torque Game Builder has never looked back at the 3D codebase.

Until now.

Integrating 2D and 3D


Deciding to keep the two codebases separate certainly made things easier from a code management perspective. On the other hand, separation has the huge downside of not sharing features between engines. TGB could have clearly benefited from having real-time networking from TGEA, while TGEA could have taken a few pointers from TGB's more robust editors.

However, a complete re-merge of both engines would also suffer severe setbacks. When writing a 2D engine using a 3D engine as a base, you encounter many interesting challenges, most of which are related to the fact that it is not common to take a 2D engine into account when designing a 3D engine!

So we decided to split the difference. The chart below shows all the different layers that Torque is concerned with. The layers labeled in red are those that we built directly into our Torque engine. The rest are layers that impose restrictions on our engines from outside developers (such as console platforms, physics standards, etc.) Note how Torque 2D and Torque 3D share low and mid-core layers, but have completely separate engine product layers. This allows us to share many properties between the two engines, but still maintain a layer that is specific to 2D or 3D games respectively.


static.garagegames.com/static/pg/blogs/deborah-marshall/Torque_Layer_Diagram3.png


How does this separation benefit game developers?

Stability: Both engines share two layers of the same core systems, meaning that they help stabilize each other. Both products can be improved by the same bug fixes and community resources. And as improvements are made to GFX, SFX and the core layers over time, they'll improve both engines simultaneously.

Smaller Engine Footprint: Since the engines are only sharing what they need from each other, 2D and 3D specific features will not show up in both engines. In Torque 2D, we can happily remove terrain, sky, water, and roads, resulting in less bloat for the engine.

Familiar User Experience Shared layers means users can more easily pick up Torque 2D and Torque 3D and feel comfortable with them both. Not only will the engine and the editors have a similar look and feel, the forums can also be shared. This means 3D users can potentially help out 2D users, and vice versa.

Games With 3D and 2D elements: Merging the two engines means developers can use elements of both 3D and 2D game play in one game. Things like 3D games made in Torque 3D with GUI interfaces made in Torque 2D are now more accessible.

Shared Capabilities: Features that are developed at the core levels can be exposed to both engines. One obvious examples is that Torque 2D now gains much more sophisticated rendering capabilities. This is important for the aggressive rendering requirements of tile-layers and particle-effects.


static.garagegames.com/static/pg/blogs/deborah-marshall/Torque_3D_Screenshot.jpg
Torque 2D will be able to take advantage of some of Torque 3D's sophisticated rendering capabilities. (Screenshot provided by J)


What other shared features will Torque 2D share with Torque 3D?


There's still a lot of shared features that we have yet to announce. This is primarily because we still have a Torque 2D-specific feature that needs to be finished before we feel comfortable announcing more information. Future development blogs will expose shared capabilities so you have a good idea of what to expect before the Torque 2D beta goes live.

This is post #3.

Torque 2D development blogs:


Page «Previous 1 2
#1
08/11/2009 (12:18 pm)
Excellent write up!
#2
08/11/2009 (1:02 pm)
This makes me smile.
#3
08/11/2009 (1:35 pm)
A perfect move! Congratulations, GarageGames!

I bet it was mostly Jessica's work, and Melv's playing in the garden.. again.. :)
#4
08/11/2009 (2:11 pm)
Now thats one hella GEML'DOP !
#5
08/11/2009 (2:13 pm)
This move alone has given a massive boost to performance. The Casual Connect PSK demo was up to 250FPS on my machine, a 100% improvement over a similar level in TGB.

The Torque 3D core is super sweet.
#6
08/11/2009 (2:56 pm)
Torque 2D certainly will have a potential to reach beyond what people have seen in 2D engines so far.

Super sweet indeed!
#7
08/11/2009 (5:22 pm)
That's one heck of a sandwich you have in the making there. I didn't see the Mayo though..... :P
Looking awesome guys.
#8
08/11/2009 (6:21 pm)
I absolutely love all the exciting changes coming down the pipe for both 2d and 3d engines.

Quick question though...

Can we expect existing TGB projects to port seamlessly to T2D?

Once I read that real time networking was being added to Torque2D, I dusted off the old TGB (read:downloaded the newest version), and set to work on an old project that's been sitting on the back burner for a while now.

Can I expect all the work so far to "port" to Torque 2D or should I just wait till T2D hits beta phase to really start cranking on this project?
#9
08/11/2009 (6:31 pm)
First thing, I'm just giddy about T3D and T2D joining forces. It's like Voltron!

...Ok, now for my complaint. You guys have been teasing me with T3D since last December. Now you announce T2D and all of its glory. I don't think my excitement can hold out much longer.
#10
08/11/2009 (8:31 pm)
That is sweet, thanks for keeping us in the loop. I've been checking GG website more often than facebook ;)
I'm super excited about the networking and about the new rendering capabilities.
Is it safe to assume that we will be able to use shaders like t3d?
#11
08/11/2009 (10:06 pm)
Does this mean DS support is on the cards?
That would be amazing :)
#12
08/11/2009 (10:50 pm)
I'm impressed - looking forward to more details. Just an observation - if you're going to do the t-shirt thing like T3D, maybe it won't be such a good idea to use the "Powerpuff Girl" logo... just an idea....
#13
08/12/2009 (12:00 am)
Let's see if I can't answer a few questions.

Quote:Can we expect existing TGB projects to port seamlessly to T2D?

Porting from version to version always depends on how much source code you modify. That being said, we won't know 100% for sure how easy (or difficult) it will be to port between the two engines until our alpha feature set is locked down.

Quote:Is it safe to assume that we will be able to use shaders like t3d?

We're working on that angle. Theorhetically, it's looking good, but the last major feature we're implementing could change how shaders and materials work for Torque 2D, so we'll keep you posted.

Quote:Does this mean DS support is on the cards?

That would indeed be super, super sweet. However, we can't announce any support of future platforms right now. As you can see with our engine line, though, we've always got an eye toward other platforms.
#14
08/12/2009 (12:54 am)
when can T2D+T3d?
#15
08/12/2009 (1:10 am)
"Things like 3D games made in Torque 3D with GUI interfaces made in Torque 2D are now more accessible."

nice!
#16
08/12/2009 (1:15 am)
maybe..T3d make all 3d world..t2d make all GUI. and 2dgame or 2d menu..or user in mesh 2d material in all t3d world model.
#17
08/12/2009 (5:46 am)
Are there any guesstimates as to the release time for T2D or is this still being held close to the vest?

The architecture looks awesome, should be able to do some pretty sweet stuff with T2D and T3D combined. I hope someone who owns both can combine the codebases together for development...
#18
08/12/2009 (5:57 am)
I can't give you an estimate for release unfortunately, it's too early for that. In terms of hoping someone can combine the codebases together, that's the whole point of what this blog is about! ;)

You should be able to copy the source from Torque 2D and be able to compile it under Torque 3D. What we're really trying to address in this blog is that they are being developed right now under the same code so there's no question of compatibility. In terms of how you could potentially use Torque 2D level-builder output under Torque 3D, well the information on that isn't out yet.

Melv.
#19
08/13/2009 (9:10 am)
With T2D getting better network capability, and allowing T3D and T2D code to be interchanged easily, it's becoming much easier to realize how a game can be prototyped in T2D without all the baggage of a 3D environment, then ported over to T3D to be fleshed out and polished. Very nice guys.
#20
08/13/2009 (9:40 am)
Prototyping a 3D game in 2D?
Page «Previous 1 2