Language…
29 users online: 1UPdudes, Abstract,  AmperSam, autisticsceptile1993, badummzi,  Blaagon, CharlieUltra, CroNo, dashlet, Dennsen86, GamesInTweed, GiraffeKiller, Hammerer, Inflagrandy, JezJitzu,  MarioFanGamer, Metal-Yoshi94, MorrieTheMagpie, mtheordinarygamer, Papangu, playagmes169, rafaelfutbal, Romiori, Rykon-V73, Ryrir,  Segment1Zone2, TheOrangeToad, Tulip Time Scholarship Games, underway - Guests: 297 - Bots: 440
Users: 64,795 (2,369 active)
Latest user: mathew

Strange Custom Block Bug (resolved)

I've been dealing with this bug for quite some time and even when I use the restore function on lunar magic or use a clean ROM, the bug still persists, making me think that something's wrong with the custom blocks in question. It has to do with their collision behavior regarding Super Mario.



When Mario bumps his head into a block (a solid one, like 130, the cement block) while big, he stops at the side of the block. This is how it's supposed to be.



But custom blocks that have an 'Acts like' setting of 25 with code that makes them solid (like this block that's only solid when the ON/OFF switch is set to ON) don't stop Mario like that. He can freely walk up to half way into the block if it isn't foot level with him.



It gets worse. With a solid block directly under Mario, a solid block head level with him and nothing directly in front and below him, he's still stopped properly.



Replace the solid blocks with the aforementioned custom blocks and the higher block tries to push Mario down while the lower block tries pushing Mario forward when he's pushed down into it... resulting in a highly unfortunate case of Mario being forced through a gap he should be too big to fit through!

The most extreme case happens when you combine these kinds of custom blocks with the purple triangle... when Mario tries to run up the custom blocks like a wall, the game outright denies him and he's pushed INTO the blocks, which then proceed to push Mario DOWN... typically to his doom.

I've redownloaded these blocks and tried various others and they all end the same, even though their code is extremely simple, the game seems to screw it up very easily. Has anyone encountered anything like this? Is there a fix for this? Or should I just try editing the blocks to 'reverse' their behavior so that I can use 130 as their Acts Like setting? Or would that not work? Thanks for any responses.

I don't believe any custom blocks have the ability to work with the purple triangles, they just aren't coded for that type of interaction.

As for the custom block issue, do you happen to have the code for the particular block you having an issue with?
Layout by LDA during C3.
This block here is the one I used in the screenshots, though pretty much any custom block whose Acts Like setting isn't explicitly 130 suffers from this problem I've seen.

Code
JMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireBall

MarioAbove:
MarioBelow:
MarioSide:
SpriteV:
SpriteH:
MarioCape:
MarioFireBall:
	LDA $14AF
	BNE Return
	LDY #$01	;act like tile 130
	LDA #$30
	STA $1693

Return:
	RTL


This is the relevant code. This is pretty much half of what that download consists of, with the other half being pretty much the same thing, but replacing the BNE with BEQ (for the opposite effect) The block is supposed to be solid when the ON/OFF switch is ON but the Acts Like setting is supposed to be 25.
That problem should go away if you add the corner and body offsets.

Code
db $42
JMP MarioBelow : JMP MarioAbove : JMP MarioSide
JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireball
JMP TopCorner : JMP HeadInside : JMP BodyInside

MarioBelow:
MarioAbove:
MarioSide:

TopCorner:
HeadInside:
BodyInside:

SpriteV:
SpriteH:

MarioCape:
MarioFireball:
	LDA $14AF
	BNE Return
	LDY #$01	;act like tile 130
	LDA #$30
	STA $1693

Return:
RTL

<blm> zsnes users are the flatearthers of emulation
Thanks a bunch! That solved it. Go me being a complete noob at this asm malarky still. I guess we all start somewhere.