OpenDice started as part of OpenFray, where I needed a dice engine that could handle far more than just 1d20 + 5. Running a modern virtual tabletop means supporting rerolls, exploding dice, keep/drop modifiers, advantage, disadvantage, nested expressions, and deterministic evaluation, all while remaining predictable enough to build game mechanics on top of. Rather than relying on an existing library, I built one from scratch, eventually extracting it into its own open source npm package.

As the library matured, it became clear it could be useful beyond JavaScript projects. That’s where Rollful came from. It exposes the same engine through a hosted API and a simple web interface, letting anyone evaluate dice expressions without writing code or installing a dependency. The website also doubles as an interactive playground, returning exactly the same results as the API, since both are powered by the same underlying implementation.

Together, OpenDice and Rollful solve the same problem at different levels. One is a library you embed directly into your application, the other is a service you can call from anywhere. Both are open source, built around a single implementation, and designed to make dice rolling reliable enough that developers never have to think about it again.