1 page
^^
vv
List results:
Search options:
Use \ before commas in usernames
I have recently been learning C++ with the intent of one day being able to make some 2d games, and maybe later down the line an engine that will allow me to make a Metroid style game. As I have been reading and learning I have also been looking at some game design theory and noticed that some 2d games read maps by translating it from textual maps.

So I was wondering if anyone knows how Super metroids rooms were stored and read by the games engine?
Thread title: 
Yoshi is back
Zhs2, uses C++ and is making a C++ SM I think, Maybe he'd know a little bit of what you want to learn?
I like Big Butts and I can not lie
Super Metroid, Fusion and Zero Mission all do this the same way with minor differences.  The consoles' memory to display the map is called the VRAM, there are two sections of the VRAM, one's called the characters, and the other's called the map.  The characters are 8x8 pixel blocks, which take up 32 bytes each (4-bits per pixel); the map is what puts the characters in order displayed and says which palette for each block to use, as well as which way to flip them (taking 2 bytes per tile).  I'll try to demonstrate visually:


Here's the characters.  We can see that they don't know what palette they're meant to use, only which colours in palette belong to which pixel.


The CPU goes through each block of the VRAM, checking the map; the map says block 1 block 1 block 1 block 1 block 2 block 2 block 2 block 40 block 23 etc. referring to the characters.  I've only displayed one of the bytes there to make it clearer, the map also says which palette to use (there's 15 in the palette RAM, sometimes called the CGRAM), and if it's horizontally flipped or vertically flipped.

There is in fact, more than one layer.  In Super Metroid, there's the level layer (the blocks Samus interacts with), the background layer (the scenery), and the foreground layer (the HUD and rain/fog/water effects).  In Fusion and Zero Mission, there's another layer, and it's just used for very specific things, as to not need to include them in the tileset (I guess).

Furthermore, the consoles use 8x8 blocks, however, the games are designed with 16x16 blocks.  All the blocks in the above map picture are actually 16x16's, the VRAM contains four tiles for every one tile used when designing the games' rooms (the four quarters).  So it goes: game's tileset -> the four blocks it's made of -> VRAM char || game's map -> the four blocks in VRAM it represents (somewhere in the ROM) -> VRAM map.  The VRAM chars are defined by colours in a palette, the palette is defined by the map.
yeah its looking good also then again im not so sure