Sign in to follow this  

Tiles with different heights

This topic is 3571 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 everyone. I have done a simple isometric engine. Now i want to add tiles with different heights. My main doubt is how to define and then detect the height of the ground in a certain x,y position. I was thinking about defining 8 different tile slopes, one for each direction (N,S,E,W,NE,NW,SE,SW), each slope type with its getZ(X,Y) that retrieves the height of the ground based on a plane segments. For any horizontal tile getZ(X,Y) will retrieve its height. The world space in my isometric engine is 3D (X,Y,Z), Z only adds pixels to y axis of the screen when rendered. Is this idea ok, any better idea? Thanks.

Share this post


Link to post
Share on other sites
A trick I used was to use multiple isometric grids. The main grid was the visible grid that showed height. Each tile kept a variable defining its height. For instance, a height of 2 had a 16 pixel Y offset compared to a tile with a base height of 0.

The offset was used to calculate the second invisible isometric grid. This level does not show height, it is a regular flat isometric grid that aligns perfectly with the upper layer based on the Y offset. This enables things such as line of site and other useful isometric functionality.

This is just what I did.

Share this post


Link to post
Share on other sites
Thanks for your reply. I have implemented the method I describe above, and its working fine. I thik your idea is very interesting, so I am going to implement it and compere with mine. Thanks again.

Share this post


Link to post
Share on other sites

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