Game Development Community

Warsparow crashing game at high speed.

by BigPapa · in Torque Game Engine · 10/27/2008 (8:53 pm) · 9 replies

Hello gang,

I'm having problem modifying the Warsparrow content pack. The default installation works fine but if I try to increase the speed by increasing the value of ManeuveringForce, it crashes the game. Right before it crashes, the looks as if the camera shakes wildly and then freezes the game.

I found the following thread and made the changes to the flyingvehicle.h and flyingvehicle.cc files but still it continues to do the same.

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9918

Has anyone run into this problem? Can anyone point me in the right direction to some good information that you may have found useful so that I can get the warsparrow to run solidly? Or is there any better way to implement flying vehicles? I'm using TGE 1.5.1.

Thx!
- BigPapa

#1
11/04/2008 (9:42 pm)
I had the same problem. Torque cannot handle extreme speeds... it will crash... you must give a top speed to your flying vehicle.
#2
11/04/2008 (11:41 pm)
Scale down by 10, that's what I did with Solar Battles.
#3
11/05/2008 (8:44 am)
@Guimo. How do you give a top speed to the flying vehicle? Do you do it to the warsparow or to the flying vehicle class?
#4
11/05/2008 (8:58 pm)
Long time without reading this... lets see...

You should read this. Its a description of the flyingVehicle datablock and all its attributes.
http://www.garagegames.com/docs/tge/general/apds08.php

Of course you should also read this. The general vehicle datablock. http://www.garagegames.com/docs/tge/general/apds07.php

All the attributes from the vehicle are inherited to the flying vehicle so you must consider them and undertand what each one does.

In this case you should focus on the maneuveringForce attribute.

Here is an example script. You should study this and the one which comes with the warsparrow to gain better understanding. Also read the FlyingVehicle class in the engine.
http://www.garagegames.com/docs/tge/official/content/documentation/Scripters/Reference/Example%20Datablocks/FlyingVehicleData.html
#5
12/29/2008 (10:03 pm)
The scale down by 10 trick works pretty well. Any idea what, why, or where this problem comes from, James? I've never figured it out.

More pertinently for the thread, the other part of this equation is the drag, which is what ultimately limits your max speed in the standard flying vehicle physics. You can play with values of maneuveringForce and drag to get a useful acceleration rate and top speed.
#6
12/31/2008 (4:54 am)
I actually don't know. There's a few bugs in the collision and the Vehicle code thats causing it. I never really gotten to the problem back then, so I just scaled down.
#7
12/31/2008 (2:10 pm)
Of course the big question is.. why hasnt this bug been looked at? its age old, and really even if there is a hard cap limit put on it so this doesnt happen at all. This seems like one of the programmers could come up with a fix for it in the last 3 years..
#8
01/01/2009 (10:54 am)
You know how it goes... The Vehicle code has never been a priority to GG, which is a shame.
#9
01/01/2009 (12:52 pm)
You might try setting the vehicles integration higher.
When I first started messing around with flying vehicles adjusting integration usually fixed this same problem for me.

For me it was a very long drawn out process to "tune" my vehicle properly.