News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Layer 2 changes not showing.

Started by dewhi100, July 06, 2017, 10:19:05 PM

Previous topic - Next topic

dewhi100

Room above is a work in progress obv. Thing is, the layer 2 changes in SMILE, but ingame has the old palette and tile placement. This excludes the sky, which does indeed have that nasty soupy color as intended.
[spoiler][/spoiler]

Scyzer

Most rooms in Super Metroid have 2 options for backgrounds:

1. A layer 2 tilemap compressed within the level data. This is used for rooms with an editable layer 2.
2. A Background pointer. This contains a table that sets up a generic background for a room, and can be used by other rooms. The background tilemap itself is stored elsewhere in the ROM. most rooms use this option in the original game.

A room can be set up with both background types at the same time (as is the case with all scrolling sky rooms), however only one type is used when loading a room. This is decided by the Layer 2 / BG Data checkboxes in the Background section of the main RF window. If Layer 2 is checked, then the room will use the level data to form a background (it will draw with the default first tile of the CRE if no layer 2 is present). If BG Data is checked, then it reads the Background Pointer, and ignores everything in the layer 2 level data.

TLDR: Click Layer 2 in the Background section in the main RF window.

dewhi100

Why did they make a layer 2 if they are using bg?

Quietus

Because it's either / or. You can either use a generic, pre-built background in a room, which no doubt saves space when used in multiple rooms, or add a layer two manually, and build it with tiles yourself. It allows for lots of cool layering, and usually more detail, but it obviously uses a lot more level data.

dewhi100

I think I recall reading about this in Grime's guide. So this room has a layer 2, does that mean it is being used? If not, they went to the trouble of making it and then just used the Crateria Sky bg instead... This is where my confusion is stemming from.

Quietus

#5
Layer two is always there; it's just what's on / in it that changes, and you generally have two formats:

1. Layer one has your main tile data, such as floors, ceilings, and platforms, and layer two is a pre-built background set using one of the available pointers. Result: One layer of tiles, less detail, but uses less level data.
2. Layer one has your main tile data, such as floors, ceilings, and platforms, and layer two has the pre-built background disabled. A physical layer two is added, which can be built in the same way as you do with layer one. Result: Two layers of tiles, more detail - primarily via layering one tile above another, but this generally uses more level data.

Of course, it's possible to add a layer two, and not do anything with it, but it sounds rather useless. :^_^:

I don't know enough about the scrolling sky to say much about it, but I believe it's just a different type of pre-built layer two - the only difference being that it scrolls.

To summarise: There are always two layers. Layer one is always tiles, and layer two (background layer) is either pre-built or hand made. I hope that's clear. I felt like this was getting waffly! :grin:

Scyzer

I believe it's because originally the scrolling sky backgrounds were going to be stored only in the level data, which is why there's a layer 2 there. However the devs then decided to go with a preset background instead without removing layer 2.
Another possibility is that they built the rooms with the sky in them so they could see how to put the tilemaps together for the Background pointer.

Anyway the editable layer 2 in scrolling sky rooms is completely unused in the original game. If you want to use it, switch the background type (Layer 2 / BG Data checkbox), then set the Background, Main ASM and Setup ASM pointers to 0000.

dewhi100

Thanks, I get it now. I wasn't considering the prebuilt BG data to be "Layer 2" although I guess it is. I was only thinking of the hand-placed layer in the level editor. Anyway my question is answered, thank you both.