Language…
12 users online: Akaginite, ASMagician Maks, AttentionDeficitDad, dezoito18, GigaCrash, HeitorPorfirio2006, InalienableDreamless, Luaxon,  Sayuri, Supertails, Vellidragon, Yoshi Master - Guests: 50 - Bots: 180
Users: 56,980 (2,277 active)
Latest user: Kiel Yam

Custom Scroll Limits (+ Megaman Flip Screen Effect)

UberASM Repository → Custom Scroll Limits (+ Megaman Flip Screen Effect)

Submission Details

Name: Custom Scroll Limits (+ Megaman Flip Screen Effect)
Author: HammerBrother
Added:
Type: Level
Includes GFX: No
Includes Hijack: Yes
Featured: No
Description: This ASM pack enables you to have custom scroll limits in your level.

It also comes with a feature of a flip-screen effect seen in Megaman, Metroid, Legend of Zelda, Celeste and many others to divide a level into rooms. These can easily be set by editing the table.

Of course, I also made a single screen version (but each zone will always be 256x256, not overlapping).

Very useful for designing levels to have areas where you don't want horizontal or vertical scrolls.
Tags: screen scroll
Comments: 8 (jump to comments)
Rating:
0.0 (0 ratings)
No rating
Download 1.11 MiB | 237 downloads

Screenshots

View all

Comments (8)

 Hooded Edge Link
This looks awesome. Definitely can see this being used in very creative ways.
HammerBrother Author Link
Originally posted by qantuum
looks cool, does it prevent enemies from spawning in the room that's not displayed,


I was thinking of this too, but sadly no, since the sprite spawning is handled by LM.

One thing you can do however is not place sprites using LM, but manually using uberasm tool (loop all 12/22 slots). The provided routines (UberasmTool/libraryLibraryScrollLimits.asm) comes with an output that indicates the beginning or end of the scroll effect:
  • ScrollLimitMain: Carry flag. This is only set when the transition ends. This is called under gamemode 14
  • SetScrollBorder: $0D. This is only set during the first frame the transition triggers. This is called during level

I would recommend the latter option, after calling it, check the carry flag or $0D and from there write your own ASM code that do this:

You first delete the sprites (all 12/22 slots) before spawning the new ones (in the screen the player is going to).

Make sure all the sprites in the area processes off-screen (especially if the zone is more than a single screen wide or tall, else they would permanently disappear when despawning until you reenter the scroll zone). This can be done by setting $167A's bit 2 (%-----P--, ORA.b #%00000100 : STA !167A,x).

Note that this method causes the whole area to be limited to 12/22 sprite slots
qantuum Link
looks cool, does it prevent enemies from spawning in the room that's not displayed,
BlueToad Link
Wow, this looks really cool!
HammerBrother Author Link
lx5 Also thanks. I really wanted the camera to behave in a way so you can make L-shaped levels without the camera being able to focus outside the area. This is especially true for boss rooms.

A vanilla method in doing this can be achieved by using separate levels, but I would like hackers to be able to have multiple scroll sections per level, giving it a somewhat seamless transition without the reloading and fading to black.
HammerBrother Author Link
lx5 suggestion taken. Readme is also slightly modified.
lx5 Link
Also small suggestion: Try to not include git files, they may confuse the end user.
lx5 Link
Neat idea... but man, that's a lot of things one must do in order to get it to work.