News:

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

Main Menu

Loading in one scroll block up results in green vomit

Started by Su, June 05, 2014, 02:16:04 PM

Previous topic - Next topic

Su

So...

Loading in one scroll block above the floor results in a green variant of the Testroom scrolling background messup. It behaves almost exactly the same... but instead of being pink, it's green. And it goes in front of a few things the normal variant doesn't - specifically, Samus (after loading in; prior to control being handed to the player, she appears in front of it) and the tiles that appear behind her in normal gameplay.

The search function is down. A quick skim through DSO's guide, the Commonly Asked, and ShyguyMst's YouTube didn't turn anything up.

Is this fixable, or do I have to start over, or re-think level design, or what?

Kitsune_Phoenix

Could you upload the room you were working with so we could see?
Also, try posting some screenshots to Dropbox and using the IMG tags to show us.

Smiley

Make sure your Area Load Stations are set up correctly. Sounds like you messed something up while editing them.

Su

Quote from: SMILEuser96 on June 05, 2014, 04:00:31 PM
Make sure your Area Load Stations are set up correctly. Sounds like you messed something up while editing them.

Yeah, that's probably what happened.

Also, I forgot to mention: I'm loading into the "ship".

Pictures, courtesy of Google Drive:
https://drive.google.com/folderview?id=0B-bqPFqXxJMVZkcyR1cxakJ5aDg&usp=sharing

The .ips patch, so you can scrutinize my terrible tiling:
https://drive.google.com/file/d/0B-bqPFqXxJMVak9MTDY2Vi03RFE/edit?usp=sharing

Smiley

I'm going to just throw a guess here and say that you just need to get rid of the scrolling sky. Looks like the fix is that simple.

Su

Quote from: SMILEuser96 on June 05, 2014, 05:09:11 PM
I'm going to just throw a guess here and say that you just need to get rid of the scrolling sky. Looks like the fix is that simple.

Thanks for the advice. Ideally, I'd like the background to still sky-scroll, but I guess I can live without that.

HOWEVER
...Doing that hasn't so much fixed the problem as changed it into another one:

https://drive.google.com/file/d/0B-bqPFqXxJMVSFdxT2JoenYtbDg/edit?usp=sharing
Huh

https://drive.google.com/file/d/0B-bqPFqXxJMVRGVNVlEyRWNQY0E/edit?usp=sharing
Oh.

Would you like an .ips for this one as well?


Mettyk25jigsaw

To properly get rid of the scrolling sky, you can actually leave the layer 2 sky there, but you would have to click on tools/bg editor/bg-layer2 scrolling and change the dropdown box to 'use bg data pointer' and then choose a bg pointer to go in the pointer editor under edit tab that uses a corresponding tileset for that pointer and also make sure the layer 1/2/fx0 pointer (L-1/2, or fx0 ptr---depending on version of smile you have) is one that is compatible to the bg pointer...
  Oh. and with the bg/layer 2 scrolling thing I would suggest putting the x an y values as both '0C's' if you are going to use the bg pointer rather than the layer 2.

  Also, I have tried myself in other rooms to click on remove layer 2 bg (under tools/bg editor) and that works but you still would have to do all of the above methods, although I have not tried removing layer 2 in ship room but I don't see why it wouldn't work. Advantage of removing Layer 2? I believe it makes the room be able to use a smaller size level data amount when you press save room and the level data room size used/limit comes up.


Su

#8
Quote from: P.JBoy on June 06, 2014, 05:55:38 AM
http://interdpth.arc-nova.org/PJs%20stuff/IPS%20patches/Super%20Metroid%20Scrolling%20Sky%20Fix%20Patch.ips

Hoping a simple patch would solve the problem, I did so.
It didn't seem to do anything?

Have a video demonstrating the issue:
https://drive.google.com/file/d/0B-bqPFqXxJMVNDBSdHpfWDUtam8/edit?usp=sharing

I guess I'll try that technobabble option.

Edit: Okay, I think I removed layer 2, but...
https://drive.google.com/file/d/0B-bqPFqXxJMVSGJDbzJxRE5TemM/edit?usp=sharing
I don't even know anymore
I am utterly lost

Smiley

Just to clarify:
Pointers should be:
FX2: 0000
BG_Data: 0000
Layer1_2 (or FX0): 0000

And then Tools -> Background Editor -> BG/Layer 2 scrolling -> Layer 2 background (custom) from the dropdown menu.

That's how you get rid of the scrolling sky. If the sky is causing the problem, doing this will fix it.

Su

Quote from: SMILEuser96 on June 06, 2014, 08:39:54 AM
Just to clarify:
Pointers should be:
FX2: 0000
BG_Data: 0000
Layer1_2 (or FX0): 0000

And then Tools -> Background Editor -> BG/Layer 2 scrolling -> Layer 2 background (custom) from the dropdown menu.

That's how you get rid of the scrolling sky. If the sky is causing the problem, doing this will fix it.

That fixed it! Thankyou so much smiley~ ♥ Now I can go back to tearing my hair out on the tiling.
I'm still curious as to why it happens though?

Scyzer

Simple reason for why it happens is cause the scrolling sky is such a large background. Common misconception is that it's because the BG is animated. The sky scrolling has absolutely nothing to do with the BG glitching up. Scrolling is all done via HDMA and edits the VRAM directly, so it only changes the data which is already there.

[spoiler=More indepth]
The sky uses BG_Data (as in, a preset tilemap already hardcoded into the rom to be used as a layer 2, instead of using tiledata encoded in the level data).
BG_Data pointers contain a table of values and pointers which have the game load a tilemap for only 1 screen, or 16x16 tiles. This is where the first problem arises.
The normal landing site sky background is actually 16x76 tiles (other skies are different sizes), which is far too large to store in a single BG_Data tilemap. The game splits each 16x16 group of tiles into seperate tilemaps, which leaves us with 5 full BG tilemaps for a single sky. The game can only load one of these when loading a door, so it needs to know which one.
The landing site BG_Data table compares which door Samus entered the room from so it can grab the right tilemap to write into layer 2. If it doesn't find a matching door in the table, it wont change the BG at all. This is the single reason for the scrolling sky glitch.
Lets say you enter the scrolling sky from one of the bottom doors. Those two doors are hardcoded via the BG_Data pointer to load up the bottom part of the scrolling sky. If you move one of those doors to the very top of the room, then entering through it will still load up the very bottom of the sky. When you drop down and up again, the sky will update offscreen to show the correct tilemap. This kind of glitch will occur when you change the vertical target for any of the original landing site doors. Moving them horizontally causes no problems, because the sky is obviously going to be the same.
If you link up a completely new door to the landing site which doesn't originally lead there, then you get the second type of BG glitch, where you might seen random scrolling parts of the previous room's BG. This is because the BG_Data searched it's table for a door match, and couldn't find one, so it didn't reload layer 2. The result is that the previous BG is now running under the HDMA routine which scrolls parts of the BG. It'll correct itself when it scrolls offscreen, and the tilemap can be updated to normal.

The third kind of glitch occurs only during quickmet, and is unavoidable due to how SMILE handles starting in a room. It creates a new door to spawn samus in the room, so the BG_Data can't find this door and won't load a BG. Since there is no previous BG to remain, the game just uses junk data left over from the snes initiation as if it were an actual background anyway, which is why you can see random purple or green tiles in the BG.
[/spoiler]

[spoiler=TLDR Version]
Don't change the doors that lead to the landing site, or their heights.
[/spoiler]

Su

Thanks Scyzer! I now understand why it happens.

...I was going to move the doors after I got the problem fixed, actually. I'm so glad I waited '0_o

Smiley

Well, if you got rid of the scrolling sky (like in my previous post), then you can change the doors as you wish.

Su

Quote from: SMILEuser96 on June 06, 2014, 02:57:02 PM
Well, if you got rid of the scrolling sky (like in my previous post), then you can change the doors as you wish.

I are idiot
Thankyou; it would have taken me a long time to work that one out.