A little experimentation tonight to see how long each of the drawing routines take using the 1980s equivalent of console.log - palette switching
black background shows how long it takes to draw the canyon walls
yellow shows how long it takes to draw the player sprite (24 * 16)
blue - I run the player sprite routine again 8 times to simulate drawing other things
red - 'spare' cycles
I've started thinking about optimising the canyon drawing code as it is using by far the most cycles, switching to pure zero page could almost halve the loop time (42 cycles instead of 70) however this complicates the scrolling logic and would require some extra comparisons/branching which might end up reducing the gains - still its worth looking at I think.
I'm not sure I can optimize the player drawing much, its pure zero page with everything page aligned as much as possible.
This is fun![Smile :)]()

yellow shows how long it takes to draw the player sprite (24 * 16)
blue - I run the player sprite routine again 8 times to simulate drawing other things
red - 'spare' cycles
I've started thinking about optimising the canyon drawing code as it is using by far the most cycles, switching to pure zero page could almost halve the loop time (42 cycles instead of 70) however this complicates the scrolling logic and would require some extra comparisons/branching which might end up reducing the gains - still its worth looking at I think.
I'm not sure I can optimize the player drawing much, its pure zero page with everything page aligned as much as possible.
This is fun

Statistics: Posted by rasto1968 — Sun May 19, 2024 11:09 pm