Advertisement Jump to content
Sign in to follow this  

stairs and ramps.

This topic is 4477 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!