Language…
4 users online: Ginyu AL, karls_Corinthia, Nciktendo, Vuong Van - Guests: 42 - Bots: 255
Users: 58,010 (2,499 active)
Latest user: slavi

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: 16 (jump to comments)
Rating:
5.0 (1 rating)
No rating
Download 1.22 KiB | 501 downloads

Screenshots

View all

Comments (16)

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?
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.