Adding new map entities (ladders) to the engine?
by Stefan Beffy Moises · in Torque Game Engine · 10/06/2002 (10:31 pm) · 6 replies
Hey there,
I thought I try to add ladders to the maps / the engine and was wondering if anybody ever added a new entity for Worldcraft/Quark/whatever to the engine?
Maybe someone got any pointers what needs to be done in the core engine code?
Of course I have to add it to the Torque fgd definition file and as a new class to the map2Dif files, but I couldn't really find how the engine reads these entities back in from the .DIF files...
Any insights anybody before I start diggin' in?
I thought I try to add ladders to the maps / the engine and was wondering if anybody ever added a new entity for Worldcraft/Quark/whatever to the engine?
Maybe someone got any pointers what needs to be done in the core engine code?
Of course I have to add it to the Torque fgd definition file and as a new class to the map2Dif files, but I couldn't really find how the engine reads these entities back in from the .DIF files...
Any insights anybody before I start diggin' in?
About the author
#2
10/06/2002 (10:55 pm)
James, sure, would be great to see your code! Maybe we can work together on this issue... what entity do you want to add?
#3
10/06/2002 (11:30 pm)
The forcefield code might help... That reads surfaces from the .dif that are forcefield surfaces....
#4
Stuart: Good idea.. I'll take a look at that.
10/07/2002 (9:59 am)
I'm looking at trying to "tag" my new 'transparent' entities so we can actually include proper glass and such in the engine. I'll zip up and either mail or DCC you the code when I get back home tonight (around 7 PST).Stuart: Good idea.. I'll take a look at that.
#5
any thoughts?
10/08/2002 (3:58 am)
Hey James, thanks for the code! I found some interesting ideas specifically for ladders here in case anyone is interested... I'm still not sure what the best solution would be - adding a special "ladder" texture, and if the player touches it, some ladder code jumps in, maybe changes the gravity, make the player go up and down instead of forward and backward as long as he is in contact with the texture (=ladder brush), or make a more complex mapping entity, e.g. like doors or forcefields, with triggers and paths...any thoughts?
#6
You look at the ground to select a spot to place the ladder, press the use button, and a ladder builds (animates) and slowly tilts forwards till it collides with something. When that happens it stops. I then set the runnable surface to up to 90 degrees IF you're in contact with a ladder object.
It works pretty well but I'd love to have a "trigger" based method which one can add via Hammer. What I did before was really easy, most of the trigger code was already there. I had problems with the network updating of the player (my ladder physics tampered with the player's physics a little too much) where the server and client wouldn't be perfectly synchronized as to when the player entered or left the ladder.
Let me know if you make any progress I'd love to help out but I'm just a little swamped with work this month.
10/08/2002 (5:12 am)
Well I took a totally different path for my ones (based on what I explained on the other thread).You look at the ground to select a spot to place the ladder, press the use button, and a ladder builds (animates) and slowly tilts forwards till it collides with something. When that happens it stops. I then set the runnable surface to up to 90 degrees IF you're in contact with a ladder object.
It works pretty well but I'd love to have a "trigger" based method which one can add via Hammer. What I did before was really easy, most of the trigger code was already there. I had problems with the network updating of the player (my ladder physics tampered with the player's physics a little too much) where the server and client wouldn't be perfectly synchronized as to when the player entered or left the ladder.
Let me know if you make any progress I'd love to help out but I'm just a little swamped with work this month.
Torque Owner James \"Corvidae\" Williams