Pages: 1
Posted on 07-30-23, 08:01 pm
Paragoomba


Karma: -2
Posts: 52/71
Since: 08-24-20
Hi!! So I was editing the "Volcano 3" TOP background and everything was going just fine. However then I tested the level on the DS and for some reason the background is like glitches. It's a bit difficult to explain but it was like some parts of it were missing, it was glitched and it had some purple parts releasing some type of flame. I know it sounds like a joke but I swear it isn't. If anyone knows what I mean and knows how to fix it, please answer. Thank you!!
Posted on 07-31-23, 03:46 am (rev. 1 by Thierry on 07-31-23, 03:47 am)
この記号は… 解読できないよ…


Karma: 6288
Posts: 2716/2781
Since: 01-17-13
I'll make a more in-depth tutorial on this later, but the gist of this issue is that certain backgrounds have animations attached to them.
These animations are used extensively for world 8 backgrounds to simulate glowing or flowing lava, as seen here.



Here are the rough technical details.
Each background is made out of a small palette of 8x8 tiles (each exactly 8 pixels in width) that are then arranged on a canvas to build the background. Some of these tiles have an animation attached to them which cannot be removed as far as we know. It may be hardcoded, or there may be a reference file for each background. I don't know if anyone looked into this.

Now. When importing backgrounds, NSMBe's algorithm fills the tiles however it pleases in an attempt to output the objective "best result" using the limited tile palette it has to assemble the background. As the palette is tiny, it will merge any tiles that look similar enough in an effort to avoid having near-duplicate and therefore save tiles. It will keep doing this until the palette it needs to build the background is tiny enough to fit into the limited palette the game uses.

NSMBe has no awareness of animated tiles however and makes no effort to avoid using them, which leads to problems as animated tiles end up littered across the resulting background.

In some cases, this can be avoided. For example in the case of the "Volcano 2" TOP background, the animated tiles are situated at the last row of tiles, as highlighted in purple here:



If you reduce the number of tiles necessarily to assemble the background, NSMBe does not need to fill up the entire palette and will leave these tiles blank. Here's an example of a background I modified prior to importing which achieves just that.



Notice how the clouds are very repetitive and how there's only one volcano repeated over and over, as opposed to several of them. This is to save as many tiles as possible in an attempt to free much of the last row of tiles.


Unfortunately, the animated tiles for the Volcano 3 TOP background seem to be located earlier in the palette, thus making it hard to use any of the subsequent tiles using the same method.


You can still use this slot if you can whittle down the required tiles to within the 208 tiles that precede it, but that's a tough task unless you prepare your background optimally.

I advise you use another background slot instead. It's tough since there's a limited amount of them, but you can always use this slot for a simpler background somewhere down the line.
Posted on 07-31-23, 06:55 am
Mole
I do things sometimes

Karma: 983
Posts: 268/361
Since: 08-07-17
very thorough answer, but couldnt you also technically replace the animated tile frames with something blank or their corresponding tiles from the background ncg?
Posted on 07-31-23, 10:43 am
この記号は… 解読できないよ…


Karma: 6288
Posts: 2717/2781
Since: 01-17-13
That does not solve the issue that you then have to rearrange the resulting background like a puzzle which can be complicated, and if you don't have free tiles you're going to be missing tiles one way or another.
Posted on 07-31-23, 10:47 am (rev. 1 by adrian_54543 on 07-31-23, 10:50 am)
Paragoomba


Karma: -2
Posts: 53/71
Since: 08-24-20
you can do that?? I mean what Keeper said, can you just fill in the blanks? Btw thank you Thierry and Keeper for answering!

EDIT:

Oh ok I see! Thank you guys!!
Posted on 07-31-23, 11:11 am
Mole
I do things sometimes

Karma: 983
Posts: 269/361
Since: 08-07-17
Posted by Thierry
That does not solve the issue that you then have to rearrange the resulting background like a puzzle which can be complicated, and if you don't have free tiles you're going to be missing tiles one way or another.
why would you have to rearrange the background tiles? im talking about modifying the graphics for the animated tiles that load over the background tiles
Posted on 07-31-23, 12:52 pm
この記号は… 解読できないよ…


Karma: 6288
Posts: 2718/2781
Since: 01-17-13
Oh, I figured you were talking about the tiles from the palette itself, my bad.

To answer your question, yes you can theoretically do that but beware that the way these animated tiles work is particularly wonky due to the amount of hardcoded stuff related to backgrounds and it likely will glitch out if you pair certain top backgrounds with specific bottom backgrounds for some.. reason. All I know is that this wasn't made with flexibility in mind, much less modding.

Foreground bg, background bg, and tileset all influence eachother in some way, this much has been made evident by years of messing with them.

Also, in my testing Volcano 3 seemed to use Volcano 2's animations. You'll have to do your own testing because it might be different for you.
Posted on 08-01-23, 12:31 am
Paragoomba


Karma: -2
Posts: 54/71
Since: 08-24-20
I just moved the background into another spot because like you said, modifying the animations is really difficult. But thank you for explaining why it happens, it is actually nice to know!! Thank you!!
Pages: 1