5x3 Slot Game Logic

Started by
14 comments, last by JessKass 4 years, 8 months ago

How it usually works is a reel band is created which represents the symbols that will spin through the reels. Usually this is as simple as a char array where each character represents an individual symbol:


{ 'A', 'L', 'K', 'T', 'T', 'B' .... etc }

(If you play a web based slot game with your browsers console window open, you sometimes capture the communication of the reel band strips from server to client on the Network tab!)

When the player hits the 'Spin' button an RNG will generate a number between 0 - length of the reel set and this will be the stop position for that reel. Once all stop positions for all reels are generated you'll have the final window and can then evaluate it for any winning prizes/bonuses.

Whilst all of this is going on in the background the player will just see a repeated set of symbols spinning through (Since you've already defined the reel band layout you just simply spawn images and move them down the screen). When it's time to stop you would then take the generated reel positions, spawn in the required symbols and have them enter the screen. This time however they won't fall out of the bottom and will instead stop in the required places.

Regarding actually creating a reel band which doesn't over-or-under pay, most people I've encountered tend to just brute force it through Monte-Carlo style simulations where they'll create a set of reels they think will have a decent hit rate and RTP (return to player) and then simulate several million-billion games to get the average wins. If it's too high they take away winning combinations, if it's too low they add more in until eventually it sits at a reasonable win-to-loss ratio (Usually around 95% averaged across a few hundred million - tens of billions of games).

Hope this helps!

Advertisement
On 8/20/2019 at 7:13 PM, Ashley_H said:

When the player hits the 'Spin' button an RNG will generate a number between 0 - length of the reel set and this will be the stop position for that reel. Once all stop positions for all reels are generated you'll have the final window and can then evaluate it for any winning prizes/bonuses.

 

On 8/20/2019 at 7:13 PM, Ashley_H said:

Regarding actually creating a reel band which doesn't over-or-under pay, most people I've encountered tend to just brute force it through Monte-Carlo style simulations where they'll create a set of reels they think will have a decent hit rate and RTP (return to player) and then simulate several million-billion games to get the average wins. If it's too high they take away winning combinations, if it's too low they add more in until eventually it sits at a reasonable win-to-loss ratio (Usually around 95% averaged across a few hundred million - tens of billions of games).

I don't think anyone who is aiming for a specific RTP would do it this way. Instead, you would weigh your outcomes (if the player will win or not, and how much if they do) with regards to your RTP, and then use RNG to select the outcome. Then you make the reels stop in such a way to end up with the selected outcome. The rolling, stopping reels one by one, and even STOP buttons are all smoke and mirrors.

5 hours ago, 1024 said:

 

I don't think anyone who is aiming for a specific RTP would do it this way. Instead, you would weigh your outcomes (if the player will win or not, and how much if they do) with regards to your RTP, and then use RNG to select the outcome. Then you make the reels stop in such a way to end up with the selected outcome. The rolling, stopping reels one by one, and even STOP buttons are all smoke and mirrors.

Whilst I can't speak for every company, as a former Novomatic employee I can confirm that this is exactly how their engine and the engines of their subsidiaries would work. The other option would be create a mathematical representation of a set of reel bands which was statistically proven to hit a desired RTP (That method was way beyond my understanding so I won't even attempt to describe it here), however the Monte Carlo approach was generally the most commonly encountered method due to its simplicity and ease of validation (You don't need to write fancy simulators or mathematical models to prove the RTP of your game - Simply write something to brute force about 10 billion game rounds and then output the final win-to-loss ratio).

For feature games, prizes and bonuses etc those would generally work as you described - There would be a list of predefined prizes or game outcomes and the RNG would select from these rather than selecting random positions on a reel band. However, this was more to conform to legal obligations whilst controlling the outcome of a game than for any practical reason.

You're right. I asked a colleague of mine that works on this and got a similar response (in their case, they get the complicated mathematical model) He said that, if the game is complex enough (if it has an arbitrary number of extra free spins, for example), the method I suggested can't be done because there are too many outcomes.

All in all, if the game is not too complicated the simpler method could work.

I've read your comments and called to mind this meme
5b79462507e931a3c96b644cad7d8429.jpeg

This topic is closed to new replies.

Advertisement