Sign in to follow this  

2d game Terrain with elevation

This topic is 1957 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
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
thanks sebman
the AOE II terrain is IsoMetric and has 7 different levels,like below
[img]http://ww2.sinaimg.cn/mw690/49afcc53jw1dvozzudys3j.jpg[/img]
[img]http://ww2.sinaimg.cn/mw690/49afcc53jw1dvozxv1iy6j.jpg[/img]

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
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

This topic is 1957 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this