Language…
11 users online:  AmperSam, Dan2point5, fsvgm777, Gasterus155, JPhanto, kirsvantas, nonamelol1, reevebarusadar8, signature_steve, Sokobansolver, tOaO - Guests: 252 - Bots: 333
Users: 64,795 (2,377 active)
Latest user: mathew

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: 11 (jump to comments)
Rating:
0.0 (0 ratings)
No rating
Download 1.11 MiB | 393 downloads

Screenshots

View all

Comments (11)

Green Link
Note: Before inserting the patch, change these freeram defines in the patches required:

In Disable Screen Barrier via RAM, change !Freeram_DisableBarrier = $60 to !Freeram_DisableBarrier = $5C.
In Sprite Scroll Fix, change !Freeram_PrevPos = $60 to !Freeram_PrevPos = $7F844D.

(thanks ghb for figuring it out!)
Green Link
Pretty cool scroll implementation! For those wondering, it does work with SA-1.
HammerBrother Author Link
I haven't tested it, but it should work as my defines do have sa-1 hybridtization.
 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.