# How would I achieve diablo like 2D isometric projection?

I am in the process of coming up with an idea for a game, and I would like it to be isometric like Diablo. The problem is I have no idea how it achieves the effect of height like in the following screenshot (on the columns):

Whatever the case, I'm sure it is going to be harder to achieve then creating a traditional isometric game, but any ideas regarding the topic would be greatly appreciated.

• What 'effect of height' is in that screenshot? Could you freehand some circles in there? – Pubby Apr 16 '12 at 8:37
• The arched walls - They appear to be going 'up'. – Darestium Apr 16 '12 at 8:47

## 2 Answers

You can try a traditional height map, which vertical dimension has more than 1 level (Diablo I uses 2 levels iirc). The objects in first level count as obstacles for player's character (and in all other cases when physics is required), but the second one contains "transparent" objects, which are used only to emulate high wals etc.

One method is to split up the graphics so they have square bases, then sort depth based on their vertical position. Lower to the screen has a higher draw depth.

For multiple levels the higher levels have higher depth than any of the previous. You also translate them upward by I think (height-of-the-tile - (width-of-the-tile / 2)) pixels.

If you're generating the sprites with a 3d modeler, you can also save their depth values. Then just add their position offset to the depth values in your shader. The nice thing about this is that it's per-pixel instead of per-sprite.