Game Development Community

Speedd????

by Ian Roach · in Torque Game Engine · 12/09/2001 (11:08 pm) · 2 replies

Hey guys ive just got a few queries about the engine which some of u may be able to answer.

Im currently trying to implement a scout flyer vehicle with no maxium top speed (i.e just gets faster and faster)

Firstly - How do i get a vehicle into the engine. I know theres been a few posts about it but is there just 1 tutorial which discusses how to start out with the latest revision and go from there ?

Secondly - If i was to have a scout flyer or such in teh game can i limit its max flying height and unlimit its max speed ?

Thirdly - How does the terrain engine work with rendering. If i have a racing game going thry canyons e.t.c does the engine still draw all the hills e.t.c not shown on the immediate screen ? If so will this stop me from making an extremely fast racing game ?

Thanks

#1
12/10/2001 (1:32 pm)
It's really not very hard.

You need to make a vehicle datablock. Then create the vehicle just like you would a player, and set the client to control it.

Look in game.cs in the player spawn code, you can copy that and modify it to create a vehicle instead of a player. Set the transform the same way, and use %client.setControlObject(%vehicle).

That just creates a vehicle that you control.

There are other things that should be done if you want the player to look like he's in the vehicle. Use the vehicle::onCollision() function to mount the player and do all of the above. Use vehicle::onJump() to dismount him.

Thats about it. It's a little hard to get used to the scripts at first. When I was learning T1 scripts I had no idea what the hell I was doing. One day it just clicked and I understood. Eventually you'll be able to do anything you want in the scripts.


Dark
#2
12/10/2001 (1:38 pm)
Sorry, forgot about the other two questions. There is a ceiling for vehicles, it's set in the mission files I think. I don't think you could have unlimited speed without editing the source, but you could probably set the max speed to 999999 or something.

You should be able to go through the canyons, I don't know why not. I have a 500MHZ P3, 256MB of memory, and a GF2. Rith my rig I can look around at the terrain from high in the air so it's all rendered at once, with the visible distance pretty high without any problems. So you shouldn't have any problems there. The only problem you might have is sliding into walls going at high speeds during turns. But that can be fixed.


Dark