Game Development Community

dev|Pro Game Development Curriculum

Torque 2D Development Blog - Box2D Overview

by Michael Perry · 10/30/2009 (4:45 pm) · 74 comments

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

Welcome to another entry in the Torque 2D Development Blog series. Now that Torque 3D has officially shipped, it's time for Torque 2D to get the spotlight. The last blog about our new 2D engine was posted back in August, discussing integration with Torque 3D's code base. A lot of development has gone on since then, and for this blog really wanted to crank up the "awesome factor."

Torque 3D got a major push with the development of an abstracted physics layer, including an integration with PhysX. Our engine mastermind, Melv May, decided to give Torque 2D similar treatment. This blog is dedicated to his implementation of Box2D in Torque 2D!


/static/pg/blogs/michael-perry/b2d_icon.png

What is Box2D?

From their Wiki, "Box2D is a feature rich 2D rigid body physics engine, written in C++ by Erin Catto. It has been used in many games, including Crayon Physics Deluxe, winner of the 2008 Independent Game Festival Grand Prize." The system was originally developed on Windows using pure C++, and has since been ported to Linux, OS X, and the iPhone. Because of the API's flexible nature, there are integrations for Flash, Java, Python, C#, and Obj-C.


For Torque 2D, we did not opt for a thin Box2D integration with limited exposure to TorqueScript. Quite the contrary, Box2D is a core layer which is deeply interfaced with the rest of the engine. Thanks to this level of implementation, a Torque 2D game can be completely physically driven.

Even the simplest level can be designed and tested using only Box2D physics. The new 2D Physics Model system is what binds your in game objects to the physics system. This model contains all the physics elements you'll ever need such as Bodies, Collision-Shapes, Joints, Render-Actions etc. A Render Action can render anything including static-images, animated-images, particle-effects, text and much more. Render-Actions, like everything else, inherit the new physics capabilities.

Rejoice, for we are not stopping with mere collision and reaction. We are utilizing the full power of Box2D and its many features:

  • Continuous collision detection.
  • Convex polygons and circles.
  • Multiple shapes per body
  • Fast broadphase AABB queries
  • Collision filters
  • Continuous physics with time of impact island solver.
  • Persistent body-joint-contact graph
  • Contact, friction, and restitution
  • Revolute, prismatic, distance, pulley, gear, and mouse joints
  • Joint limits, motors, and friction
  • Momentum decoupled position correction
  • Fairly accurate reaction forces/impulses

The next few blogs will go into greater detail of how the new systems work together with Torque 2D. For now, here is a little something to salivate over.


This is post #5.

Torque 2D development blogs:


Page«First 1 2 3 4 Next»
#61
11/09/2009 (6:01 am)
Quoting myself there now! :)
#62
11/14/2009 (7:39 pm)
super cool... can't wait to test it:)
#63
11/30/2009 (1:53 pm)
That all sounds very promising. Can anyone responsible say what pricing range to expect? I hope it is still affordable for beginners since I don't have that much money.
#64
11/30/2009 (3:40 pm)
@John - We have not made a final decision about pricing. We still want to keep the entry cost low.
#65
12/15/2009 (11:26 am)
i saw this type of games.
this tehnolige its relaive old
but look good :D
#66
12/21/2009 (10:12 pm)
Forgive me as a newbie asking. But are you saying I can just use Torques built in joints, I can do it. Just learn the language, the supporting text is there?!!!
#67
12/21/2009 (10:19 pm)
@Rennie - You'll want to study the Box2D documentation to learn about the physics system and its components, then the Torque 2D documentation to see how it is implemented. A lot of this will be exposed to the editors, so it will not be difficult to get a purely physics driven game running.
#68
10/21/2010 (9:39 am)
i wish i can see this in ITorque:)
#69
10/21/2010 (10:01 am)
Cerulean Games has 2 games in production right now that makes use of Box2D in iTorque. They will both be marked with the Box2D logo, and we'll be sure to mention which games they are when they are released.
#70
01/31/2011 (9:05 am)
Any news about box2d integration?
#71
02/16/2011 (8:22 am)
Why is it taking so long to integrate box2d with Torque? When will we see the physics of torque to work right in all plataforms?
#72
02/16/2011 (9:26 am)
Eric posted a blog that contains information about Torque 2D: January Product Update.

If you can't wait, there is a free resource in the community that shows you how to integrate Box2D yourself. You can read up on it here
#73
08/07/2011 (8:44 am)
I'm trying to implement Box2D v2.1.2 into Torque Game Builder Pro v1.7.5 and I'm experiencing some trouble in the process. Does anyone know if something changed from the bachelor thesis' versions of those softwares, or if I have to manage something differently?

TY in advantage.
#74
09/29/2011 (5:40 pm)
Whoa! Is this already integrated, or do I have to do it manually?
Page«First 1 2 3 4 Next»