BuGS Weekly Update

I didn’t get as much time this week to work on it as I wanted but I did implement some of the ideas from last week’s discussion.  I changed the array of structs to structs of arrays.  This was a minor win really since I did a bunch to reduce the cost of the old implementation already.  The big change is that I implemented the code to redraw the dirty tiles right after the beam.  I am using the vertical counter in $e0c02e and $e0c02f to do this.  By doing this, the background is already redrawn by the time the beam hits the bottom and I only need to draw bugs and update game state before the next frame.  With this, I am almost smooth again on 2.8MHz.  This is 2.8MHz on GSPlus.  I haven’t tried it on real HW yet though so buyer beware.

Source Code

Changes

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.