Do you like dice oriented games but sometimes find yourself without any? 

Do you happen to carry your Gameboy everywhere?

Then Dwelly's Dice Companion has you covered.

Made with GB STUDIO!

Currently Included Dice:

  • D4
  • D6
  • D8
  • D10
  • D12
  • D20

You can download the rom and run it on your Gameboy!


I've been toying with dice in GB STUDIO and it seems Generating Random numbers usually results in a very noticeable bias.

This issue can be resolved by only ever using a multiple of 8. It just works. Don't ask me why, I don't know. 

Simplified example for the D4

Set $roll to Random Number between 1 - 8

if $Roll > 4 LOOP: {

Set $roll to Random Number between 1 - 8  }

Display $Roll

Perfectly even distribution of results, fair and balanced. 


The game itself is free & project files are available if you wish to purchase them. 

Updated 2 days ago
Published 14 days ago
StatusIn development
PlatformsHTML5
AuthorDwelly
TagsDice, Game Boy, Game Boy ROM

Download

Download NowName your own price

Click download now to get access to the following files:

DwellysDiceCompanion.gb (Silent Ver) 128 kB
DiceCompanionV1.1.gb 128 kB
DiceCompanionProjectFiles.zip 215 kB
if you pay $1.99 USD or more

Comments

Log in with itch.io to leave a comment.

(1 edit)

Because the loop can repeat an unknown number of times, you get random times spent to roll the dice.

For 4, you could do 'if $Roll > 4, $Roll = $Roll - 4'

For 6, you can use 24 and subtract 6 from it repeatedly until it's 6 or less (or, if it's >12 you subtract 12, and if >18 subtract 18, I'm not sure which ends up more efficient in the end). For 12 you can use 24 again, but just subtract 12. 

For 10 and 20, 40's your best bet, I suppose.

Assuming generating a number between 1 and 40 doesn't take terribly long, this is basically just using "mod" but by way of subtraction so you don't need to do any division on a GameBoy.

While you're still doing a bit of looping, you're at least guaranteed to never do the loop more than a fixed number of times.

ah that's such a good idea!

I've actually implemented the rolling graphic somewhat for the purpose of time consistency although I was having the opposite problem. it always performs the loop so fast I had to add the "rolling..." to obscure the result because if you got the same number again there was no way to tell if you had even rolled! 


I imagine this may be because the numbers are so small its unlikely to loop for too long and the Gameboys an actual beast of a machine! So the time differential from start to finish is currently not really perceivable but the potential is certainly there.

Honestly, really smart thinking that I'm eager to implement!