GB game yeeaahh! This game is perfect in it's simple but fun gameplay. I was only able to get a little over 50 so I'll have to work on my customer service skills. I liked the increasing difficulty, graphics, and the buckos moving around for each order. I wanted to get the leading 0s for the score in my game so that's something I was curious about.
GBDK comes with a data type to store numbers as binary-coded decimal (BCD) and do math with them. Each digit of the score is converted to binary seperately and stored in half a byte / nibble e.g. 56709 would be converted to
0101 0110 0111 0000 1001
This representation makes it easy to map the digits to the tiles to be used for drawing (if they are contigious), extract each nibble and add the start offset for the tiles to it.
GBDK uses 4 byte to represent a number in BCD format, representing 8 digits.
A score of 56709 would actually be stored as
00000000 00000101 01100111 00001001
To get the leading zeroes, one then just converts the whole Score in BCD to tiles and it would be formatted to be 8 digits, 00056709.
Got to 102 before I tripped into the coffee machine when the customer wanted the water machine and it all went downhill....
Said this during the stream, but I really like how the instant flash to a game over makes it look like a disgruntled customer was so disappointed in the service that they blew up the store.
You got more that I did, my best was a bit over 80 (not sure exactly how much because of a sudden game over). In a way you even beat the game, after 91, there aren't difficulty increases anymore.
If I ever were to redraw the game over screen, I should pick that idea up maybe and make it an explosion (or just draw a very sad bucko).
← Return to game
Comments
Log in with itch.io to leave a comment.
GB game yeeaahh! This game is perfect in it's simple but fun gameplay. I was only able to get a little over 50 so I'll have to work on my customer service skills. I liked the increasing difficulty, graphics, and the buckos moving around for each order. I wanted to get the leading 0s for the score in my game so that's something I was curious about.
Thank you!
GBDK comes with a data type to store numbers as binary-coded decimal (BCD) and do math with them. Each digit of the score is converted to binary seperately and stored in half a byte / nibble e.g. 56709 would be converted to
0101 0110 0111 0000 1001
This representation makes it easy to map the digits to the tiles to be used for drawing (if they are contigious), extract each nibble and add the start offset for the tiles to it.
GBDK uses 4 byte to represent a number in BCD format, representing 8 digits.
A score of 56709 would actually be stored as
00000000 00000101 01100111 00001001
To get the leading zeroes, one then just converts the whole Score in BCD to tiles and it would be formatted to be 8 digits, 00056709.
This is the code for keeping and rendering the score
Fun and challenging, I think my best was around 50-60. Love the sprites, and so cool that it's an actual GB game!
Got to 102 before I tripped into the coffee machine when the customer wanted the water machine and it all went downhill....
Said this during the stream, but I really like how the instant flash to a game over makes it look like a disgruntled customer was so disappointed in the service that they blew up the store.
You got more that I did, my best was a bit over 80 (not sure exactly how much because of a sudden game over). In a way you even beat the game, after 91, there aren't difficulty increases anymore.
If I ever were to redraw the game over screen, I should pick that idea up maybe and make it an explosion (or just draw a very sad bucko).
Thank you for playing!