/JSDice

A simple web page for Virtual D20 dice, written in HTML/SCC with a single JavaScript function

Primary LanguageHTML

Virtual Dice: JavaScript Edition!

I made Virtual Dice once before using Python, which waas super easy to spin up, barely an inconvenience, but good lord, getting that into a TKinter or better app turned out to be a bit of a nightmare. So I decided to learn Javascript instead.

It's nothing too fancy, yet. It just calls a roll() function that passes the specific dice type as a number, and then uses Math.random to generate a result, clean it up, and spit it out on the page.

Future releases will probably come in the form of a React web application.

  • You are free to download this project.
  • You are free to modify this project.
  • If you reupload this project or use any code, please credit me. Thanks! 💙

WHAT IT DOES

Select from 1d2, 3, or the standard d20 dice up through 1d100. The result will appear on the right of the website.

NOTE: I don't know how this will perform on mobile yet. I will try and update the CSS for y'all to be easier to use if it turns out ht's difficult to use. Reach out to me on Twitter at @Scaerietale to let me know!