2d game Terrain with elevation

Started by
5 comments, last by sebman 11 years, 8 months ago
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?
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.
thanks sebman
the AOE II terrain is IsoMetric and has 7 different levels,like below
49afcc53jw1dvozzudys3j.jpg
49afcc53jw1dvozxv1iy6j.jpg
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.
thanks vleugel
yeah I know ?but I want to do is how it display?view? as a hill
in aoe mapEditor when you put your mouse on terrain it will become to a hill (like) ,how it algorithm??
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.

This topic is closed to new replies.

Advertisement