# Gambling/Finite Games

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

## Recommended Posts

First off let me say I hope this is the correct forum to post this in. I've been programming video games for a little while now, and finding that certain games strike my interest such as gambling/finite games. I have a billion questions about them, such as how is the payout on the games set, what algorithms are used, and especially with finite games(such as the sweepstakes machines that are currently out right now) how do you predetermine a win and know what to payout?

I'm not really asking for an answer to these things, but maybe for someone to point me in the right direction of resources/examples to read and understand my self.

thanks.

##### Share on other sites
I'm not sure it's the right forum either, but to one of your questions, the payout is set by computing the pure mathematical odds of the event and then subtracting how much the house wants to take away from the transaction.

For example, if you were doing a coin-flipping game, the odds are 1:2 of a win. Perhaps a win only pays 95% instead of 100%. So if I bet $1, if I lose, I lose the$1. If I win, I win $0.95. On a dice-rolling game... if I roll 2 dice and the goal is to get 2x6s, the odds of that are 1 in 36. Instead of paying 36x my bet, the house may pay out only 34x. To the layman, they are saying "Wow! I bet 1 dollar and won 34!" Over time, however, they are losing money on that bet. Incidentally, the only casino game where you theoretically can win money over time is blackjack... but that is because the odds of certain things happening changes throughout the deck. You are allowed to change your behavior accordingly (your wager and your hand play) but the dealer is not. Thus, counting cards. #### Share this post ##### Link to post ##### Share on other sites Quote:  Original post by zxbelloI have a billion questions about them, such as how is the payout on the games set, what algorithms are used, and especially with finite games(such as the sweepstakes machines that are currently out right now) how do you predetermine a win and know what to payout? I used to work in slot-machines, and the design of the prizes and probabilities was completely arbitrary... there was an art to it though, which was mostly learned within the organisation. With slots, first you just throw a bunch of symbols onto the reels, then you assign prizes to combinations of symbols (e.g. 3 kings pays$10 from a \$1 bet).
Then, you do a huge amount of statistical/math calculations... You work out every possible combination of symbols possible, the odds of each appearing, etc... and from this you calculate some important stats like what the average prize from each game is (should be less than 100% of the bet so the house profits from the game), how long the average losing streak is, how volatile the game is (deviation on pay-outs), etc, which give you some measure of how fun it is to the player.
Then you repeat the process until you find a playable, fun game.

For sweepstakes attached to buying a product, then you'd treat a portion of the profit on that item as the "bet". Then, based on the size of the bet and the size of the prize, you can determine how often (on average) you can give out the prize while still breaking even or making a profit.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 11
• 9
• 9
• 44
• ### Forum Statistics

• Total Topics
634131
• Total Posts
3015720
×