How high is your highscore?

Right, I recently came into a little problem regarding storing highScores and comparing between them. It sounds stupid as most people would probably think. “Well, duhhhh use greater than or less than”

Which is fine. but with the gameboy being 8 Bit, I’m storing my scores as arrays as scores up to 255 would be rather boring….

So, for example 9,001 would fit into an array of 4 lots of UINT8, for an easier time displaying things to the screen, without extra computation.


In a game I’m making currently, scores can extend beyond the limits of a 16 bit integer also, so we’re using slighlty longer arrays to store things in, no biggie.

But. I’ve found a handy solution to my problem, along the lines of the following:

What the code above does is compare the arrays on an integer by integer basis and set another variable with the result, reliably!

I hope this helps someone out there who has a similar issue regarding setting up high-score boards on the gameboy as this seems to be a safe an fairly quick method.

I may well be missing another way that’s quicker all-around but this seems to work for me anyway 🙂

Expect a new game posted around the end of this month 🙂