Jump to content
  • Advertisement
Sign in to follow this  
face08

2d game Terrain with elevation

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

Hi! I''m developing an isometric engine but I''ve have a problem with the elevation of the terrain... I''ve seen how Age of Empires 2 resolves the problem (7 different levels of elevation) but I can''t imagine how to do it... Can anyone help me please?

Share this post


Link to post
Share on other sites
Advertisement
Hi face,

I think this depends a bit on your plans.
I never played AOE 2, but I know that in AOE 1 the tiles are sloped in such a way, that higher tiles can't overlap sprites that are (spatially) below them. I will try to make a screenshot later on to demonstrate it. Anyway, this means that you can place all tiles next to each other and render them in one layer which can be drawn as a background.

But...
If you want your tiles to be sloped in a different way or uninclined (I'm not quite sure about the existence of that word ^^), you will have to render each tile individually.

Share this post


Link to post
Share on other sites
I think you should just give certain tiles a slope value, which will be used for your characters when they pass over it.
Let them do a check before they walk over it, just like you do when they want to pass a water tile or any other non-accessable terain, and animate them differently when they walk on a hill. Edited by vleugel

Share this post


Link to post
Share on other sites
in aoe mapEditor when you put your mouse on terrain it will become to a hill (like) ,how it algorithm??

Share this post


Link to post
Share on other sites
It'll be quite exhausting if I made up an algorithm here, from scratch. But I can give you a simple impression.
Assuming you're using 2D this means that you'll need tile graphics that fit perfectly (and nothing less) on each other.

You can give each tile a value for it's base coördinate (not elevated) and a value for it's height (and much more other values, as the slope value mentioned by vleugel), to indicate where the graphic will be drawn. Then you make sure each tile is being in the right order (with Z-index values for example) - And voila you will have a map.

The prerendering method as I mentioned early, will probably not work quite well with these editors, as the whole map has to be re-rendered each time you heighten the terrain.

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!