Jump to content
  • Advertisement
Sign in to follow this  
mike74

slot machine physics

This topic is 4815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone have any ideas for programming the physics of the reels spinning on a 3d slot machine? Basically, I need a function that produces an angle of rotation given the current time. Eventually, the angle of rotation needs to end up at a multiple of 45 degrees (because I have 8 items on each reel and I want them to be aligned right when the spin is thru). mike http://www.coolgroups.com/

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by mike74
Does anyone have any ideas for programming the physics of the reels spinning on a 3d slot machine? Basically, I need a function that produces an angle of rotation given the current time. Eventually, the angle of rotation needs to end up at a multiple of 45 degrees (because I have 8 items on each reel and I want them to be aligned right when the spin is thru).

mike
http://www.coolgroups.com/

This is a simple application of a well-known kinematics formula. Use

θ(t) = ω · t

where ω is the angular velocity of the reel. To get this in increments of 45 degrees, use θ*(t) = θ(t)/2π - floor[θ(t)/2π] * θ(t)/2π. Then multiply the result by 2π/8 to get a number in the range [0, 7]. Multiply the integral value by 45 degrees to get the final position.

Share this post


Link to post
Share on other sites
If there are eight faces then there are 16 stop positions. I believe with a modern slot machine the electronics determines the outcome and motors produce it. The only nearly random part is the electronics selecting an outcome. The spinning of the reels is just a show to entertain the player.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!