Language…
16 users online:  Anorakun, becca, DasFueller, grassodocia53, ITEnglishDegree, Knight of Time, MarioTeam, metronia, MiracleWater,  PermaBan,  quietmason, Rykon-V73, Tarek701, TheScratchinator,  TickTockClock, Zavok - Guests: 95 - Bots: 125
Users: 56,332 (2,201 active)
Latest user: TryzenAlpensky

Screen Constrain

SMW Patches → Screen Constrain

Submission Details

Comments (16)

TheBiob Author Link
Well, I did the same and everything works perfectly fine so at least one of us did something wrong there.

Can you link a patch of a rom where that happens so I can look at it?
HammerBrother Link
I made my own patch: link. It is not prone to issues should you use autoscroll (or any screen scrolling patches) that involves the player being offscreen when a solid block is in the area of the player's object collision.
HammerBrother Link
There are no RAM conflicts, I used an autoscroll, “disable screen barrier via RAM” patch and uberasm tool to set the RAM to disable borders. I've also notice that when making a horizontal level wrap (the top of the level to the bottom), blocks at the edge of the screen applies, not the edge of level.
TheBiob Author Link
Originally posted by GreenHammerBro
There is an issue where if you are using this patch with an autoscroll, the code still uses on-screen code and if a block is on the edge of the screen, will kill the player.

I can't reproduce that, everything works perfectly fine for me.
Are you sure you don't have any freeram conflicts?
HammerBrother Link
There is an issue where if you are using this patch with an autoscroll, the code still uses on-screen code and if a block is on the edge of the screen, will kill the player.
 Erik Link
Works fine, altough grabbing throw blocks looks kind of weird if you're offscreen but not much can be done to fix that. It's still functional though so nice job!
TheBiob Author Link
I changed it to either do it on the screen or the whole level depending on a flag. Restraint to screen is default (flag = 0) because I still find it more useful than restraining it to the whole level.
HammerBrother Link
Can you make a version of this, but for the whole level instead of the player's screen? Because it can cause weird things to happen should an ASM that has a cutscene that scrolls the screen (often makes the player goes offscreen).
TheBiob Author Link
Originally posted by aCrowned
I "released" it in a C3 a few years back, but didn't submit it proper because I wasn't happy with the methods I used

Ah, I see. Still makes me wonder why I couldn't find it.

Originally posted by aCrowned
I did it the way I did not only because of collectibles, but also because I still wanted over-the-level secrets to be possible

Oh right. Yeah that's not really possible unless you move the camera one pixel up to leave space.

EDIT: Actually, you can work around that with a simple custom block:

Code
db $42
JMP s : JMP r : JMP s
JMP r : JMP r
JMP r : JMP r
JMP r : JMP s : JMP s

s:	REP #$20
	LDA $1C
	CMP $98
	SEP #$20
	BNE r
	LDA #$25
	STA $1693
	LDY #$00
r:	RTL


Players can walk over this tile just normal.
 aCrowned Link
I "released" it in a C3 a few years back, but didn't submit it proper because I wasn't happy with the methods I used, since it needed a huge table of which tiles would block Mario and which wouldn't. It was also SA-1 only because I didn't know how to hybrid. I planned on revisiting it at some point, but now I don't have to. :) I should still fix the fancy Ninjis I released alongside that, though.

And I guess not having collectibles on the edges is a small price to pay for such a nice feature. The bottom row is hidden and the top one is usually obstructed by a HUD of sorts, anyway.

EDIT: I did it the way I did not only because of collectibles, but also because I still wanted over-the-level secrets to be possible, so corner and grass tiles wouldn't block Mario with my method. Also, slopes.
TheBiob Author Link
Originally posted by aCrowned
I remember making this in the past

Huh interesting. Did you ever release that? I couldn't find anything like this.

Originally posted by aCrowned
I didn't try it, but does your patch play well with collectible blocks being placed on the edge of the screen?

Depends on what you mean.
The patch simply restrains the player's collision points to inside the screen essentially "extending" every collision from the last pixel visible on screen to where the player actually is.
Now, that does mean that you'd be able to collect collectibles way above/below the screen if they're on the edge. If that's what you're referring to then I guess they aren't working well together.
 aCrowned Link
I remember making this in the past, but it worked very differently. Your method seems much easier to work with, mine would check for the top/bottom tile aligned with Mario and would hinder him if it was included in my blacklist.

I didn't try it, but does your patch play well with collectible blocks being placed on the edge of the screen?
TheBiob Author Link
There are a few patches/codes that prevent walking/swimming under the level like "Pit Fix" which just moves the death barrier higher or "Floor generator" that prevents movement below the camera all together.

Though I couldn't find one that actually extends the blocks inifinitely so... If anyone knows of a patch that already does this I'll remove this one since we don't need two.
zacmario Link
I don't recall a patch like this, prehaps your thinking of the teleport if you fall off the screen? Both patches are SMBish?
TheBiob Author Link
Well, I couldn't find one either so I just made one.
Could be that I missed something so if there really is a patch like this already here I'll just remove it.
Alcaro Link
I could swear we had a patch like this already? But I can't find it.