4

I want to create a 5 reels slot machine calculation system and I'm not sure what approach to take.

I understand that there is a lot of math within it, especially if I want the machine to be enjoyable to a player.

Are there any tips/links for that? Was looking for info at the web but they discuss on it from the player's perspective rather than the developer's perspective, in all cases I've found.

Just to make it clear; I'm not after the user interface stuff, but only after the internal machine's payout calculation, which will make sure the house gets a revenue while maintaining good playability.

Programming language would be C++, yet I'm fine with others.

Poni
  • 11,061
  • 25
  • 80
  • 121
  • your problem is not a programing but an analyze of project specification problem. Your first step is to make sure your specification is well define. – Phong Oct 21 '10 at 10:07
  • 1
    You may try to google the greatest book: "Slot Math Can be Fun". It describes the slot machine math perfectly. – Evgeny Dec 04 '12 at 03:54
  • Please, can you write who is the author of "Slot Math Can be Fun"? I have tried to find the book, but too many irrelevant results come up. – Todor Balabanov Oct 09 '17 at 08:25
  • 1
    @TodorBalabanov the author is John Wilson – Arman P. Jan 24 '18 at 19:49

2 Answers2

10

As Phong noted, you need to first determine what the overall, long-term payout of the machine should be. e.g. $0.95 for every $1.

You then look at all your winning combinations, the odds of that combination occurring, and the payout of that combination. Add them all together and it should be equal to your desired long term payout.

The trick then is to balance the combinations so you have a few ones that are easy to hit, and pay low, to keep payouts happening every so often, and a one that is very hard to hit, but pays high, so there's always the chance of a big payout.

It's really all about design and maths, rather than implementation and coding.

Quick example of the maths: If you had a 3 reel machine with 10 slots (call them A-J) on each reel, and you wanted to payout $0.95 for every dollar long term, then you might have:

AAA - odds 0.001 - pays $500 - expected payout - $0.50
A-- - odds 0.100 - pays $3 - expected payout - $0.30
B-- - odds 0.100 - pays $1.50 - expected payout - $0.15

Dave Jennings
  • 306
  • 3
  • 7
2

You need to first define:

  • On how much money played, how much do you want to keep, and how much the player can win.
  • On a win, how much do you want the user to win (eg: 5$ to 1000$)

after that then you need to geenrate a random function which will have a correspond to your spec (win loose). and (how much to money to get)

You need to check if the result is ok with the current state of the machine It is still random... so it avoid having too much win/loose. (anybody did see a machine loosing money yet ??? :) )

Phong
  • 6,600
  • 4
  • 32
  • 61