Jump to content
  • Advertisement
Sign in to follow this  
kolie

Walking.

This topic is 4698 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

In a game like Everquest, I have a question regarding the player and terrains. The player obviously has the ability to walk on the terrain as it slopes etc. How is the terrain represented in a client, and how would you use this terrain object to determine the height at which the player should be drawn at.

Share this post


Link to post
Share on other sites
Advertisement
not sure what you mean by "how is it represented in a client" but as for how to check where the player is to be drawn my best guess would be that the engine checks the bottom of the player's model to the faces(triangles) that make up the terrain (mesh (big collection of faces) ) If the model collides with a face then that's where it will be standing as far as the y-axis is concerned.

Share this post


Link to post
Share on other sites
Some times cheating is used, you know the height of whichever model then have them drawn up the right amount based on that. and you can use math to determine the grade it goes up based on the points your between, the 3 vertices of the particular triangle of the terrain mesh you in, and use those values to make it so the player doesnt pop up to the next height as this may cause it to appear as tho the play in inside the terain at times. I have the math somewhere in one of my old terrain map programs if it could be useful, but it may take some time to find, havent messed with terrain maps for a while, I like space games

Share this post


Link to post
Share on other sites
The terrain is generally represented by a grid of height values (a "height map" or "height field") or a mesh. Determining the height at which the player is drawn is usually done by finding the height of the point on the triangle he is over. With a mesh it means simply finding the triangle, but with a height field, you must know (or assume) how the height field is triangulated in order to figure out which triangle.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!