PDA

View Full Version : Realistic rolling dices (yahtzee)



arckodrazen
January 31st, 2007, 02:32 PM
Hi guys

I'm making a yahtzee game. I'd like to make an animation of rolling dices instead of some simple surface switching of a die surface. I found an example here: http://www.allgames4u.com/yahtzee.htm
I really like how this is animated. Can you guys help me with analyzing on how to do this animation? I've been using flash 8 & actionscript for several months now and I think that I'm capable of doing this animation (I also know how to do some basic 3D art & animating in swift3D).

It would be great if someone already made this animation but I don't like ripping someones solution so IF you like to post your solution you can be sure that I'm not going to do some copy/pasting but instead using your file as an informational example.

So, can you guys help me by telling me what kind of techniques I need to use for making such an animation as referred above?

I see that the animation has dice that bump against each other. How do I do this?
How would you make an animation like this? Should I use 3D? ... ?

Currently I have this (my static solution): a roll button, 5 dices. If you press roll, the math.random function generates a number from 1 to 6 and with this number I use a gotoAndStop() in a die-MovieClip which results in displaying the correct number of eyes on the surface of the die.

Shoot! ;)

Vrvy
January 31st, 2007, 04:16 PM
The link you provided has basically the same solution as you.
Render the rolling dice in a 3d software, then for the last frame, render each dice separatly for each side facing up (6 images). Then put these 6 images in a movieclip and use gotoAndStop to show the number you have generated.

arckodrazen
January 31st, 2007, 05:09 PM
Should I make the animation in flash or should I animate them in my 3D program or should I do a partial animation in both?

I think that the first one is better since this gives me the flexibility to do calculations on them (dice). But how do I rotate them in 3 dimensions?

As you can see in the link in my first post they bump against each other and the animation of the dice are always different, not pre-animated.

Any further suggestions?

SacrificialLamb
January 31st, 2007, 09:55 PM
to me it look's like there are only 2-3 animations and when the die stop they blur it then switch to a random face in the paten depending on the animation it played, you should only need one or two animations then switch to a frame of a MC where ever it lands.