Jump to content

  • Log In with Google      Sign In   
  • Create Account


2d game Terrain with elevation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 face08   Members   -  Reputation: 109

Like
0Likes
Like

Posted 07 August 2012 - 02:14 AM

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?

Sponsor:

#2 sebman   Members   -  Reputation: 108

Like
0Likes
Like

Posted 07 August 2012 - 10:58 AM

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.

#3 face08   Members   -  Reputation: 109

Like
0Likes
Like

Posted 07 August 2012 - 07:08 PM

thanks sebman
the AOE II terrain is IsoMetric and has 7 different levels,like below
Posted Image
Posted Image

#4 vleugel   Members   -  Reputation: 252

Like
0Likes
Like

Posted 08 August 2012 - 12:33 AM

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, 08 August 2012 - 12:34 AM.


#5 face08   Members   -  Reputation: 109

Like
0Likes
Like

Posted 08 August 2012 - 12:59 AM

thanks vleugel
yeah I know ,but I want to do is how it display(view) as a hill

#6 face08   Members   -  Reputation: 109

Like
0Likes
Like

Posted 08 August 2012 - 01:14 AM

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

#7 sebman   Members   -  Reputation: 108

Like
0Likes
Like

Posted 08 August 2012 - 05:59 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS