D:
NICE! There's a ton of good stuff in there. I'd found some of them when I was trying out the script last year, but a bunch of them are new. And the screenshots are a lot easier to understand than the rambling Twitch highlight I'd made that doesn't exist anymore. Haha. >_>
I had been planning an update to the script that'd make it easier to look for stuff like this, based on some research I'd started doing earlier in the year, but I never got the chance to actually do that. Here’s a dump of all the info I'd thought I'd figured out. I didn’t get the chance to actually test much of this and it’s possible I remember some details wrong, but hopefully, enough of it is right to be helpful.
The map is divided into 64x64 tiles. The ROM has a table indicating which groups of enemies can spawn on each tile, and whether any enemies spawn there at all. The game checks the table and tries to spawn enemies whenever your movement brings a new tile onto the screen.
The screen is 256x224, which is obviously a lot wider than 64x64. So, the game spawns enemies along the line of tiles coming on screen. More specifically, it looks up 5 tiles from the ROM, based on Ness’s position. When moving left or right, it checks a vertical line of 5 tiles; when moving up or down, it checks a horizontal line of 5 tiles.
5 tiles cover 300 pixels, which are enough to cover an entire side of the screen even if the screen isn’t perfectly lined up with the tiles. However, the game’s logic for looking up tiles is off by one. When moving up or down, it divides Ness’s X coordinate by 64 and subtracts 1 to find the tile at the left of the line to spawn. When moving to the left or right, it divides Ness’s Y coordinate by 64 and subtracts 1 to find the tile at the top of the line to spawn. If the game just divided by 64, the 5 tiles actually would line the whole screen, but the subtraction pushes the line over too far.
Because of this, when moving up and down, unless you’re moving along the very left edge of a tile, the game will never check the tile on the far right of the line (the one overlapping the right side of the screen). This is how the Gruff Goat skip works: if you move far enough to the left, it puts the right side of the screen along the Goat’s tile, which the game doesn’t check. There’s a similar trick when moving left or right: the spawn tile overlapping the bottom edge of the screen may not trigger sometimes. The positioning window is a little tighter, though, because the screen isn’t as tall as it is wide.
I forget if the game also does the subtraction when deciding when to trigger a line of spawns going up or left, but if it did, it would explain why nemi saw enemies spawning 3 tiles away when going up or left, and 2 tiles away when going down or right.
So, the idea with updating the script was to have it draw a box around each of the enemy spawn tiles showing where the tile triggers, and highlight the parts of the box where the tile is skipped. That way, people could look for skips by just looking for the highlighted parts and all of this would be a lot easier. Just didn’t get time to implement it.
I had been planning an update to the script that'd make it easier to look for stuff like this, based on some research I'd started doing earlier in the year, but I never got the chance to actually do that. Here’s a dump of all the info I'd thought I'd figured out. I didn’t get the chance to actually test much of this and it’s possible I remember some details wrong, but hopefully, enough of it is right to be helpful.
The map is divided into 64x64 tiles. The ROM has a table indicating which groups of enemies can spawn on each tile, and whether any enemies spawn there at all. The game checks the table and tries to spawn enemies whenever your movement brings a new tile onto the screen.
The screen is 256x224, which is obviously a lot wider than 64x64. So, the game spawns enemies along the line of tiles coming on screen. More specifically, it looks up 5 tiles from the ROM, based on Ness’s position. When moving left or right, it checks a vertical line of 5 tiles; when moving up or down, it checks a horizontal line of 5 tiles.
5 tiles cover 300 pixels, which are enough to cover an entire side of the screen even if the screen isn’t perfectly lined up with the tiles. However, the game’s logic for looking up tiles is off by one. When moving up or down, it divides Ness’s X coordinate by 64 and subtracts 1 to find the tile at the left of the line to spawn. When moving to the left or right, it divides Ness’s Y coordinate by 64 and subtracts 1 to find the tile at the top of the line to spawn. If the game just divided by 64, the 5 tiles actually would line the whole screen, but the subtraction pushes the line over too far.
Because of this, when moving up and down, unless you’re moving along the very left edge of a tile, the game will never check the tile on the far right of the line (the one overlapping the right side of the screen). This is how the Gruff Goat skip works: if you move far enough to the left, it puts the right side of the screen along the Goat’s tile, which the game doesn’t check. There’s a similar trick when moving left or right: the spawn tile overlapping the bottom edge of the screen may not trigger sometimes. The positioning window is a little tighter, though, because the screen isn’t as tall as it is wide.
I forget if the game also does the subtraction when deciding when to trigger a line of spawns going up or left, but if it did, it would explain why nemi saw enemies spawning 3 tiles away when going up or left, and 2 tiles away when going down or right.
So, the idea with updating the script was to have it draw a box around each of the enemy spawn tiles showing where the tile triggers, and highlight the parts of the box where the tile is skipped. That way, people could look for skips by just looking for the highlighted parts and all of this would be a lot easier. Just didn’t get time to implement it.