A Simple JavaScript Dice Rolling Site

Portable Network Graphics

Image via Wikipedia

I haven’t been blogging very much about my recent projects lately, and I’ve been putting off writing about this one for a while, but I finally decided to share this. I recently created a JavaScript + SVG dice rolling demo site, roughly based on the work done by Taylor Copeland on his JavaScript dice implementation, as well as a lot of new code written by me, and part of an HTML5 test suite written by Niels Leenheer that detects whether the user’s browser supports inline SVG or not. This code should run just fine on all modern browsers, and if it fails to detect support for SVG images, it should fall back gracefully on pre-rasterized PNG images. The project is open-source, and can be downloaded in it’s entirety as a 7z archive. The source code of the page is dynamically generated using PHP, and it accepts GET parameters that affect the page returned. Also, if you look through the source code, you might just find a secret GET parameter or two… ;)

EDIT: Somehow I managed to forget to link to the actual site, even though I linked to the 7z download. Click here to visit the site. Sorry about that!