Name: | Kill Player on Button Press v1.3.0 |
Author: | zuccha |
Added: | |
Type: | Level |
Includes GFX: | Yes |
Includes Hijack: | No |
Featured: | No |
Description: | Kill the player after a button of your choice has been pressed a given amount of times. This UberASM allows to configure which button(s) to detect, how many times you need to press them, if you want to hurt or kill Mario, and other things. This comes with a status bar routine for drawing the button press counter in the status bar, and with an indicator sprite that follows Mario (both are optional). Requested by The_Uber_Camper (request). |
Tags: | counter harmful lorom sa-1 sprite status bar |
Comments: | 3 (jump to comments) |
Rating: |
Download
12.33 KiB | 130 downloads
Comments (3)
- Lunar Magic v3.40
- SA-1 Pack v1.40
- UberASM Tool v1.6
- PIXI v1.40
- BSNES v115
Added counter to the list.Hands off: I'm not particularly happy with the overall execution. For starters, status_code.asm is more useful for global status bar stuff but there should be an option to customise the display (i.e. total number of presses) if you deem it necessary for it to be global.
For the level code, the increase counter code can be slightly improved by replacing the last
BNE
with aBEQ
and skip over the code which increments the counter which saves on anRTL
.Other improvisations: You can improve the sprite counter by taking advantage of the fact that the offset for all powerups is the same except for small Mario which is zero. This means you don't have to use a table to offset the counter. Furthermore, you can put more of the code to draw the digit into the draw digit subroutine nor there is any need to preserve X because it's overwritten later in the code and you can also use X for the index for the size bits in order to preserve Y which allows you to also ditch the
PHY
andPLY
.Furthermore, there is a visual bug where if the player is offscreen vertically, the counter will wrap around (the same is true in the horizontal direction, although that requires a patch to take advantage of a patch which allows you to go horizontally offscreen).
Lastly, please don't keep the names so generic! This makes it less confusing for the user to see what's what and also reduces the chance of naming conflicts (I make an exception to gamemode wrappers but only because GlobalLevelASM used to not exist and it's very easy to merge wrappers together).