Remember kids, there is a huge difference between XYZ and (XYZ) in Assembly and other programing languages.
I sat for hours staring at my code until I took a break.
That's the other tip...
Walk away from your code for a couple of hours instead of getting frustrated.
I had one issue that I wanted to punch the monitor so I took a day's rest and ended up reevaluating my code, rewrote the part needed and it was more compact, more precise and worked better.
Today I ran into the same problem which came down to a pointer.
I wanted to evaluate if two sprites were colliding and instead I ended up comparing garbage. WHY, WHY, WHY!!!
It is not my code, it must be the assembler. @$%@$%$%$%@$%@
So in the end I should have pointed to SpriteTable+1 and SpriteTable+2 but ended up pointing to (SpriteTable+1) and (SpriteTable+2)
Hopefully this will be a great tip for up and coming programmers.
Now, I have collision detection for all actors in the game. Actors being NPC and loot.
Rom is now 7.93k before optimization, sound data, test and debug if any.
Edited by Mike Harris, Thu Jan 10, 2019 4:06 PM.