Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Torque 2D

This thread is locked; no one can reply to it. rss feed Print
Torque 2D
Paul Pridham
Member #250
April 2000
avatar

Torque 2D has been released by Garage Games.

Some of you may be familiar with the Torque engine, a featureful indie-game-developer-oriented SDK. I just came across notice of the release of the 2D version, and I must say... wow. It's definitely looking pretty impressive. Check out the various built-in editors, and effect that you can pull off with a few lines of Torque-script.

This seems like a very promising direction for 2D games and games development.

David Grace
Member #42
April 2000
avatar

Already been messing with it. ;) Here are some screenshots from a small demo game I am whipping up.

It's pretty cool! You get probably the coolest built-in particle editor I've ever seen in a game engine. It also has a built-in tilemap editor. (That's still a little rough around the edges) And finally, it contains the standard Torque GUI system, including it's own build-in editor. It's all driven by well-documented C++ source (yeah, you get the source to the engine) and Torque's built-in C-like scripting language.

There are some caveats to using it, however. For example, since it's OpenGL (with DirectX support through an emulation layer), you just can't use any ole sprite sized. Your images have to conform with standard 3D graphics card rules. (Power-of-twos for best performance, and so on.) You can load non-POT images, but it wastes video RAM as the engine will scale it up internally to the next largest POT. There is a large/non-POT bitmap support, which lets you load images of any size or resolution, and it behaves like the other sprite objects -- except that it cannot have individually animated frames. You're limited to just animating it inside the engine (rotating, scaling, physics).

But, well, if you've ever dabbled with 3D-accelerated 2D game code, those restrictions are nothing new and unique to Torque 2D itself.

The screenies I linked to are the result of about twenty-four hours of me playing in Torque 2D. (Of course, I already knew Torquescript and modified the included demo, so I had a leg up in that respect.)

I agree with Paul, T2D is still in development, but once it's done, I suspect it might end up being the best 2D/hybrid 3D game engine available. It ain't free, though.

Don't worry, I'm not giving up Allegro. ;)

Paul Pridham
Member #250
April 2000
avatar

Wow David, your screenshots are pretty impressive. Twenty-four hours, you say? How the heck did you even create those sprite models in that time? :o

It seems that most "modern" 2D development is headed in the same direction as engines such as Torque 2D, though this is probably the most advanced-looking solution I've seen yet, by far. A hundred bucks seems like a pretty decent price to pay for some uber-slick rapid game development and the potential for indie sales of the result.

Gnatinator
Member #2,330
May 2002
avatar

David, did you get a demo of the actual engine? Or have you bought it already? (All I see is a game demo)

Torque 2D is looking pretty awesome and would probably cut dev time for high quality game drastically. The deal would probably look most attractive to new indies looking for an engine to use (it takes awhile to program a decent engine, and 80$ looks to be quite reasonable for one of this quality/capability).

David Grace
Member #42
April 2000
avatar

Gnat, I went ahead and ordered the early adopter version. But, that's a given because back when Melv May showed off his "SceneGraph2D" object on the GG forums a while ago, I knew I had to own this. ;)

Paul: Thankie but I had already created those 3D models a while ago, so it was just a matter of rendering them out from a side perspective. So, I cheated a little bit, heehee. ;D

I've been a Torque user for about six months and have even developed a game using it. (Though it was done for a charity auction, so only a few CDs were made and given away. It's not for download.) On the second game, it took me about a week to throw it together...Though I reused art from other projects. The first game is kinda sorta my "Fisher Price's Torque Game" project that I have largely abandoned. :)

Torque (the 3D engine) is fairly large and complicated. It's also not exactly top of the line, but their latest shader-based version is addressing this. But, hell, for $100 you get a game engine that's been used in several AAA-class titles and has good networking code.

Torque 2D is based on Torque 3D (minus the 3D parts, though I hear if you have Torque 3D it's pretty easy to retro-fit T2D into it, so you could mix 3D and 2D). The rumor is that GG is going to make Torque 2D network aware.

I agree with Gnat -- T2D is a very nice shortcut for those who're looking for a pre-made engine. Since you get the full source code, you can change/add to it as you please. It's very clean and well documented code. (The T2D stuff -- the Torque legacy stuff can be a bit hairy at times. ;)) Only thing I don't like is the sound system (OpenAL based), but one could easily rip it out and replace it with something else.

Richard Phipps
Member #1,632
November 2001
avatar

So.. should we take Allegro down this route? :)

Paul Pridham
Member #250
April 2000
avatar

Yes, we should definitely take Allegro down the route of mega-kickass-itude. ;)

spellcaster
Member #1,493
September 2001
avatar

David, can you tell us a bit more about that physics engine? What can you do with it? How well is it documented?

Have you played around with it? The screenshots and the texts sounds great, but it leaves so many questions unanswered...

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Paul Pridham
Member #250
April 2000
avatar

Also, I'd like to know what kind of drawing primitives it supports, and how things like sprites and animation are handled. Is the API pretty involved or is it lean and efficient? How easy is it to bypass the Torque script and use your own C/C++ code to interface the engine? Etc.

spellcaster
Member #1,493
September 2001
avatar

Also, does the mapeditor handle iso / and / or hexmaps? Geez.. I think I want that baby :)

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Ashteth
Member #3,310
March 2003
avatar

Does anyone know if you can you use native OpenGL calls on top of Torque 2D? A lot of the 2D effects I do require altering the matrix or using GLColor etc and I wouldn't want to lose this.

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

So.. should we take Allegro down this route? :)

Sure thing! I'll gladly handle the $80 per copy. 8-)

Richard Phipps
Member #1,632
November 2001
avatar

Cough.. I meant the free route.. I.e. making Allegro use GL or DX natively. ;)

David Grace
Member #42
April 2000
avatar

Spellcaster: You can set their density (determines inertia), enable constant velocities (for gravity, wind), set friction (for contact with tilemaps/other objects), restitution and relaxation (for spring-back and deformation), and damping.

I haven't actually experimented with how objects behave when they collide, but they can either act as physic force givers, receivers, or both, so you should be able to make some pretty complex effects. (Such as a ball bouncing around in an arbitarily-constructed tilemap.) Collision zones are defined as convex polygons, which can have number of points. So it's possible to cover large/irregular objects in a fairly efficient manner. The collision system is REALLY fast and it's easily possible to have many hundreds of objects onscreen at once, all rotating and zooming and so on. Here's some technical information. Unfortunately, at this time it doesn't do isometric/hexmaps, though I saw Melv talking about it in the private SDK forum, so I'm sure he's aware of how bad people want it.

Paul: Right now, it only deals with sprite-based primitives. You have static/dynamic sprites, and tilemaps. (Check that link for more detailed info.) Currently, there's no support for such things as lines, rectangles and so on. But it wouldn't be hard to add them in. (I wrote a GUI control that used OpenGL calls for things like simple lines and such, so just apply that to Torque 2D. Make it based on SceneObject2D, which is a very lightweight container class for all T2D ingame objects.)

Ashteth: The rendering code is entirely OpenGL based. (Which is then translated into DirectX calls by Torque's emulation layer, if you tell it to use that.) It's pretty easy to integrate stuff via source. For example, I've added a simple fullscreen blur function that works on the Torque framebuffer. I haven't popped the .cc file into my T2D project yet, but it should just work without modification.

As for Allegro -- I dunno, I think Allegro is entirely unrelated. Allegro is a library, with zero actual game enginey type stuff in it at all. Heck, look at how pure the interface has been kept over the years, despite people's request for native handling of PNGs, MPGs, OGGs, etc. Of course, that isn't stopping someone from making a T2D-style game engine using Allegro. It wouldn't be that hard, even. There's a lot already there for that sort of stuff (such as a collective datafile object, which Torque does not have and I sometimes think about adding). Give it a Lua backend, throw in some ogg/mod/png/video libraries and blam. The problem with Torque is it requires some sort of 3D graphics card. (Though, to be honest, with the way things are these days -- even crap builtin 3D cards being common in cheapie PCs -- it wouldn't be such a huge hit to support only that market.)

I love things like Allegro and Torque 2D -- because they are multi-platform and that's what really counts in my opinion.

Paul Pridham
Member #250
April 2000
avatar

Methinks that a Torque-2D-like engine could be made for Allegro without horrible amounts of pain... simplified, of course, providing the most useful "good enough" features, like swept-box and swept-circle collision instead of swept-polygon, for instance.

Anyone else tempted to start up an "Allegro Game Engine" project on SourceForge? :D

Incidentally, Popcap has recently released their engine free for public consumption. Check it out at their developer page.

Gnatinator
Member #2,330
May 2002
avatar

Yeah, I also just noticed that popcap released their framework. I hear from a very reliable source that its easy to use and quite excellent. Anyone wanting a tested and true, commercial quality engine for windows should give it a look.

Unfourtunatley, I will probably not touch it due to it not having a mac port. :P

Paul Pridham
Member #250
April 2000
avatar

I've downloaded the PopCap framework, and yes it looks to be quite clean and well documented. The API isn't fugly, either. It's not cross-platform, though. :(

But hey, now that the source is released, maybe a linux or mac PopCap driver will appear. I also wonder if there's not some technical features of the PopCap framework that Allegro could draw from. It seems quite capable of doing what Allegro does, yet also seems a lot simpler... it is a tad higher level.

spellcaster
Member #1,493
September 2001
avatar

I bought t2d and I must say it's sweet :)
The only problem I have right now is that I don't want to code a shooter, and that I have no idea what other fx rich demo I should try to code :)

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Paul Pridham
Member #250
April 2000
avatar

Spellcaster, how about something fun with physics? Maybe a thing on a spring jumping around some platforms and knocking boxes all over the place and stuff. ;)

Go to: