Language…
25 users online: Aguiar Salsicha,  AmperSam, com_poser, DixyNL, elegist, figuiDOS, Green, Hammerer,  Losoall, Maw, Metal-Yoshi94, OnlySpaghettiCode, ppp9q,  Saphros,  Sayuri, Silver_Revolver, SMW Magic, Sweetdude,  Telinc1, The_Uber_Camper, TheXander,  Thomas, tOaO, VSmario90,  yoshi3706 - Guests: 395 - Bots: 288
Users: 64,795 (2,374 active)
Latest user: mathew

Dolphins spawn differently on 1st load vs retries (retry patch)



It seems that dolphins spawn slightly earlier the first time that a level is loaded and slightly later on the retries. In the gif, I am holding y+right. On the first load, mario runs over the plant. On the retry he runs into it. This happens on every retry. It also happens if I move the dolphins x position.

So far I have not recreated with other sprites.

I'm not sure if this is related to the cannon entrance...

Anyone seen this before? Any ideas how to fix?


This is probably because of a quirk in the way dolphins interact with blocks. Dolphins only check for water every odd frame, which means depening on your frame parity when the dolphin hits the water, it'll jump differently.

You can disable that behavior like so:
Code
org $02BBBC
	db $00


Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Thank you Thomas, that did it! Can I ask how you figured that out? I'm pretty new here, but trying to learn. I don't see $02BBBC in the all.log or the ROM map. How did you find it?

edit: actually it did not fix the problem.


It's one of the bytes in the command at $02BBBB; specifically, the code looks like this:

Code
    TXA                         ;$02BBB7    |\ 
    EOR $13                     ;$02BBB8    ||
    LSR                         ;$02BBBA    || Process interaction with blocks every other frame.
    BCC CODE_02BBC1             ;$02BBBB    ||
    JSL CODE_019138             ;$02BBBD    |/

The line at $02BBBB is a BCC opcode, which uses its second byte as the distance to branch. Setting that second byte to 00 effectively nullifies the branch.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Thanks for that explanation! After some more testing, this actually doesn't fix the problem. It definitely makes the dolphin jump sooner, but there is still a slight discrepancy between the first time the level is loaded and the retries. The dolphin still seems to load (or jump) slightly later on retry attempts.