The Fnordistan Department of Software Engineering

SmallRoller (version 1.3)

SmallRoller is a simple dice rolling program that also calculates probabilities. It can handle an arbitrary number of dice with an arbitrary number of sides (up to the limits of your computer's memory, anyway), and not only calculate an ordinary bell curve, but also the probability of getting a certain number of results in a certain range when tallying up each die individually. (Yes, that's a binomial probability distribution for you statistics majors.)

In other words, not only is it good for calculating your odds in craps, GURPS, and THAC0, but also Yahtzee and Storyteller dice pools.


SmallRoller screenshot #1

SmallRoller screenshot #2

SmallRoller screenshot #3

Latest Update: 1.3 (May 29, 2005)

Previous Updates

1.2 (August 12, 2004)

1.1 (August 8, 2004)

Release Notes

SmallRoller is released under the terms of Cincom's VisualWorks Non-Commercial license. (Basically, it's free for all non-commercial purposes. I can't charge money for it, and neither can you, but feel free to distribute it.)

SmallRoller was developed using Cincom's VisualWorks Non-Commercial edition. It is written in Smalltalk.

Known Issues

SmallRoller is not recommended for use with more dice than you can actually hold in your hands.

The algorithm for calculating a bell curve with multiple dice is recursive, so with lots of dice with lots of sides (like 100d100), you'll start to see a noticeable lag, and if you start inputting really big numbers, SmallRoller will crash. (How big depends on your system's resources.)

SmallRoller is not recommended for use with nuclear missile guidance systems, monitoring pacemakers, or betting your mortage in Vegas.

I think my algorithms are correct, but I make no warranty <insert usual disclaimers here about how if the program melts your computer, sets your cat on fire, and makes your girlfriend hate you, it's not my fault, blah blah blah>

Displaying Probabilities

You can display probabilities as either a fraction or as a percentage. As a percentage, probabilities are rounded off to the nearest 1/100th of a percent, so probabilities that are greater than 99.99% will display as 100%. Switch to the fractional display, and if the probability is really 100%, it will display as 1. Otherwise it will display as some ridiculously long ratio, which brings me to the second point -- because of the way Smalltalk does math, sometimes fractions don't get reduced to simplest form. The probability of rolling 3 or more on 2D6, for example, should display at (35/36), but instead displays as (482929/496727). I haven't tracked down these rounding quirks, nor implemented a prettier format for fractions.

"5 MB?! It's too big!"

Yes, SmallRoller is pretty big for such a simple application. Smalltalk applications, like Java applications, require a virtual machine to run, but unlike Java, you probably don't have Smalltalk already installed on your computer. SmallRoller is bundled with an executable Smalltalk runtime, but even stripping that out would save less than 1 MB of space.

"I want..."

Leave comments on my blog, and I may consider adding new features. Definitely let me know of any bugs or inaccurate calculations. (Well, I guess those would qualify as "bugs" too, wouldn't they?) I am planning to add an option to display a graphical bell curve, and maybe some other nifty features, as time allows.


Instructions: There are two files that can be downloaded. contains a stand-alone executable file called SmallRoller.exe. Just unzip it and run it by double-clicking it in Windows Explorer. This executable will only work in Windows.

The other file, is a Smalltalk image. It contains the same application, but it is not a stand-alone executable; in order to run it, you must have a Smalltalk virtual machine from Cincom installed. Free, non-commercial versions of VisualWorks are available for most operating systems, including Windows, Macs, Linux, and Solaris. The image should work for any system that has VisualWorks installed, but I have not tested it on every OS.

Smalltalk Sourcecode

If you want the actual sourcecode, here it is. PCL files are binary parcels (used by VisualWorks), while PST files are Cincom's XML fileout format. The Statistics parcel contains the classes that do the probability calculations, while the SmallRoller parcel contains the GUI application, as well as the DiceRandomizer class. My intent is to put a lot more functionality in the Statistic parcel, to make it more generally useful.