Colony 7 particles under control!
Hi there!
Yay! I somehow managed to find some time to work on this again!
This update implements a large chunk of the particle code. There's still several small tweaks to be done sometime later, but all particles are now able to *perform* their main tasks:
The game can handle 6 particles. 2 are reserved for the "Own Fire Trails" effect and the other 4 for enemy fire.
Right now the Trails effect is pretty much completed, just press fire to see it. (Move the crosshair while firing for the full effect.)
Funny sidenote here: After I was completely done with this code, I slept a night over it and completely rewrote it the other day, using 4 bytes RAM less - requiring less ROM at the same time!
Another part of the code that's done now, is the playfield destruction code. I'm extremely pleased with it, since it not only looks and feels totally smoothly, but I also think the code is very elegant.
I already had some playfield destruction code in Gunfight, on which I generally based this part, but I think what I have now is even better.
Look at this small snippet dealing with the horizontal part of the hit. Not only does it advance Y to index the right PF byte (out of 6 possible) it also already generates the correct table index for the erasing bitmask in A while its at it:
LDA particlex1+1,X CLC ADC #12 LSR LSR RightHalf CMP #8 BMI EORTHis INY SEC SBC #8 CMP #8 BMI UseAsIs INY SEC SBC #8 CMP #8 BMI EORTHis INY SEC SBC #4 JMP RightHalf EORTHis EOR #$07 ; reverse PF bitorder! UseAsIs
Ok, enough bla... attached are binary and source code.
Next milestone are Nathans sprites in action! Yeeha!
Greetings,
Manuel
5 Comments
Recommended Comments