- Home /
Help with casino-like game scoring condition detection
Hello everyone,
I decided to try and create a casino-like game as a passion project. I wont be releasing this public, but I really enjoy the creation process, so I have committed some time to it. I am currently in the process of creating the game logic that will randomize the grid and check for scoring conditions.
While I have managed to do the randomization thing, I cant seem to find an efficient way to check if there are any scoring conditions. I want to have about 10 different items that can score if at least 3 of them are adjacent to each other. I wont go into detail on how I have implemented the randomization logic, since I am willing to change the entire thing if it enables me to detect scoring conditions.
btw my grid is 5x3
https://imgur.com/hTjl0QW
Thanks for your time!
Answer by lvskiprof · 5 days ago
You need to determine what are the winning line combinations. On a slot game it will show these lines, typically each in a different color, when you choose how many lines to play. These lines go from one position on a reel to the next position.
So your logic simply has to check each reel position in order to see if a winning combination is present on any of those lines (and all lines can count at the same time). So simply keep a list of lines with the positions in the grid that represent those lines. Typically, any combination has to start on the left side until you hit a reel that doesn't have a winning symbol and that determines how much that line wins.
If you implement scatter wins you check the whole matrix for the scatter symbols.
Hope that helps you.
Mike
Your answer
Follow this Question
Related Questions
Drawing a straight line between two points with 2D UI 1 Answer
Need help writing script 1 Answer
2D renderer with particles on UI 1 Answer
2D Collider larger than specified 0 Answers
Button OnClick() Missing Code Error, How do I fix this? 1 Answer