Game Development Community

The best hack you've done in Torque

by Tim Heldna · in Torque Game Engine · 12/13/2005 (7:25 am) · 6 replies

Hi all,

I've done some funny / dodgy things with scripting & code when i haven't been able to get the engine to behave how i want.

It's ammusing to me some of the things i've come up with as a substitute to an effecient solution. Things that still work but through lack of coding knowledge are written in the worst way.

I wouldn't mind hearing about other peoples adventures with the engine!!!

I'll get the ball rolling...

We're making a quick game that involves a helicopter. Because the collision with the ground is so bad, & we haven't been able to fix Torque's vehicle collision code, we are forced to painfully place triggers throughout the entire level just above ground height, which when entered gracefully slow the helicopter to almost a stop then gently hover it up out of the trigger zone (where the player regains control again) and into the safety of open sky and away from the nasty *why am i stuck?* ground. :)

Your turn...

#1
12/13/2005 (8:15 am)
Pre iTickable era, I used 1ms delayed triggers that kept with a target (players) position to do some hacked onTick checks from script. F'course I was only able to work from script in this case.
#2
12/13/2005 (11:35 am)
I might be absolutely off, but isn't there a way to check the height above ground?
#3
12/13/2005 (11:42 am)
Yes he could have added a downward raycast to the helicopter to slow it when it was too close to the ground, but anyways =P
#4
12/13/2005 (11:44 am)
Dirk: yes, there is, that's what occurred to me on reading Tim's post.

Having said that, my first attempts with torque involved ripping the player class to shreds in order to make it behave like a spaceship... er... flyingvehicle anyone? ;-)
#5
12/13/2005 (11:50 am)
Two players on the same computer (half screen for each player). It worked for players but never worked for vehicles... too bad when you are making a game named "MiniOne Racing".

Not really a hack as it's not really difficult to do but we had so much collision problems between vehicles that we entirely disabled collisions between them. What was a bug is now one of the main features of MiniOne Racing!
#6
12/13/2005 (12:25 pm)
My greatest hack... (note im a artist not really a coder.. heh)

To get image based light maps working on DTS objects I couldnt figure out how to store a second set of UVs for an object. So in the rendering code I broke LOD (since I wasnt using it anyways. heh) and when rendering the lightmap I used the UV's of a copy of the same object(with the UVs changed for my needs of course) in the other LOD. Fun ne? It worked in this case but it prolly break in other level cases. heh.