Thursday, February 17, 2011

How to Make an Isometric Game Engine #1

What does Civilization 3 have in common with Farmville? For one, they are both isometric games. Turns out many popular games use this style of graphics. Unlike perspective graphics with a vanishing point, in isometric games the world consists of isometric tiles which are laid evenly to build game levels.

It looks very simple. First of all, how would you represent such a level? That's easy you say, just have a two dimensional array of values. Each value represents what kind of tile there is in that space. Just like in a 2D tile-based game seen straight from above, X coordinate could increase to the right and Y coordinate down, except at a slight tilt.

This is not the only possible coordinate system of course, but this way the tiles can be drawn in the traditional loop of increasing X and Y, and still occlude each other correctly. That's it then? All the complexities of an isometric engine solved. Not quite.

To be continued...