Jump to content


Photo

Free space and code optimisation in "JSW"


172 replies to this topic

#171 IRF

IRF

    Advanced Member

  • Contributor
  • 3,036 posts

Posted 12 November 2017 - 11:01 AM

I have now tried out the alternative end to the 'Lose a life' routine, and removed the code in 'Room setup' which wipes the bottom screen-third.

 

Another option I'm considering is, instead of just erasing the expired lives, print over them with a bespoke 16x16 graphic indicating their demise. The code which animates the remaining lives wouldn't touch such graphics, I believe.

 

As per the above, instead of the expired lives being overwritten by a blank sprite (32 contiguous zeroes), I have printed a modified version of the Barrel sprite in their place.  (With the three 'X's being replaced by the letters 'RIP'!)

 

I have also tweaked the 'Draw the remaining lives' routine so that the consecutive lives appear in different animation-frames - like in Geoff Mode, but I have gone further than he did so that the adjacent lives are updated at different times as well.

 

It all works fine.  :)



#172 jetsetdanny

jetsetdanny

    Advanced Member

  • Contributor
  • 1,586 posts

Posted 14 November 2017 - 12:47 AM

Well done! :)

It's interesting to follow this discussion, even though I am only a passive observer.
  • IRF likes this

#173 IRF

IRF

    Advanced Member

  • Contributor
  • 3,036 posts

Posted 17 November 2017 - 09:36 AM

I have now tried out the alternative end to the 'Lose a life' routine, and removed the code in 'Room setup' which wipes the bottom screen-third.

 

 

As per the above, instead of the expired lives being overwritten by a blank sprite (32 contiguous zeroes), I have printed a modified version of the Barrel sprite in their place.  (With the three 'X's being replaced by the letters 'RIP'!)

 

I have also tweaked the 'Draw the remaining lives' routine so that the consecutive lives appear in different animation-frames - like in Geoff Mode, but I have gone further than he did so that the adjacent lives are updated at different times as well.

 

It all works fine.  :)

 

Further to the above, I've also noticed that if you apply the Infinite Lives POKE, the RIP sprite briefly appears when Willy is killed - overprinting the right-hand dancing Willy in the 'Remaining Lives' bar - but then the rightmost dancing Willy is restored (replacing the RIP sprite) when the game resumes!


Edited by IRF, 17 November 2017 - 10:38 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users