@edwardsmale

Silverlight 3D Dice Simulator


A new, improved Silverlight Dice Simulator. This one decorates each face with an image showing the spots (whereas the last version just had white diamonds which looked a bit naff). This uses Silverlight's non-affine matrix projection to map a bitmap onto a rectangular 3D polygon.

If you download the source code, you will find a separate project called 'Silverlight3D'. This enables a basic 3D scene to be created, containing 3D polygons and lines. You could use this to create a simple Doom-style game, with texture-mapped walls etc. I would do this but unfortunately I don't have the time. The simple 3D library is very much a work in progress, so don't expect perfection. But it might give you some ideas and some tools upon which to build.

The 'face content method' option allows you to switch between rendering the die faces using images (PNG's mapped onto the sides of the cube using Matrix3DProjection), or a red square with 1-6 white ellipses (also mapped onto the sides of the cube using Matrix3DProjection). The advantage of the ellipse method is that it allows the sides to be shaded according to the light source position. However the ellipse method is considerably slower.

In Version 3 I have overhauled the source code, to make the dice more configurable, with the option to override the default settings by implementing various interfaces. I'm moving towards fully encapsulating the Dice code to make it more 'pluggable'.

Download Silverlight 3D Dice 3 Source Code

Other Silverlight Stuff


Comments

Marc Vandeputte
24/01/2011

Ed Smale
24/01/2011

wp7ericmswong
13/02/2011

ZhanSh
19/02/2011

Ed Smale
24/02/2011

Zlatko
17/03/2011

Ed Smale
28/03/2011

Zlatko
29/03/2011

Ed Smale
08/04/2011

wp7ericmswong
25/05/2011

AMiNE
12/08/2011

Ed Smale
16/08/2011

AMiNE
19/08/2011

Ed Smale
20/08/2011

AMiNE
27/08/2011

Jim
19/11/2011

Jim
22/11/2011

Ed Smale
23/11/2011

Jim
23/11/2011

jim
23/11/2011

Ed Smale
25/11/2011

Ed Smale
25/11/2011

Jim
26/11/2011

Ed Smale
28/11/2011

Jim
28/11/2011

Ed Smale
29/11/2011

Anonymous
29/11/2011

David
22/01/2012

Ed Smale
24/01/2012

David
28/01/2012

Ed Smale
31/01/2012

Leave a comment!