4
retard
5y

Hey Game developers,
I'm making a roulette game for a client. He wants that the motion of ball in wheel should look completely random but it should fall into desired number i.e. the outcome of roulette wheel should be predetermined, not random. Any idea how do I do that?

Comments
  • 11
    You could calculate the positions (random) in reverse, store them and then just play the whole thing from the beginning. Just like a timeline / video that's predefined.

    Edit:
    But the whole request of your client sounds pretty shady... 😅
  • 3
    Another way would be to run the whole simulation in the background to determine where the ball is going to stop, rotate the number wheel to your desired result and then run the whole thing again.

    And I definitely agree that this is a pretty questionable request, especially as there's probably some money involved.
  • 2
    @PonySlaystation @deadlyRants
    Both the ideas sounds practical. As a beginner.. I need a lot more learning and experience to implement them.
    Btw, yes he have intentions to cheat user using this trick, but no real money is involved anywhere in the app so I don't think that will be the problem. He want users to watch ads to earn additional chips.
  • 3
    @retard Hmm... that's still fraudulent, as "users watching ads for free stuff" is still about money (ad revenue).
  • 2
    Have the ball rotate randomly. In fact blurring and the fact that the force pushes the ball into the same trajectory for most of the time. When bets are already placed extract a number randomly. Then you can move the game in a new state, calculating a random trajectory starting from the arrival number to the area the ball needs to end into. As the trajectory of the ball covers all the roulette you do not need to worry about the end position of your path just to increase the speed of the ball so when you play the video in reversal it will seem to slow down. If that is not enough and the client needs the number to be predetermined you can add an arbitrary number of rounds to the ball. Make sure that bets are off before the number is determined. The chaos of real world is impossible to replicate on a machine so by determining the number in advance you would only open yourself to exploits. However you can calculate trajectories in advance and then pick one at random.
  • 1
    Yes I do, but that's shady. Backwards like the first one said, but that might look obvious. I would run the simulation 10-100 times and save the animations. Now remember for each simulation the outcome and rotate the bowl occordingly and let the animation run.
Add Comment