Integrating a Physics Engine into TorqueX
by Shawn Simas · 10/26/2007 (12:05 am) · 8 comments
I've been struggling over the last little while to come up with a game idea that sounds entertaining, but is also within my skill sets (I'm no artist, and I'm not a super-ninja programmer) so I could actually get something completed.
Because of the difficulties in finding 3d modelers / animators who work within my budget/free, I decided on making a 2d game. I've played with TGB before, but never really got too into it. C# is my language of choice, it may not be as fast as C++, but it does give a good boost in productivity, and being a one-man team, that's something very good. So, with the release of the 5 tutorials for TorqueX I decided to dive in and give it a shot. I really fell in love, I just adore the component system.
Now, I had my engine decided, and I knew I wanted a 2d game... but that was about as far as I could get. I had no clue what type of game to make... so I thought about what kind of games I like. I really love physics-bases 2d games... so I tried to think up some good ideas.. and couldn't get anywhere.
I did realized that If I wanted a true physics-based world, the default physics in TorqueX just wouldn't cut it, I'd need a proper physics library. So, I did a quick search on google and came across Farseer. It's written in C# for the XNA platform and works on Windows/XBox360/Silverlight. It sounded like the perfect choice.
I was able to get it integrated without any hassles and started work on exposing the physics functionality to TXBuilder through the component system and was able to get a few things made. I'm having great fun working on this, but... still no game idea!
You can click here for a You-Tube video showing me in TXB designing a quick rope-bridge and dropping some boxes on it. It demonstrates how I was able to expose the physics to TXB for ease of level building.
Click to download a higher res version of the movie (Windows Media Format)
Because of the difficulties in finding 3d modelers / animators who work within my budget/free, I decided on making a 2d game. I've played with TGB before, but never really got too into it. C# is my language of choice, it may not be as fast as C++, but it does give a good boost in productivity, and being a one-man team, that's something very good. So, with the release of the 5 tutorials for TorqueX I decided to dive in and give it a shot. I really fell in love, I just adore the component system.
Now, I had my engine decided, and I knew I wanted a 2d game... but that was about as far as I could get. I had no clue what type of game to make... so I thought about what kind of games I like. I really love physics-bases 2d games... so I tried to think up some good ideas.. and couldn't get anywhere.
I did realized that If I wanted a true physics-based world, the default physics in TorqueX just wouldn't cut it, I'd need a proper physics library. So, I did a quick search on google and came across Farseer. It's written in C# for the XNA platform and works on Windows/XBox360/Silverlight. It sounded like the perfect choice.
I was able to get it integrated without any hassles and started work on exposing the physics functionality to TXBuilder through the component system and was able to get a few things made. I'm having great fun working on this, but... still no game idea!
You can click here for a You-Tube video showing me in TXB designing a quick rope-bridge and dropping some boxes on it. It demonstrates how I was able to expose the physics to TXB for ease of level building.
Click to download a higher res version of the movie (Windows Media Format)
#2
i find as a one man army, games evolve, they are hardly designed.
anyway, good luck with your game and keep us posted with your progess.
Neil
10/26/2007 (5:54 am)
My Advice to comming up with a game idea is to play the games you like and make notes of what you like in them, what you find fun and if you would want to do something like that, play a few games take your time, an idea should form over time with bits from your notes, else play games to find out what type of game you want to make, then research it, find lots of examples, take the best bits and throw in your own creativity.i find as a one man army, games evolve, they are hardly designed.
anyway, good luck with your game and keep us posted with your progess.
Neil
#3
10/26/2007 (6:16 am)
Nice job. That's a pretty cool integration!
#4
10/26/2007 (6:22 am)
Really impressive stuff. I wasn't entirely clear what was going on as you were setting it up, but I think I got the general idea toward the end. Basically a start and end point, then an object to make up the rope, right? I was pleasantly surprised when the bridge broke at the end. =)
#5
Don: Yea, it's hard to follow on the little YouTube window... but yes, I created a RopeBridgeComponent that you throw onto a start point and choose an end point, and it will create the bridge for you, without having to manually place all the pieces inbetween.
10/26/2007 (11:39 am)
Pesto: That is true, but then again I did almost no tweaking of physics properties (other than the 'softness' on the slider joint, which isn't integrated properly into Farseer yet). This was more of a demo to show that it is integrated, and how it hooks right into TXB.Don: Yea, it's hard to follow on the little YouTube window... but yes, I created a RopeBridgeComponent that you throw onto a start point and choose an end point, and it will create the bridge for you, without having to manually place all the pieces inbetween.
#6
Patrick
10/26/2007 (11:40 am)
That's awesome. I sent you an email about some story ideas and maybe doing some work. Definately interested in this!Patrick
#8
06/18/2008 (3:21 pm)
That's very cool. Can I have the source code of that, for use on a game that me en some friend's are working on?? 
Torque Owner Pesto126