Language…
20 users online:  AmperSam, arnold369., bradcomp, crocodileman94, David_Odie, Dispace, Erik,  Fernap, Gasterus155, Green, HammerBrother, HaruMKT, JeepySol, Metro Shroomin, OllieGator64, ShadowMistressYuko, thekiller678, tOaO, Xulon, yoshi3706 - Guests: 120 - Bots: 82
Users: 68,346 (2,243 active)
Latest user: letmeseethatdumper

Perfect Slippery Blocks v3.2.0

SMW Blocks → Perfect Slippery Blocks v3.2.0

Submission Details

Name: Perfect Slippery Blocks v3.2.0
Author: HammerBrother
Added:
Version History: View
Act As: Various
Includes GFX: No
Description: Unlike "Single Slippery Block", this one, you don't need an anti-slippery block placed above the slippery block for a workaround prevention. It also has proper slippery corners without making the whole level slippery. It requires Uberasm tool.

2023-09-13 update - supports both half and full slippery mode in one hack. Thus !Freeram_MarioSlip and !Freeram_SpriteSlip acts as a copy of RAM $86 (including $01-$7F being half-slippery and $80+ being fully slippery).

2023-05-07 update - supports LM override.
Tags: ice lorom physics sa-1 slippery
Comments: 29 (jump to comments)
Rating:
4.7 (3 ratings)
No rating
Download 64.67 KiB | 989 downloads

Screenshots

View all

Comments (29)

 MarioFanGamer Link
Moderated with:
  • Lunar Magic v3.40
  • SA-1 Pack v1.40
  • GPS v1.4.4
  • UberASM Tool 2.0
  • BSNES v115
Renamed GM14.asm into a less generic name because of a reduction in naming conflicts and that UAT2.0 allows you to insert code for all levels as well as on multiple entries.

It's a fairly minor update but it does what it does. The only major limitation is that it's a bit of a hack thanks to the fact that the underlying physics code is unchanged. To explain what I mean in detail, SMW uses separate flags for "water level" and "player is in water" and while the patch is kind of this, it's moreso in way which builds on top an existing system while also leaving the original code as untouched as possible.
I would actually prefer a more throughout solution (and this one also has the limitation that you're pretty much forced to use a Direct Page address for freeRAM) but it might also be out of scope for blocks (there also is the fact that in an ideal world, we'd also be able to set a custom interaction when the player blocked flags are set instead of using a preprocessor system and check for the whole block as a result).

It does mean that as a coder, you have to make sure to also set the override flag if you can toggle the slippery level flag midway throughout the level.
CalHal Link
Are Slippery slopes includes for this?
HammerBrother Author Link
yes
HammerBrother Author Link
Originally posted by MarioFanGamer
I do wish you could set a level to be permanently slippery as these blocks override the level settings.


Wish granted. Made it an option (!Setting_AllowLMOverrideSlippery, on by default) so for hackers not using whole-level-slippery for their entire hack can save a byte of RAM (a new freeram is added, !Freeram_SlipLMOverride) by turning this off.

It works like this: During level init, it checks if $86 is set (by LM). If so, set a bit in !Freeram_SlipLMOverride, and will not touch $86 at all on the code that runs every frame. The patch for sprites will go "vanilla mode" (as if the patch isn't patched into the game).
 MarioFanGamer From older version: Perfect Slippery Blocks v3.1 Link
Moderated with:
  • Lunar Magic v3.40
  • SA-1 Pack v1.40
  • GPS v1.4.4
  • BSNES v115
Added description on how to use it with UberASM Tool 2.0 (which allows you to insert code for all levels), added updated information for slippery platforms, added another hijack to SlipperySprites.asm, added revert patch.

A mostly simple update (beyond the few changes I added during moderation). I do wish you could set a level to be permanently slippery as these blocks override the level settings.
Green From older version: Perfect Slippery Blocks v3.1 Link
sa-1 tag is missing.
Starius65 From older version: Perfect Slippery Blocks Link
Bumping that this needs an SA-1 update.
Green From older version: Perfect Slippery Blocks Link
This waiting update is SA-1-compatible. (it doesn’t have the tag, but the one who requested the update mentioned SA-1 support, so it should be compatible with it.)
Starius65 From older version: Perfect Slippery Blocks Link
Got it, didn't know since it didn't have the tag. Thanks.
Brasil man From older version: Perfect Slippery Blocks Link
pls make this compatible with Sa-1 i want soo much add this in smw hack
Anas From older version: Perfect Slippery Blocks v3.1 Link
Originally posted by HammerBrother
Sadly no, since just like my screen scrolling pipes, it uses a patch that would apply to all levels. However, you can have a level code that does this to make everything slippery:
Code
main:
	.SlipLevel
		LDA #$XX		;>Slipperyness: $01-$7F = half-slippery, $80+ = full slippery
		STA !Freeram_MarioSlip
		LDX.b #!sprite_slots-1
		..Loop
			STA !Freeram_SpriteSlip,x
			DEX
			BPL ..Loop
		RTL

LM's slippery level still remains broken, so you'll need this code to mimic this.


I see, good to know! Definitely not a big deal for me as I might not make any level fully slippery anyway, but might as well ask anyway. Thanks for the solution as well!
Anas From older version: Perfect Slippery Blocks v3.1 Link
Does this version fix the minor issue pointed out by Major Flare where the vanilla slippery setting from LM will not work anymore even when turned on?
HammerBrother Author From older version: Perfect Slippery Blocks v3.1 Link
Sadly no, since just like my screen scrolling pipes, it uses a patch that would apply to all levels. However, you can have a level code that does this to make everything slippery:
Code
main:
	.SlipLevel
		LDA #$XX		;>Slipperyness: $01-$7F = half-slippery, $80+ = full slippery
		STA !Freeram_MarioSlip
		LDX.b #!sprite_slots-1
		..Loop
			STA !Freeram_SpriteSlip,x
			DEX
			BPL ..Loop
		RTL

LM's slippery level still remains broken, so you'll need this code to mimic this.
HammerBrother Author From older version: Perfect Slippery Blocks v3.1 Link
Although this version does support 1/2 and full slippery blocks. Vanilla SMW's 1/2 slippery seems to be unused and not tested -- sprites will act as if they're fully slippery reguardless if 1/2 or full, thus the only difference is when the player moves on a surface.
Anas From older version: Perfect Slippery Blocks Link
I noticed another bug which is fortunately simple to fix: if you use this code to make a custom block slippery:

Code
	LDA $72
	BNE done

	LDA #$01		;Note: you can copy this entire code and paste them
	STA !Freeram_MarioSlip	;in other blocks to make them slippery like Icy Melting Blocks
				;from Ersanio. (make sure that the top offset runs the code).


Then the slippery physics won't work in layer 2 levels. Therefore, you must change the '$72' to '$1471|!addr'. Also, BrownBuddy, I couldn't replicate the bug on my side. Not to mention, the vanilla slippery flag doesn't work when you turn it on in LM anyways. In that case, you can use 'GM14.asm' as level code.
DaHitmenGuy From older version: Perfect Slippery Blocks Link
Originally posted by BrownBuddy
Are these blocks responsible for a bug that occurs with levels connected to Slippery levels? This bug seems different from what everyone below me is talking about but if it's the same as below, someone let me know!

The bug is: If Mario exits a slippery level via a pipe to a normal level and changes his player status (i.e gets hurt or gets a powerup) the normal level transforms into a slippery level.


Yes, I'm agree with Hayashi Neru, we need an update with SA-1 compatible, fix slippery level bug and new slippery platforms and ledges. It was 4 years without an update
BrownBuddy From older version: Perfect Slippery Blocks Link
Are these blocks responsible for a bug that occurs with levels connected to Slippery levels? This bug seems different from what everyone below me is talking about but if it's the same as below, someone let me know!

The bug is: If Mario exits a slippery level via a pipe to a normal level and changes his player status (i.e gets hurt or gets a powerup) the normal level transforms into a slippery level.
olgdeldnem From older version: Perfect Slippery Blocks Link
I think it would use SMM's Ice Block GFX.
Anas From older version: Perfect Slippery Blocks Link
If you use these blocks in tandem with GHB's pipes in an SA-1 ROM, the pipes'll act weird even if there's no free RAM conflict between them. To fix that, just go to SlipperyDefines.asm and change the $7F in '!Freeram_SpriteSlip' and '!Freeram_SpriteSlipFlag' to $41. Make sure both copies of that file are up to date, of course! It took me many months starting from the beginning of this year to figure this out.
Hayashi Neru From older version: Perfect Slippery Blocks Link
This is need update.
1. SA-1 compatible
2. Two different slippery degrees
3. fix slippery level bug
 Major Flare From older version: Perfect Slippery Blocks Link
Found a little problem: if you insert the uberASM code as a game mode, you just sacrificed LM's slippery level options from level header for all levels.
 MarioFanGamer From older version: Perfect Slippery Blocks Link
I haven't found any problems so it got an approval (of course, it is a rather minor update anyway).
HammerBrother Author From older version: Perfect Slippery Blocks Link
Yes, its an update.
chineesmw From older version: Perfect Slippery Blocks Link
I could've sworn this was created before. What was updated?
The Thunder Productions From older version: Perfect Slippery Blocks Link
Oh, PLEASE let this pass moderation, PLEASE! I have been waiting for something like these.
AntiDuck From older version: Perfect Slippery Blocks Link
Can someone help me understand how to insert this through UberASMTool?
HammerBrother Author From older version: Perfect Slippery Blocks Link
Thanks.
DiscoTheBat From older version: Perfect Slippery Blocks Link
Well, it is wise to make use of UberASM than wasting block space. I like the way this is done. Good work!
HammerBrother Author From older version: Perfect Slippery Blocks Link
Actually, how this works is that when the freeram flag is set by the block, the uberasm code will clear it AND sets the slippery flag. However, if the freeram flag is already cleared, then it will clear the slippery flag. This is so that it can clear when the player gets off of the block.