Game Development Community

Non-Standard Playable Avatars

by Jay Barnson · in Torque Game Engine · 11/10/2004 (1:46 pm) · 2 replies

Okay - a couple of dumb questions, and I don't have my dev machine right in front of me for the particulars (right now), but here goes:

#1 - if you are creating something that doesn't mimic the behavior of the default Player, or Wheeled Vehicle / Hover Vehicle / etc. - for example, the balls in Orbz or Marble Blast - is it best to start with a new class (derived from ShapeBase) in the source code, or to somehow override the default behaviors in TorqueScript?

#2 - I'm trying to follow the logic mapping the keys to actions. I found a script with function calls to set variables like, say, "$moveForward" which is incremented by MoveSpeed (it's been a couple of days since I looked at it, so my memory is already fading). Anyway - if I commented it out, sure enough the player didn't move. But I couldn't find where the variable $moveForward (again - unsure of the name) was actually being USED. So what am I missing?

About the author

Jay has been a mainstream and indie game developer for a... uh, long time. His professional start came in 1994 developing titles for the then-unknown and upcoming Sony Playstation. He runs Rampant Games and blogs at Tales of the Rampant Coyote.


#1
11/10/2004 (2:19 pm)
1) Best to create a new class in Torque (derived from ShapeBase or GameBase depending on your needs/abilities).

2) All of the move stuff is handled in the engine (C++) with certain parts of the move structure exposed to script.

For example:
moveForward() is a function in default.bind.cs that sets $mvForwardAction which is exposed to script in MoveManager::init() in game\gameConnectionMoves.cc
#2
11/10/2004 (5:51 pm)
Ah-hah.

Okay, that answers a lot of questions. I was suspicious that this was the case - but I wanted to make sure it wasn't something easily solved at the script level first.

Thanks muchly!