Archived

This topic is now archived and is closed to further replies.

LYH1

Confused on a isometric map with slope

Recommended Posts

I am working on a Srw(a japanese console game serial) like S-Rpg game Project for serval years. The follow pic show the developing state of the map part http://lyh1.members.easyspace.com/terrain.jpg I try to add slope on the map with terrain transitions. But the shape of tile become changed to triangle or sth else shape, also the overlap of tile with offset make me confuse on checking which tile does user point to. I have no idea on checking tile when it is not in shap of isometric. An other headache thing is Z-sorting of fringe object and terrain. If I sort them in different layer, the object will show incorrectly since Lower layer may overlaping higher layer''s object. If I do Z-sorting on each tile it may slove most problem, but the state machine must rewrite in other way, it is a nightmare. I hope someone will give me a idea on that two area ;-) I promise I will rewrite it in DX3D way if I finish this project I love delphi more than C

Share this post


Link to post
Share on other sites
I wrote an article for gamedev on how to do mouse maps with slopes, check the article section for help on how the mouse maps work.

As for the drawing of objects on the map, if you change the map drawing so that it draws all layers at once, then you will not have the problems that you are describing.

the statemachine will not be re-written too much, it al you need to do is have a very effiecent way of storing the objects on the map (either with a pointer on the tile to a list of objects, or change the way the objects are stored in memory and have a pointer to the virtual start of the list, with objects already drawn behind this virtual start)

When I find my code in tons of trouble,
Friends and colleages come to me,
Speaking words of wisdom:
"Write in C."

Share this post


Link to post
Share on other sites
Thanks Steven, finally I found the articles.
The color map method is a big hints ;-).(I am so stupid that I never think about it)
It may too much memory consumption in my cause, I need to find a alternative pure math method. Math is nightmare but it is lord

I love delphi more than C

Share this post


Link to post
Share on other sites
Memory should not be a problem as there is only 20 tiles max (actually 19) if you only have the hieght changing by 1 along the edges of the tiles (like I do in my article) if you allow changes grater than 1 then your mousemaps are going to eat memory like mad.

Oh and I take a height change of 1 to be about 1/2 tile height.

When I find my code in tons of trouble,
Friends and colleages come to me,
Speaking words of wisdom:
"Write in C."

Share this post


Link to post
Share on other sites