You probably remember the flicker many NES games had. This is caused by sprite cycling. The flicker is mildly annoying, but it's tonnes better then getting killed by enemies or projectiles you can't see. Basically, you still only see 8 sprites per scanline, but you cycle the sprites being turned off to a different one every frame.
chronicleroflegends recently found and adjusted the code responsible for sprite draw order, and I used those changes as a base to add sprite cycling to it as well. I even borrowed the bit detecting the player to make it draw on top (to also keep the player from being part of the flicker cycle). It was actually a pretty small change to get it to work.
If you'd like to add Sprite Cycling to your NESmaker project.
Find the original UpdateDrawOrder section in HandleUpdateObjects.asm (around line 823, I also like to make a backup copy of the file first, just-in-case). Select the entire selection listed below:
Code: Select all
UpdateDrawOrder: LDX #$1 OrderLoop: LDY drawOrder,x LDA Object_y_hi,y STA temp ;;;; what would drawOrder-1 be? if it is 0, would would have to become 0f. LDY drawOrder-1,x LDA Object_y_hi,y CMP temp BCS doneWithSwapItem LDA drawOrder,x STA drawOrder-1,x TYA STA drawOrder,x doneWithSwapItem: INX CPX #TOTAL_MAX_OBJECTS BNE OrderLoop RTS
Code: Select all
UpdateDrawOrder: ;;Now with sprite cycling LDX #$1 OrderLoop: LDA drawOrder,x LDY drawOrder-1,x CPY player1_object ;; if previous is player object, don't swap them. BEQ doneWithSwapItem LDA drawOrder,x STA drawOrder-1,x TYA STA drawOrder,x doneWithSwapItem: INX CPX #TOTAL_MAX_OBJECTS BNE OrderLoop RTS
EDIT2: removed unnecessary draw sorting.