This is the only dice application that I know of so far to use the Touch Pro/Diamonds' Accelerometer. Could be used along with a real game of Yahtzee perhaps. Sorry, I know that's not quite what you had in mind.
[App] [Updated 02-NOV-2008] Diamond Cubes
Here is a small OpenGL based program that allows you to use your Diamond as a "Dice Shaker". It is a simple program and it was written to learn how to use OpenGL together with C# on my Diamond.
There are still some bugs in the collision detection code, but I think it is a good example of what can be done with this lovely PDA/Phone.
I apologize for the bad interface, there is not much else you can do then shake it and exit from the program.
The dices are 3D objects and tumble across your screen. I still think there should some better "randomness" and there is an annoying bug, which I short-fused in a very ugly way
Anyway have fun and if I find the time, I will certainly try to improve it.
Done:
- Add sound effects/ buzzer triggering - thanks to
gerDiamond to fix the "bugs" in the collision detection and
surur for the sound and background file. Also thanks to
simplifight to clean up some of the code.
- Better graphics - I think I finally understand OpenGL lighting
![](http://forum.xda-developers.com/images/smilies/biggrin.gif)
- Menu choice for the number of dices - You can choose 1 till 7 dices
- Ticking on the screen is the same as shaking the device.
Still todo
- Different faces for different types of games (for example the dice colors needed for "Cities3D" ?) - Basic setup for this is done, just need to find the time to create the images
- Nicer graphics for the playboard. Again I have the graphics understood and made some code changes with regard to the rendering of the dices.
- 3D tilting. Have a look at my "Paper Plane" app, which shows a 3D F16, which you can look at from all sides.
Lower priority todo
- Zoom in or out ??
- Change size of play-field ???
Any suggestions are welcome.
I will post the latest sources again, but it could take a few days, since they sort of are a mess for the moment.
Dice can be parked by clicking on them. Clicking on them when parked, they will go back to the "field".
Help needed
I could still use some help in the dice rotation algorithm. Currently there is a tendency to favor some numbers, but I need to randomize it better. One solution is perhaps to randomly choose between turning around the x or y-axis ?
Graphics are welcome.
I also could use some help or guidance in using a "3DS" loader or something similar, so that people can design their own dice textures.
If you have nice pictures of dices, preferable JPG or PNG with square sides, I will try to use them. Usable sizes are 64x64, 128x128 or 512x512
Attached Thumbnails
Attached Files
Diamond Cubes V2.CAB (331.5 KB, 12489 views)