File Name: | Conveyer and Jump block |
Submitted: | by Scoutellite |
Authors: | Scoutellite |
Act As: | 130 |
Includes GFX: | Yes |
Description: | (Insert it with Gopher Popcorn Stew) The conveyer block is a block that will give you a push to Mario's max speed when running. Your direction while running can still be changed. The jump block makes Mario do a small jump, a bit less than a Banzai Bill, but will also permit Mario to fly if he holds Y! You should note that the jump block on himself already gives a boost to Mario, so you don't need to add conveyer blocks. Jump blocks make a little sound when they launch Mario. The block give their effect when Mario is above them. |
Screenshots: | ![]() ![]() ![]() |
In the conveyor block, something like this:
Code
BMI Label_0001 ; / LDA #$BC ; \ Set the player's x speed to -68. STA $7B ; / Label_0001: ; > ---------------- BRA Label_0002
Can be optimized by changing the BMI to point directly to Label_0002 instead of going through an intermediate branch.
The jump block has even more room for optimization. The code that plays the sfx is present twice, once for facing left and once for facing right, when they could be combined. You could also load the player's direction ($76) into X and then use indexing to combine the LDA/STA lines that set the player's speed. Feel free to shoot me a PM if you want some more insight and help optimizing your code.
Also, instead of static screenshots, animated gifs of the blocks are preferred. Not a removal reason, but it would be nice.