lord wrote:What is a "metatile"???
What the hell? Only Bregalad can answer now?
Well, a metatile is a block, larger than 8x8 pixels, formed by more than 1 tile (wich is 8x8 pixels). Metatiles exist to make the level maps smaller. If you were to define a screen for a game directly using tiles, it would take 1kb (1024 bytes) to define the whole screen (tiles + attributes). But if you use 16x16 pixels (2x2 tiles) metatiles, there will be only 240 of them in a screen, wich means a screen can now be defined by only 240 bytes. That's a huge gain, 1024 to 240, don't you think?
You have to define the metatiles in a separate space, of course. If you're using 16x16 pixels (2x2 tiles) metatiles, you'll have to define what 4 tiles that metatile uses. A common format for 16x16 metatiles uses 5 bytes for each, with 4 bytes indicating the tiles used to draw it, and the 5th byte indicating the palette to use for the block, and the type of the block (solid, sky, water, etc - stuff used for collision and physics)
So, when you decode the map to the screen, you don't copy directly. You read a byte from the map, check what tiles make up that block and draw those tiles to the screen. And don't forget to properly set the attributes too.
The most common size for metatiles is 16x16 pixels, but there are others like 32x16, 32x32, etc. Each one has it's pro's and con's. I guess that's it.