FREE Template - Wheel spin

simo103simo103 Member, PRO Posts: 1,331
edited February 2012 in Working with GS (Mac)
I was trying to compete in the TOTB4 with a board game idea but just didn't have time to complete. That was secondary to having fun and trying new things ... one thing I worked on was a large spinning wheel that would slowly stop rotating and pointers would 'pick' between Fire, Earth, Water and Air in a kind of rock, paper, scissors type contest. The challenge in logic was I wanted it to stop dead center of each 'pie' in the wheel, not just a random spot. I was able to achieve it with some brain scratching math (for me anyways) ... and since I thought it pretty cool I thought I would put it out as a template for anyone who thinks picking through it would help. Below is a video of it (much smoother in real life as the screen recorder makes it look a little jumpy).



Template Download: http://www.funkymunkygames.com/Promo/spinning_wheel.gameproj.zip

NOTES: The code in the wheel contains 22.5% (which is 360% full circle divided by the number of pie's or 16 in my wheel) and 11.25% which is the 22.5% divided by 2 to determine what half of the pie piece the pointer was on and then move to the next correct spot. If you had less or more pies in your wheel these numbers would need to be changed and it should still work for you. Hope it helps someone.

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Thanks @simo103, that's some pretty slick thinking!

    RThurman
  • simo103simo103 Member, PRO Posts: 1,331
    @RThurman ... coming from you ... I'm humbly honored, thanks .... your stuff is amazing.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Hey -- we are all learning GameSalad together. I really like to learn how to make things like this work in GS. Like I said, that's some pretty slick thinking!

    RThurman
  • rithikrithik Member Posts: 1
    is it for windows
  • simo103simo103 Member, PRO Posts: 1,331
    @rithik .. sorry just saw your post, I don't believe it works on windows at this time. Let me know if you still need help and I can see if I can do screen shots of the code and then you might be able to create/copy it yourself.

    (for future if you use the @simo103 or other persons name) it will tag them that someone asked a question).

Sign In or Register to comment.