Username:
B
I
U
S
"
url
img
#
code
sup
sub
font
size
color
smiley
embarassed
thumbsup
happy
Huh?
Angry
Roll Eyes
Undecided
Lips Sealed
Kiss
Cry
Grin
Wink
Tongue
Shocked
Cheesy
Smiley
Sad
<- 1  -   of 34
--
--
List results:
Search options:
Use \ before commas in usernames
Edit history:
__sdfg: 2015-09-29 07:19:50 pm
__sdfg: 2015-09-29 07:19:40 pm
__sdfg: 2015-09-29 07:19:00 pm
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.
Edit history:
__sdfg: 2015-09-29 07:26:07 pm
D:
Quote from nemi:
  • Triggers can randomly not activate, but I don't know what causes this. This causes 100% spawns to occasionally not spawn anything.

I also noticed this when I was looking at the script last year. I had a theory for it, but again never got the chance to verify it.

Some of the spawn tiles in the game spawn magic butterflies with a decently high chance. However, magic butterflies can also appear randomly in other areas, just with a much lower chance. My theory was that the counter at 7E4A7A is not actually part of the RNG algorithm, but is instead used to decide when the game should try to randomly spawn a butterfly. So, whenever the RNG updates because of a change in 7E4A7A, the reason is that the game polled the RNG to check if a butterfly should appear.

I was also wondering if the game might forget to spawn enemies when this happens, or at least forget to spawn certain tiles. I don’t really have a good reason for thinking this, though, other than that I don’t know of any other counters that update as you cross spawn tiles. I also don’t know if the game is actually skipping enemy spawns in these cases, or if it’s just skipping the specific instruction the script uses to check for enemy spawns. But anyway, that was the idea.

One thing supporting this theory, or at least the part about how 7E4A7A works, is that the game normally increments 7E4A7A by 5 each time you trigger a new set of spawns. However, when you move around the right side of the police station, the game increments the counter by less than that. The game has a flag for whether various parts of the map should have the low-probability butterfly spawns, and I confirmed in PK Hack that butterflies are disabled in some of the areas below and right of the police station. So, the presence or absence of butterfly spawns seems to be relevant.
Thanks for the explanation. I was wondering why these skips exist, but now it makes sense.

If I understand this correctly, each spawn and its triggers* should look like the attached image. 3 of the 4 corners have holes, but there usually isn't enough room to walk through these holes. Even in more open areas (e.g. Dusty Dunes Desert and Scaraba), there are so many spawns that there is no clear path through them.

However, it looks like it might generally be safer to stay above spawns when walking horizontally, and stay to the left when walking vertically. For example, in Southern Scaraba, there is a relatively safe path down the left side, and the southernmost spawns can be skipped by approaching from the upper-left. I can't say whether this is any better than the current route of going down the right side since I haven't tried it myself enough.


*Technically, I shouldn't be calling them "triggers" because they don't actually exist, but it helps me visualize how this works.


Attachment:
D:
Yeah, it should be something like that, except the gaps are narrower and I'm not sure if the bottom corner is concave. It'd make sense for it to be concave given what's been discussed so far, just not sure if it is. But anyway, I think the horizontal gap is 64 pixels (or one tile) and the vertical gap is 32 pixels.

I've seen several runners use a path through Northern Scaraba that appears to clear out the spawns on the way down to the pyramid. I would normally teleport down that line to avoid enemies, but enemies spawn whether you're walking or teleporting, so the fact that I don't remember running into enemies while teleporting suggests that they just never appeared. The path there is to line yourself up with the rounded corner on the left side of the gates into the town and then hold down and right.

Given this, it seems like there ought to be a similar path through Southern Scaraba, if you started from the left side and found the right place to turn down+right. I'm not sure if the photo shoot by the oasis might get in the way, though.

The path on the right side is normally relatively clear since the tiles on that side have lower spawn percentages, but it's not a sure thing, so actually clearing out the area would remove some danger from that part of the run.