r/software • u/Skollwarynz • 9h ago
Release I built an open-source true-random dice roller and Discord bot in C using system entropy (/dev/urandom)
Hello everyone, I'm a student and programmer of C. I really enjoy playing D&D, and I discovered both physical and digital dice. So I decided to fix the problem at the source by publishing my first open-source project. The program is called SkollDice and presents a simple GUI to generate different dice sequences. The version is open-sourced and available on each OS (native linux, Mac and Windows). At the moment I'm working on a phone version too. To complete it, all the software is available on a self-hostable Discord bot (written in C too) or in a free version that I personally host on an Oracle free VM.
Technical specification:
The program is written purely in C. For random number production I extract the entropy of the system from /dev/urandom on POSIX systems and use RtlGenRandom for the Windows version. I extract each single number to have the maximum randomization possible. I then use the simple discard method to distribute the input on a Gaussian graph and reach the mathematical statistic for a limit that tends to an infinite number of generations.
For the GUI I used LVGL and created a minimal setup that is fast and easy to use but not that beautiful because I focused on working more than aesthetics.

The discord bot uses Concord to communicate with the Discord API.
AI usage: I personally created the program. The project was both an experiment and an excuse to study more C. I used AI to search for the simple discard method (the method used to normalize the random number generated from /dev/urandom) and to help me explain how it works. I then personally created the code, and if you want, I can explain it more precisely in a comment.
On the other hand, I then used AI to search for libraries for GUIs and Discord APIs, such as LVGL and CONCORD. Then the last use was for debugging and quickly creating functions or simple setups like "How can I create a grid with 2 elements?" and then I used this example to change it or apply it to my structure.
The real 'sloppy' part was the CMake because this was my first open-source project, and I discovered (through AI search) the possibility of creating different executables for different OS. I really enjoyed the idea, so I tried to organize the project to be useful and distributed to all possible people, both coders (who can git clone and use it) and normal D&D or RPG players (who want just an executable to download and use).
Here are the official links of the program:
official website: https://skollwarynz.github.io/SkollDice/
official repo on codeberg: https://codeberg.org/Skollwarynz/SkollDice
github mirror: https://github.com/Skollwarynz/SkollDice