File Name: | Shell-less Blue Koopa Boss (v1.0) |
Submitted: | 2017-01-21 02:19:21 PM by Mathos |
Authors: | Mathos |
Tool: | Romi's Spritetool |
Type: | Standard |
Dynamic: | No |
Disassembly: | No |
Includes GFX: | Yes |
Description: | A 32x32 boss sprite with a complex set of attacks and a HP system. Extremely customizable (70+ defines with detailed explanation). This sprite uses a HP system, as it is damageable by stomping, cape, fireballs and kicked objects. Said HP system is ready to work with the latest version of GreenHammerBro's Enemy HP patch. The main gimmick of this sprite is to kick everything that comes in contact with it. Therefore, a modified version of Romi's harmful fireball sprite is included. This sprite has a variety of attacks: - Kick Mario normally - Jump if Mario jumps too - Ram into Mario - Accelerate then slide into Mario, and jump while doing so if he tries to avoid it. - Kick Mario in a more powerful manner if said kick must occur during a ramming/sliding attack - Kick back projectiles, even in mid-air or from behind if allowed Several defines used to define the sprite's speeds and timers have a mid-life variation. That is, a new value upon the sprite being half-beaten. In order to correct a bug related to the original game not detecting Mario's blocked status properly, two blocks are included to make the left and right walls of the boss arena. Use Asar for assembly. A video of the sprite in action can be found here. Graphics are included for the boss but not for the fireball sprite. Feel free to reupload for bug correction purposes, as long as you ask the author before doing so (it's more for double-checking that the bug has been corrected than anything else). Details in .asm file. Requested by GreenHammerBro. |
The main problem is the graphics routine. The huge table filled with duplicates and many unneccesary JSRs take up far more space than needed.
Look into using pointers and loading the data for your OAM stores via indirect indexed (LDA ($xx),y) or a different way to avoid all the duplicates in this table.
Secondly, the main behaviour looks like a mess of branches to me. This isn't 100% neccesary, however, it would look a lot cleaner if you used a state-based system using something like JMP (StatePointer,x)
You also missed many optimizations such as:
Code
LDA $00E4,x STA !FreeRAM_A LDA $14E0,x STA !FreeRAM_A+1 REP #$20 LDA !FreeRAM_A : CLC : ADC #$0008 : STA !FreeRAM_A LDA $94 : CLC : ADC #$0008 SEC SBC !FreeRAM_A STA !FreeRAM_A
Which can be replaced by something like this:
Code
LDA $14E0,x XBA LDA $E4,x REP #$20 STA $00 LDA $94 SEC : SBC $00
In short: fix up your graphics routine so it doesn't need a very large table full of duplicates. It would be nice if you could look through the rest your code and optimize it, however you can resubmit this after you clean up your graphics routine.
Also, a readme or some form of explanation of how to use the included blocks and how to set up the boss would be nice.