Silverlight 3D Dice 2 Source Code
A new and improved Silverlight dice roller! This one has a texture-mapped container for the dice to roll in, and massively improved performance, meaning it can easily roll as many as 8 dice at once. You can also select the dice colours from a range of options.
This user control works in Silverlight 4 and above. It uses my own home-made 3D library since there's no built-in support for 3D in Silverlight 4.
I was concerned about how random the dice were, but after some testing and a bit of tweaking, I measured that the results for 2 dice are what you'd expect statistically.
There's an XNA version in the pipeline; it's all working although I need to make the control customisable. This is based on the Windows Phone app, which also uses XNA. It will be a game component that you can add to an XNA game and customise in code.
Downloads
- Silverlight 4 Demo Project (the above demo)
- Silverlight 4 Game Example project
Coming soon
- XNA Game Component