top of page

Shark improvement update

Its always nice when I can go back to an old project and make it slightly better, and bug fix.




Shark was the first "true" game I made on the Fairchild Channel F, though I have done a few other projects on it before - back in 2021. Complete with scoring, a highscore feature and some beeping.




The update is a sign of some of the improvements I've made, including the ability to edit old code without worrying too much what any of it means.


Improvements include graphical, bug fixing, and sounds.


Graphical improvements is a result of flicker reduction. Moving shark or player now only wipes the row or column that won't be replaced by the new image - ie what now needs to be blank. Before in this project while I was still starting out it wiped the entire area, then printed it all again. Now it prints a blank space in the smallest space possible to eliminate flicker. This also makes movement faster.


The Fish needs to be done too, but for some daft reason I coded it to work slightly differently - wiping the position, then moving its location then printing later. I need to switch that so it doesn't wipe anything until after the location move has happened, then I can set it to wipe a line like the other two graphics. To do list for the next version, alongside improving the fish random movement.


The sounds have been altered to include a "collect" sound for the fish being caught (at the same time as the score going up one, naturally) and also a death sound for being caught by the shark. The next logical thing might be to do a title screen sound, the obvious sound might be a bit naughty as its copyrighted however.


Finally there is an important bug fix in terms of the highscore - I talked a bit about it on atariage ( https://forums.atariage.com/topic/274416-the-official-channel-f-thread/?do=findComment&comment=5112670 - where you can also download the latest version), essentially I wasn't triggering flag setting correctly, and it would wipe the highscore in the event of a lower score - sometimes to zero. What I now do is I use one's compliment of the current highscore for the three digits (just how I personally do scoring - there is probably better ways) - then add the score for the corresponding digit. If the overflow (carry) flag is set, I know the current and lower digits needs replacing. If the carry flag was not set, I check for one less than that - 255 - to see if it "matches". If it does - it checks the next digit. if the product of the inverted highscore digit and the score digit is less than 255, I know its lower and can be skipped.


There is some slight improvements to the shark and fish ai, but I would like to have another look again at it to make sure its slightly harder at the beginning. I think this issue is less apparent later on when the shark is moving at a much greater speed.


These might be small improvements, but they are necessary ones and ones I'm glad I've sorted out. Hope you like it.


1 view0 comments

Recent Posts

See All
bottom of page