Game Development Community

Remaking a Game fo Linux with Torque

by Alex Russell · in Torque Game Engine · 05/15/2005 (6:47 am) · 10 replies

I posted this earlier in another part of the forum. Since I've jujst pruchased the SDK and found this forum, I thought I might have more luck getting answers here:

I have a game that I made on another game authoring tool for Windows that I need to re-make for Linux (a direct port is not possible). The game is here www.pachinkoagogo.com. I need to develop a demo quickly (within a couple of weeks), and thought Torque might be a good all-in-one solution.

[img]http://www.clubvarie.com/pictures/screenshot3.jpg[/img]

The game has sound physics, particles and sprites. It is controlled by keyboard and mouse. Most of the 3d art was made in Lightwave, except for the girl, who was modeled in Max. The girl has vertice animation. I want to use Newton Game Dynamics for physics (has a nice feature that prevents small, fast moving pachinko balls from tunnelling through geometry) -is this possible with Torque?

I would like some advice about how I could get a level into Torque as well. Here it is in the original editor:

[img]http://www.clubvarie.com/pictures/pachi_board.jpg[/img]

[img]http://www.clubvarie.com/pictures/pachi_board_2.jpg[/img]

I can turn the level geometry into models using Milkshape.


Some of the objects in the editor have scripts assigned to them. Is there a level editor that can do this, or does each entity need to be created and positioned by code?

Any advice for how to re-do this game with Torque is appreciated.

#1
05/15/2005 (7:13 am)
Pretty much everything that you've mentioned is feasible in Torque, but not within a few weeks of just getting Torque unfortunately. The only things that off the top of my head will cause major delays will be:

1) vertex animation. While possible, it's not the standard animation, and will require some heavy lifting to make this work well. Hopefully, someone that has more experience regarding the pitfalls/issues can speak up on this one.

2) TGE doesn't really work with sprites per se, but 3-D objects. Depending on how you are actually using your sprites, there may or may not be a quick and dirty implementation that you can create for your prototype.

3) For models, TGE requires the objects to be exported (exporters are available for most major modelling apps, search for "DTS exporter") to .dts format for use in the engine. Max models are no major issue (assuming you read the Max documentation, and your model meets the minimum requirements), and I think that LightWave has an exporter as well, but you would need to confirm that.

4) Inclusion of an external physics library is absolutely possible (many have done it), but unless you are a coding god, it's not going to happen in a few weeks.

5) Level geometry from what it appears you are doing would most probably be something you might want to re-create, using a .map editor (Quark primarily). Using scripts assigned to objects is exactly how normal workflow happens for this functionality in TGE, but not through a level editor--it's through the (built in) Mission Editor tools in TGE, as well as the normal TorqueScript console.

I know that it's probably too late since you've already purchased TGE, but if funds are available, you may want to consider T2D--it seems much more appropriate for this type of game genre (unless of course you do have fundamental game play that uses 3-D world spaces)--just something to keep in mind.
#2
05/15/2005 (8:14 am)
Wow, is it that hard.

1) Couldn't I just take the existing, vertex animated model and convert it to DTS in Milkshape? I know I need to make a text file listing all the animations and frame numbers, but what else is there to it?

2) I'll just make 2 poly models and put the sprites on them as textures :)

3) Thanks, found those.

4) Gosh, well I'm no coding God. Far from it. So I take it I can't just link the libraries and add some includes to the source code? Where would I find information about how to add external libraries? Or better yet, a scripting God?

5) I think I can handle that...[feeling nervous]

Even if it doesn't work out, I don't consider it a waste of money. I've been meaning to try out Torque for quite a while now, and I hear it is good for multiplayer.

T2d will not do. The client wants to see Pachinko a Go Go! running on Linux by the end of the month :/

So if anyone can cover those questions, hopefully this will work out, since I'm running out of options.
#3
05/15/2005 (8:23 am)
1) You could certainly convert the model over, it's the animations themselves that I'm unsure of. As I mentioned, this isn't an area I'm very experienced in (vertex anims).

2) that will work!

4) It doesn't sound like you really need amazing physics, just the ability to make sure your high-speed balls don't tunnel--which is something that others have figured out within the Torque physics model (although there is a minimum size where it's feasible). One of the things you can probably do here is to play with the absolute scale of your game as a whole--you can probably get the physics to work well with the balls being a bigger size in relation to the physics needs, and scale other aspects accordingly.

You can certainly include anything you want (it's really just as simple as #include in the right places in the source code), but integrating the physics into TGE itself (and networking is the huge problem here--if the game is single player you can get away with some shortcuts, but even single player games are "networked"). Your time-focused problem would be understanding how TGE physics works, and then over-riding it with the libraries. There are quite a few discussions on the concept here in the private forums, including a project that integrated ODE physics for single player (and RocketBowl did this as well)...just do some searching and you should find some relevant posts.

5) Keep in mind that I've made some major assumptions based on your initial description--this may not be needed at all depending on how things are currently setup in your working game version.
#4
05/15/2005 (8:55 am)
The script I wrote in the other engine manually changed/blended frames 16 times per second. It was a terrible script to write because the lipsyncs all started and ended on odd frames. I'll have to look into the scripting language and see if there are commands that I can use to do the same thing in Torque. If someone knows and can give a heads up in advance would be great.

I managed to get phsyics working with ODE, but only at a cost to frame rate. Newton has a solution that stops tunneling (something to do with stretching the collision hull in the direction it is travelling). I'll see if I can talk to Rocketbowl. This game is single player.
#5
05/15/2005 (2:06 pm)
1. Torque supports straight out morph animations as well as skin/bone animations. There are tradeoffs in size and such but for a singular character, it shouldn't be a big deal.

2. Make a 3d shape with a single billboard with your sprite in it. Quick and easy! You could do a custom solution but I wouldn't bother until I had to.

3. Bunch of exporters, should be pretty easy to get your art into Torque.

4. There are a bunch of resources for integrating physics code into the engine. I would imagine that for a pretty experienced guy, in a non-networked setting, it would be possible to get Newton or ODE going in a few days... Depending on how much you don't know about Torque/3d game programming, and how fast you learn, you can days, weeks, or even months to that time. :) You include the lib, then you have to tie it into the physics code for an object.

5. If you're doing your own physics anyway, you could just do poly soup collision against the your level DTS model... Would take a bit of hacking but isn't impossible by any means.

I haven't checked the very latest release info, but there's nothing preventing T2D from running on linux. It might not be officially supported yet, of course, but it's built on the same cross-platform layer that TGE is.
#6
05/15/2005 (7:41 pm)
Thanks for that.

I've just had word from my client. It needs to be for Power PC (Gentoo Linux) and OpenGL based. Does Torque meet those requirements?
#7
05/15/2005 (8:37 pm)
Gentoo, I think so. At Horsetooth Technology, we've got Torque running on several different flavors of Linux, but we haven't tried Gentoo per se.

OpenGL, oh yeah. It's the only way to fly. So far we've had the best luck with Nvidia cards (better Linux driver support).
#8
05/15/2005 (10:11 pm)
Torque is natively running on OpenGL. The Direct3D support is a bit of a hack. :)

Obviously, TSE supports DirectX natively - different graphics layer.

Torque runs on mac, windows, linux, solaris, xbox, ps2, and a few other things, too...
#9
05/15/2005 (10:49 pm)
@Ben the T2D demo runs great on all my *NIX boxes FYI.

@Alex, This is unrelated to your question, but you might find the info hand... You have an error in your website about the headers, this is actually due to extra whitespace in your first included file (can't think of the name at the moment, but look in your index.php for the first included file. And then delete all the whitespace from the bottom of that file.
#10
05/16/2005 (6:08 am)
Thanks for those replies. It looks like this will be the best platform for my project. I'm looking forward to developing on Torque!

@Dreamer, thanks for that tip. I've currently locked myself out from admin somehow, too, so I'd better give the site some attention (plus I've some more exciting articles about pachinko to post!)

BTW: I will be using the 3d torque, in case some of you misunderstood that I wanted to use the 2d version.