stairs and ramps.

Started by
-1 comments, last by kRogue 17 years, 6 months ago
I was wondering how people have typically handled stairs and ramps in a FPS. I was thinking that for each entity (i.e. playeers/monsters/projectiles) would have some kind of entity-properties field [for example, stop on any hit (liek projectiles) or "try to move" for players/monsters] and each enviromental element (i.e. walls, stairs, ect) would have an enviromental-properties fields [for example walls would be marked stop, stairs would have try marker together with a function "bounc" that takes in a delta going into the stairs and outputs a delta of what happens].... this way a projectile will explode onhitting a stair but a player/monster would move "up" the stairs, similar for movement along walls as well....but now this is what I do not like: a plater moves, the stiars modifies the delta to make the player go "up" but then one has to possibly recompute intersection again.... moreover one could be unlucky and imagine a situation where a movement could induce an "infinite" bouncing affect (like 3 monters very close and the middle one tries to move and ends up constantly calling the "bounce" routine of the two monsters it is stuck between.... or do people nowadas take a more physics based approach? keep track of all the forces on an object alonc with its velocity and as an object hits things it indcues new forces and such (so a player saying "move" forward induces a force in the direction to go, the ground makes a friction force, ect)
Close this Gamedev account, I have outgrown Gamedev.

This topic is closed to new replies.

Advertisement