.< Am I correct to assume it would be "> Vehicle players | Torque Game Engine | Forums | Community | GarageGames.com

Game Development Community

Vehicle players

by Luke Meckley · in Torque Game Engine · 03/19/2008 (2:05 am) · 1 replies

I think I wrongly posted this in the "Programming" forum. Since the whole topic is based around scripting itself it seemed better suited here. Pardon me for my nubbery of not knowing what forums are here. >.<




Am I correct to assume it would be easier to attach a dummy model to a vehicle and then spawn the player that way rather than trying to script together a vehicle that acts as a player, or am I making the entire process much harder than it needs to be simply because I am looking at the demo stuff wrong?

For clarity, the vehicles will be tank like, floating. I know I am looking at probably a lot of work there, but the underlying functions of everything else are more important than the actual vehicle dynamics at this point. As long as they move, and handle multiple "secondary" type weapons it'll be close enough for now.

I was even thinking, or rather hoping, since the "player" itself won't really need to be rendered I can make the mounts for weapons and all right on the player and avoid even having to make the vehicle itself fire weapons. Again, hoping, that as long as I get the relative mounts/cam/eye locations right 1st/3rd views would still look normal, though I am kind of afraid in 3rd that projectiles will come out of some absurd location.

Another concern I have is one particular structure. A sort of weapons depot where you can land and choose secondary armaments. It will need to store a certain number of each type and regenerate them on a schedule. I haven't gotten too far into this one yet, but does it seem like something that could be done in script, at least temporarily?

I am pretty new to TS, though I have a fairly decent background with other languages. I am sure with enough work anything is possible, but I am trying to at least get a prototype going as much as I can from script alone to make sure it's the right choice.

About the author


#1
03/19/2008 (7:48 am)
The TGE Racing starter example uses a "player is a car" system.

If instead you use a walking player model, resources exist to guide you toward a system where a player mounts to a car model and can later dismount. I believe many assume that mountpoint 0 in the model is the drivers location, and play the "sitting" animation while they are mounted there.

Differences exist in the engine code for various supporting objects depending on which basic strategy you choose. For example, AFAIK, the standard Speedometer GUI HUD object system assumes the "player as car" metaphor and won't display itself if the control object is a "player" mounted in a vehicile. I made straight forward mods to have the Gui object respond to either situation.

The existing vehicle class in the engine available to script include wheeled vehicles, flying vehicles, hover vehicles, ... plus various resourcdes like helicopters, Flying wheeled vehicles, etc. perhaps the standard Hover Vehicle would serve your purposes.