Language…
8 users online:  AmperSam, Cristian Cardoso, CroNo, Dan2point5, Hayashi Neru, JeepySol, JPhanto, random_box - Guests: 257 - Bots: 312
Users: 64,795 (2,377 active)
Latest user: mathew

Relative Layer 2 Vertical Rise/Fall

UberASM Repository → Relative Layer 2 Vertical Rise/Fall

Submission Details

Name: Relative Layer 2 Vertical Rise/Fall
Author: Koopster
Added:
Type: Level
Includes GFX: No
Includes Hijack: No
Featured: No
Description: This code auto-scrolls level (or background) layer 2 up or down relative to layer 1, which makes rising and falling layer 2 sections possible without taking away vertical camera freedom.

A couple notes:
-You must set Layer 2 V-Scroll in Lunar Magic to "None", and H-Scroll preferably to "Constant".
-It must be assured that the player can never reach layer 2 scrolled past the area that has been placed in Lunar Magic, or glitchy tiles will appear. This works for the applications shown in the screenshots, as the layer 2 itself impedes the player from going further down (for the lava) or up (for the blocks). For rising layer 2, it is of interest to also account for Mario's death animation, as he falls down a fair amount when dying (the .asm file talks about this in more detail).
Tags: autoscroll fall layer 2 lorom rise sa-1
Comments: 20 (jump to comments)
Rating:
5.0 (1 rating)
No rating
Download 1.22 KiB | 611 downloads

Screenshots

View all

Comments (20)

simon.caio Link
If I set the level entrance type to pipe then it seems that the uberasm doesn't work (?)
 Koopster Author Link
Sorry, I just now realised $89 not only is used for no yoshi intros but also for pipe animations... so a check at the very top of the code will prevent the code from running in no yoshi intros but also if any sort of pipe interaction happens #smrpg{ohno}
The hotfix for that is to comment out the LDA $89, and change the ORA in the next line to an LDA. I'll formally submit an update sometime in the future to address this.
alfonzo_galliano Link
Am I the only one having issues with this asm and fast retry?
if i die and the second layer (lava) is above the spawn point, i get killed again. even though the layer2 got resetted correctly.
AleGames Link
Mario and the sprites are in front of the lava. How to fix this? sorry my english
 Koopster Author Link
This is unrelated to this code and you should ask in the forums instead. Either way, if you're using a vertical level mode, this might be your solution.
solgaleo35 Link
Thanks, I needed this
Alex No Link
This can be useful for making Credits too.
simon.caio Link
Originally posted by Koopster
That might be it... I never accounted for custom camera patches when I made this. I'm not sure how to go about it without looking at what that patch does, which I don't have time for at the moment :/

ok, I understand, thank you anyway
simon.caio Link
Originally posted by Koopster
Did you set the correct H-Scroll and V-Scroll settings in the #lm{othprops} window?

yes, I tried vertical layer 2 interact level horizontal layer 2 level with interaction, changing some stuff......my guess is that it interferes with something different, maybe the vscrollreprogrammed? https://www.smwcentral.net/?p=section&a=details&id=19676
 Koopster Author Link
That might be it... I never accounted for custom camera patches when I made this. I'm not sure how to go about it without looking at what that patch does, which I don't have time for at the moment :/
simon.caio Link
Doesn't work for some reason....
 Koopster Author Link
Did you set the correct H-Scroll and V-Scroll settings in the #lm{othprops} window?
BrownBuddy Link
The code doesn't seem to vibe with Pipe entrances. Upscroll didn't work until I set the entrance to "Do nothing"
JamesD28 Link
Tested with:

• Lunar Magic 3.20
• SA-1 Pack v1.32
• UberASM Tool 1.4
• Snes9x v1.60

There was an issue where layer 2 would keep scrolling up/down during the level end walk, and if it pushed Mario above the screen during the circle fade, could either corrupt the palette, or worst case, hardlock the game. The fix was as simple as adding a single line though, so I added it. Everything else works as intended, so, accepted.

This is a very nice mechanic and definitely seems like the most "logical" movement for autoscrolling layer 2 - I remember when I was learning Lunar Magic, I spent a lot of time trying to create this very effect before realizing it didn't exist in LM.
Perhaps in a future update it could be further improved to include different relative scrolling patterns, such as an oscillating/sinusoidal movement, or maybe even a smash-like movement, but it's still very good as-is.
Knight of Time Link
Originally posted by Koopster
Originally posted by Knight of Time
I was wondering if this would be made someday; just wondering if it works (or can be set up to work) for tall horizontal levels?

Yes, the first screenshot is in fact one.

Ah, awesome! I have one more question about this code though; if layer 2 was a solid floor, and was rising up (like in the DKC2 level Castle Crush), would Mario be able to outrun layer 2, or would it eventually catch up to him if he got far enough ahead of it and stood still?
Skewer Link
Possible, yes. But not necessarily supported. While you can actually do this by replacing the Rising Lava in the GIF with solid blocks, Mario will clip through the floor more often than not. This is because unlike most layer2 scrolls, it isn't scrolling, it's being shifted. Code will need more work before you can use it for an upwards elevator.
zacmario Link
Thank you so much. I've wanted this forever.
 Koopster Author Link
Originally posted by Knight of Time
I was wondering if this would be made someday; just wondering if it works (or can be set up to work) for tall horizontal levels?

Yes, the first screenshot is in fact one.
Knight of Time Link
I was wondering if this would be made someday; just wondering if it works (or can be set up to work) for tall horizontal levels?
PinkSatan Link
Thanks so much, this is way better than making layer 2 the main layer and having layer 1 act as something like lava.