Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a HTML5 slot game and am completely stuck on the pay lines and the dots that produce the lines from 1 end to the other.

What's the logic behind generating a random number of dots (9-30) and then paylines properly? Paylines shouldn't overlap each other. Similarly paydots shouldn't overlap and position themselves properly. On a small mobile screen 30 dots should just fit fine.

Then, how can I go about matching combinations from reels against the paylines?

share|improve this question
This question seems vague. Can you edit your question to be a bit more specific? – Jason Coombes Apr 2 '13 at 6:37
Your pay lines are going to cross no matter what. Also the more lines you have the more likely they are to overlay each other (The company I work for primarily makes slot machines and their games). What you could do is check and see how many pay lines you already have over laying a reel symbol and use that count to offset draw to line position. Most likely you should have at least 2 * reelCount dots per line (a start and end for each reel symbol in the payline) – Benjamin Danger Johnson Apr 2 '13 at 15:50
@BenjaminDangerJohnson You should convert that comment to an answer, I think that pretty much covers it. – jzx Dec 17 '13 at 18:28

For game shops dedicated to making slot machines, the manner in which a game pays out is determined by a staff of mathematicians dedicated to statistics. In my experience (a single shop of about 25 people) the mathematicians were roughly equal in number to the programmers and artists.

Of course, this is true for a company making games headed to real casinos, where payouts need to be known with extreme accuracy. They need that information both for selling their games to gambling businesses and for complying with local law. Your game probably does not need such meticulous work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.