Vehicles in TGE
by Gustavo Boni · in Torque Game Engine · 11/03/2006 (10:44 am) · 27 replies
Hi all,
I'll develop a game where you controls a race car. I was wondering if the vehicle implementation is enough good to handle my game. I mean, can i have a good looking car behavior with stock TGE?
Another problem i'm having to figure out is how to create the track. Should i use .dif or .dts?
Thanks in Advance,
Gustavo Boni
I'll develop a game where you controls a race car. I was wondering if the vehicle implementation is enough good to handle my game. I mean, can i have a good looking car behavior with stock TGE?
Another problem i'm having to figure out is how to create the track. Should i use .dif or .dts?
Thanks in Advance,
Gustavo Boni
#2
So, i would need to use tools like Cartography shop/3D World Studio right? But i can't see a way to model a track in this tools using box and cilinders. Do you have any idea?
Thanks
11/03/2006 (10:50 am)
Andrew, thanks for the fast reply.So, i would need to use tools like Cartography shop/3D World Studio right? But i can't see a way to model a track in this tools using box and cilinders. Do you have any idea?
Thanks
#3
As for boxes and cylinders, it depends on what type of track you are making. Roads would be pretty easy, just an almost thin box with a road texture on it. What do you need cylinders for? Any detail could be done using the .DTS format (Milkshape or Blender would help there).
11/03/2006 (11:11 am)
Yes, and i recommend using 3D World Studio for that. It's not free, but I like it.As for boxes and cylinders, it depends on what type of track you are making. Roads would be pretty easy, just an almost thin box with a road texture on it. What do you need cylinders for? Any detail could be done using the .DTS format (Milkshape or Blender would help there).
#4
11/03/2006 (11:17 am)
Yeah, the flat roads are ok, but and about the curves and not flat roads?
#5
11/03/2006 (11:20 am)
Curved roads you could do. It will just take some clever brush-modeling. I see what you mean about not flat roads. You could use the terrain maybe?
#6
11/03/2006 (11:26 am)
Hm, not sure what you mean use the terrain for not flat roads. Maybe use the terrain deformations to create the track?
#7
11/03/2006 (11:32 am)
I meant that if you need hills, bumps, tilted roads, yes you could use the terrain deformation to create those sections, and use DIF's for everything flat.
#8
So, i can make the flat road using dif, and when i need hills, bumps, etc i shoud do that painting a road on the terrain surface?
11/03/2006 (11:35 am)
Ah, got it :)So, i can make the flat road using dif, and when i need hills, bumps, etc i shoud do that painting a road on the terrain surface?
#9
I don't know how well that would work. But try it out and let us all know!
11/03/2006 (11:38 am)
Exactly!I don't know how well that would work. But try it out and let us all know!
#10
Just to know, and about the car physics? TGE can handle it?
Thanks Andrew for the help :)
11/03/2006 (11:43 am)
Ah, ok!Just to know, and about the car physics? TGE can handle it?
Thanks Andrew for the help :)
#11
As far as physics, my feeling is that it is good. I've been having a hard time with it because I don't want ultra-realistic physics for the cars in my game (more arcade-ish I'm after). I do suspect it would need work, however, as the steering mechanism is not good at all, or I am missing something important. Also seems to be treading joystick axes as buttons. Hopefully I'll find I'm doing something wrong, but at the moment I have other priorities.
11/03/2006 (6:27 pm)
FYI TSE has a new terrain system that lets you make vast/vastly detailed terrains. It's still a little rough but if I were making a driving game, I would use that. TGE is very limited in regards to terrains, although what is there is very good IMO.As far as physics, my feeling is that it is good. I've been having a hard time with it because I don't want ultra-realistic physics for the cars in my game (more arcade-ish I'm after). I do suspect it would need work, however, as the steering mechanism is not good at all, or I am missing something important. Also seems to be treading joystick axes as buttons. Hopefully I'll find I'm doing something wrong, but at the moment I have other priorities.
#12
About Physics in TGE I'm really not happy, because the response of collisions of vehicles is too bad, and I need a Joint system to do Trailers and other things, but, not of this are implemented in the TGE.
Other thing what I'm not happy is the Power offered by the TGE, I've only a few Cars (only 4) in the Screen, without any effects and the FPS counter of the engine show to me something between 14 and 19. This make me too sad, because, my other engine based in a basic language offer much more power, and, I've Buy the TGE 1.4 and the update for 1.5, and too the RTSKit, this last is a deception for me, exactly because performance.
11/04/2006 (3:48 am)
Hi Latham, the steering mechanism isn't good in the Starter.Racing because is a Off-road, and off-road car have 4x4 traction, but, have one way to make it better, in your Car.cs you can change the Traction for the Only two front wheels, this help for the vehicle response in steer...About Physics in TGE I'm really not happy, because the response of collisions of vehicles is too bad, and I need a Joint system to do Trailers and other things, but, not of this are implemented in the TGE.
Other thing what I'm not happy is the Power offered by the TGE, I've only a few Cars (only 4) in the Screen, without any effects and the FPS counter of the engine show to me something between 14 and 19. This make me too sad, because, my other engine based in a basic language offer much more power, and, I've Buy the TGE 1.4 and the update for 1.5, and too the RTSKit, this last is a deception for me, exactly because performance.
#13
I hadn't run into the FPS issue yet...I'll have to watch out. I'm a bit surprised, though, since I believe this is the engine used with Tribes, which has a lot of vehicles?
Perhaps you should start another thread about the FPS issue specifically. Perhaps there's another issue with your level that is exacerbating the problem? I speculate....
11/04/2006 (1:50 pm)
Thanks for the tip!I hadn't run into the FPS issue yet...I'll have to watch out. I'm a bit surprised, though, since I believe this is the engine used with Tribes, which has a lot of vehicles?
Perhaps you should start another thread about the FPS issue specifically. Perhaps there's another issue with your level that is exacerbating the problem? I speculate....
#14
11/04/2006 (2:50 pm)
If you are using the starter.racing demo, I'd suggest porting to the starter.fps demo instead. I did that and found (after removing all the crossbow stuff) that I got better fps and the collisions were better. I had 20 of torques buggies in a world at the same time with no real fps drop. Now the addition of a spewing volcano did another job on it.
#16
11/05/2006 (4:10 am)
In the thuth, the unique thing i've changed is the traction of the two rear wheels to the two front wheels. Here is the modification in your "server/scripts/Car.cs":function WheeledVehicleData::onAdd(%this,%obj)
{
// Setup the car with some defaults tires & springs
for (%i = %obj.getWheelCount() - 1; %i >= 0; %i--) {
%obj.setWheelTire(%i,DefaultCarTire);
%obj.setWheelSpring(%i,DefaultCarSpring);
%obj.setWheelPowered(%i,false);
}
// Steer front tires
%obj.setWheelSteering(0,1);
%obj.setWheelSteering(1,1);
// Here I change the power for the Two front wheels and disable power for the rear wheels
%obj.setWheelPowered(0,true);
%obj.setWheelPowered(1,true);
// %obj.setWheelPowered(2,true);
// %obj.setWheelPowered(3,true);
}
#17
11/08/2006 (9:19 am)
@Mike, Can you explain how I port the Starter.Racing to Starter.FPS ???
#18
I think Mike must be mistaken about frame rates, since the difference between starter.fps and starter.racing is purely in the scripts, while all time-consuming things about vehicles belong in the engine. I can only guess that the terrain provided in starter.fps suits vehicles better.
My experiences with rear-wheel powered vehicles is that they are totally unable to steer. 4-wheel powered vehicles are far too unpredictable and twitchy.
edit: for tracks, you can just use terrains and paint concrete/mud/whatever textures onto them, just as starter.racing does, it works quite well. Although per-texture properties such as friction, dustiness etc. would be nice.
11/08/2006 (9:27 am)
The vehicle driving physics in TGE is quite good (although it takes a lot of practice to get to grips with it). The collision physics is unfortunately quite bugged. With lots of tweaking/hacking the engine, I have managed to get reasonable collisions going in my car game, and have managed to stop the freeze-ups and game crashes that happen with stock TGE. This took several months of pain. There are fundamental flaws in the collision detection and resolution code.I think Mike must be mistaken about frame rates, since the difference between starter.fps and starter.racing is purely in the scripts, while all time-consuming things about vehicles belong in the engine. I can only guess that the terrain provided in starter.fps suits vehicles better.
My experiences with rear-wheel powered vehicles is that they are totally unable to steer. 4-wheel powered vehicles are far too unpredictable and twitchy.
edit: for tracks, you can just use terrains and paint concrete/mud/whatever textures onto them, just as starter.racing does, it works quite well. Although per-texture properties such as friction, dustiness etc. would be nice.
#19
11/08/2006 (10:49 am)
I noticed that vehicle collisions in 1.5 seem to be working much better with less freeze ups. My experience has also been by creating your vehicle models with a number of smaller collision boxes instead of a single very large collision box, you can avoid a lot of the strange irregularities that take place with high speed collisions.
#20
11/08/2006 (11:15 am)
Robert: really? I thought TGE only let you use one collision mesh for vehicles?
Torque Owner Andrew Hull