Langue…
1 utilisateur en ligne: Faro - Invités: 45 - Robots: 116
Utilisateurs: 56 313 (2 233 actifs)
Dernier utilisateur: Gatofiesta

Falling Icicle by Erik557

File Name: Falling Icicle
Submitted: 2016-06-26 12:24:52 PM by Erik557
Authors: Erik557
Tool: Romi's Spritetool
Type: Standard
Dynamic: No
Disassembly: No
Includes GFX: Yes
Description: A 16x32 icicle that will fall whenever Mario gets near it, and shatters whenever it touches the ground. Similar to the Falling Spike.
Requested by Berkay. No credit needed.
Update: Now the shatter pieces flash in colors.

Alright, so i wasn't entirely sure what to do here. The sprite works and can be quite useful. It uses a lot of generic code and that's fine, but there's this part:

Code
    LDA $C2,x            ;\ Jump to a pointer based sprite state
    JSL $0086DF          ;/
                         
    dw StandStill&$FFFF          
    dw Fall&$FFFF        


This is not fine. Erik, I know you're not *that* well-versed in ASM but I think you want to learn. You're the kind of guy who will keep making things for the community and that's why I think it's important that you learn how to code efficiently. Calling the pointer jump routine is not reasonable at all when you can just use BNE Fall instead. The JSL wastes a lot of cycles, which is pretty bad considering this is the kind of sprite you would wanna use multiples of at once. As a rule of thumb you should only use pointers when branches would make things complicated and/or inefficient. Change it to use a branch and your sprite will be approved.

allow shy guy emojis in post footers you cowards!