Name: | Freeze Sprites with L/R |
Author: | JamesD28 |
Added: | |
Type: | Level |
Includes GFX: | No |
Includes Hijack: | Yes |
Featured: | No |
Description: | This code will freeze all sprites on screen when L or R is pressed, while allowing the player to still move around and interact with the level as normal. You can control the duration sprites are frozen for, enable retriggering of the freeze, enable freezing of sprite behaviours as well as their position, and more. Has a lot of potential for interesting kaizo and puzzle setups. Note that depending on the settings & ROM type, this code can use quite a lot of freeRAM (up to 639 bytes). See the .asm file for usage notes and customization options. To be inserted as level ASM (can be inserted in GM14, but probably not a mechanic that should be enabled for an entire hack). Requested by Picayune. |
Tags: | freeze sprites lorom sa-1 sprite |
Comments: | 6 (jump to comments) |
Rating: |
Download
3.29 KiB | 349 downloads
Comments (6)
- Lunar Magic 3.33
- SA-1 Pack 1.40
- Snes9x 1.60, Bsnes-plus 05
- UberASM Tool 1.6
Notes:
Accepted. Overall, this is a very impressive piece of work, but it's not without some issues, which are admittedly unavoidable for something like this, especially when done purely in uberasm, but here are some things to be aware of -
- There's definitely some odd behavior with certain sprites. Here are a few specific things I noticed (there are definitely more out there):
--- springs are wonky, see the previous comment
--- pokeys act a bit strange
--- dead sprites continue to fall while frozen
--- lakitu cloud sort of broken (mostly just seems to not draw)
--- even with the platform fix, Mario will move forward a pixel upon freezing
--- dry bones don't collapse after being hit while frozen
--- generators don't freeze, but what they spawn does, so you can fill up with bullets or eeries, etc
- This is fairly expensive computationally; especially on lorom, you'll want to be conservative with sprite usage to avoid slowdown
- Since this uses L/R, you'll probably want to disable L/R scrolling when using
Technical notes/suggestions for the future:
- changed = 0 to == 0 in the if statement for future asar compatibility
- it would probably be good to use %invoke_sa1() if running on sa-1 since this is so processing heavy (the free ram needs to be in bw-ram in this case)
- it would be really nice to have the actual freeze code split out into a library file so that it could be used in other circumstances more easily, like on/off (would require a separate unpatch)
The fix from Discord:
Find this:
And between the LDA !9E,x and CMP #$04, add this:
Doesn't seem to affect green beans though so I guess they use RAM elsewhere
edit: some sprites seem not to work i.e. the spring....
D^4's version certainly has it's own merits: hers looks to be a lot faster and smaller due to the use of a patch, and hers also doesn't require a chunk of freeRAM, so it's less invasive in that regard.
Oh, I see. I thought your code was less invasive simply because it's one level file.
I noticed this doesn't affect other types of sprites like the hammers in the third GIFs, which is a bit of a shame but understandable considering it would be more invasive likely. Again, nice job!
D^4's version certainly has it's own merits: hers looks to be a lot faster and smaller due to the use of a patch, and hers also doesn't require a chunk of freeRAM, so it's less invasive in that regard.