gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > isometric maps

#12224 - shogun - Tue Nov 04, 2003 2:13 pm

Does anyone know if there are any tutorials for isometric mapping like final fantasy tactics and xcom?

thanks

#12225 - yaustar - Tue Nov 04, 2003 2:49 pm

as far as ai know, they are normal tiles just drawn isometrically.
_________________
[Blog] [Portfolio]

#12227 - NoMis - Tue Nov 04, 2003 6:49 pm

Take a look at this. There should be some helpful information.

http://www.gamedev.net/reference/list.asp?categoryid=44

NoMis

#12241 - shogun - Wed Nov 05, 2003 8:36 am

thanks for the help guys

#12242 - Burton Radons - Wed Nov 05, 2003 9:54 am

Mapping isometric engines to a tile-based system like the GBA requires complexity sacrifices and careful planning. The simplest type of isometric engine is the kind used in FFT, so it's a good case example.

If you get the FFT ROM and open it up in VBA, then toggle the first few layers, you'll see that it separates the map into overlapping and base layers. Sprites initially start prioritised above the overlapping layer. Right before the first line of the tile they're on is to be rendered, they're switched below the overlapping layer in an HBlank interrupt, unless if they're on an overlapping tile, in which case they're left alone.

That's the simple case anyway. If you have a set of stairs leading away from the viewer it won't work, because the tile the player is on would have both overlapping and overlapped segments, so no priority makes sense. The general tactic appears to be to make these illegal, so that maps generally raise in height as they go up the map. This can be checked during editing.

It also doesn't work for a house before the sprite, because it raises multiple tiles. For that, you have to put the sprite below the overlapping layer at an earlier level. That processing can be done as the map is loaded; it's just a matter of doing some maximum elevation calculations, loading that off into the tiles higher than this one with it decrementing every tile (storing the maximum discovered elevation delta), and then switching the sprite to behind the overlapping layer that many tiles back.

Composing the map for rendering is simple and complex. These games use the 2:1 isometric ratio, so base tiles are 16x16 pixels, so that we can keep the base tile size of 8x8. For every two pixels across, we step one pixel up. Here's a picture from Tactics Ogre.

[Images not permitted - Click here to view it]

The highlighted region is one tile, and in this case is composed exclusively of transitions. The four tiles at the bottom are transitions to the cliff. The four at the top are transitions to grass. With each tile type you need four transitions: transition down to a cliff, transition up to a cliff (as with the rocks there), transition up to space (usually black-bordered to make it clear and improve depth perception), and finally transition up to the same type of tile. Each new tile type requires a transition up for every other tile type. If you have water, then it might require a transition down and up to it as well, although that can be removed. Since this transition is animated, that would save you a lot of assets.

If you want to make an isometric engine of this type, you should first start with a single tile type, without thinking about sprites. Render a map that is a Q-Bert-style level with no overlapping. Add overlapping with a single tile. Add sprites. Add multiple tile types. Add multiple step overlapping. Add mega-tiles like houses.

A good authoring tool will allow drawing new tile types without causing artists to go insane as they try to match up transitions. It will also unobtrusively highlight errors as maps are being composed, so that the designer can remove them as he works while still thinking about the grand design of the map.

X-Com or Ultima VII cannot be done with a tile system because they have no constraints that we can make use of. Just look at a corn field in X-Com for example. However, the GBA may have enough power to do a simplified version of Ultima VII in Mode 3. In that case, it all comes down to redraw minimisation and a low frame-rate (Ultima VII ran at a locked 7 FPS).