Loved it I've never had a chance to play with openGL nor D3D and i find it very interesting.
So I downloaded the solution, and found a few small things to change to make it faster: i changed the ticker interval from 100ms to 40ms (smallest value to poll the accelerometer - or you have to separate polling from drawing)
I also changed the onPaint and removed useless lines (or so I thought ):
protected override void OnPaint(PaintEventArgs e)
{
//updateTimer.Enabled = false;
//base.OnPaint(e);
DrawGLScene();
egl.SwapBuffers(myDisplay, mySurface);
//updateTimer.Enabled = true;
}
So find attached a new and slightly faster version...
... and the solution (just a bit different from yours cgeboers as for some unknown reasons some parts of the projects were not available and i had to re-create an installer)
Also to add collision between the dice (it does not have to be perfect, just pretend they are spheres) and lastly add some sound (sound of shaking dice is freely available on the internet).
http://www.soundsnap.com/node/52585
Also can a real picture be used as the texture for the board?
http://www.platinumbilliards.com/images/STWORO.JPG
Surur
Loved it I've never had a chance to play with openGL nor D3D and i find it very interesting.
So I downloaded the solution, and found a few small things to change to make it faster: i changed the ticker interval from 100ms to 40ms (smallest value to poll the accelerometer - or you have to separate polling from drawing)
I also changed the onPaint and removed useless lines (or so I thought ):
protected override void OnPaint(PaintEventArgs e)
{
//updateTimer.Enabled = false;
//base.OnPaint(e);
DrawGLScene();
egl.SwapBuffers(myDisplay, mySurface);
//updateTimer.Enabled = true;
}
So find attached a new and slightly faster version...
... and the solution (just a bit different from yours cgeboers as for some unknown reasons some parts of the projects were not available and i had to re-create an installer)
Bro,
Great Job...
BTW, there are 2 files, cab and zip....
Do we need to install both files into the diamond???
Or just run the cab file in diamond...
I assume the application is using a real 3D space, vs just being 2 dimensional.
Would it be possible to have camera movements, zooming in and out of the 3d space. Also to add collision between the dice (it does not have to be perfect, just pretend they are spheres) and lastly add some sound (sound of shaking dice is freely available on the internet).
http://www.soundsnap.com/node/52585
Also can a real picture be used as the texture for the board?
http://www.platinumbilliards.com/images/STWORO.JPG
Surur
Yes, this is 3D, cgeboers used openGL.
Zooming is possible, though i'm not sure it has some interest until we can provide more dice to roll... but we could also provide camera movements based on the Diamond's position (holographic-like effect).
Sphere approximation collision handling was already done by cgeboers ; i've just added something to avoid dice to get superposed when they run into each other.
I've also added a background and sound, based on the resources you provided
You can try by yourself the current version attached... Rolling dice can be addictive... Even without a purpose
Great job ! I started working on it again also, but I guess I will leave it to the pros to make something nice out of it. I have fixed the lighting already so each side is better and more realistic lighted.
I also changed the rotation math a bit, because with the current one, it is almost impossible to throw a "four". (Don't know if anybody noticed this yet)
And the last changes have to do with the OpenGLES project. I added some classes there and moved others to this project.
Sources are attached here, but no binaries. I assume that other will update theirs and share the sources.