This is a basic die roller app. It will currently roll one or two 6 sided dice, but this can easily be expanded once WP7 supports the wrap panel control. The dice are animated cubes which are currently rotated based on a random number parameter. In an actual phone that functionality would be augmented by accessing the phones accelerometer to provide a more realistic user experience. Whichever face ends up pointed towards the user is the value which is displayed in the text block beneath each die.
In the future I intend to:
- add other dice values (4, 6, 10, 12, and 20 sided dice)
- tweak the animation so that the end face is more obvious
- display the total sum value of the dice rolls
- create visual styles such as randomly colored dice, translucent dice, display numbers instead of pips, etc.
The biggest hurdle in moving forward is creating the 3D models of the dice. Silverlight doesn’t have any 3D primitives by default, so each model’s position and rotation has to be built face by face.
This is a basic die roller app. It will currently roll one or two 6 sided dice, but this can easily be expanded once WP7 supports the wrap panel control. The dice are animated cubes which are currently rotated based on a random number parameter. In an actual phone that functionality would be augmented by accessing the phones accelerometer to provide a more realistic user experience. Whichever face ends up pointed towards the user is the value which is displayed in the text block beneath each die.
In the future I intend to:
- add other dice values (4, 6, 10, 12, and 20 sided dice)
- tweak the animation so that the end face is more obvious
- display the total sum value of the dice rolls
- create visual styles such as randomly colored dice, translucent dice, display numbers instead of pips, etc.
The biggest hurdle in moving forward is creating the 3D models of the dice. Silverlight doesn’t have any 3D primitives by default, so each model’s position and rotation has to be built face by face.
