logoalt Hacker News

noduermetoday at 5:43 AM3 repliesview on HN

I wrote a 3d rubiks cube slot machine for my old online casino. It scrambled the cube randomly 4 times and gave the player 60 seconds to solve it by twisting up to 3 times. Lots of weird quaternion math to handle the spinning and shift key twisting at the same time. All with simple geometry in Away3D / AS3.

The real hard part of designing that game was creating the payout structure. The game paid an equal amount for each "line" of 3 colors in a row on any face after the player made their third move. There was a progressive take and jackpot for a perfect solution. And I specifically wanted to target a zero house edge for the game, to reward the best problem solvers. So the question was, given 4 random twists off a perfect cube, what are the individual chances of getting 64, 63, 62...1 lines of sequential color given the best 3 spins from the initial random state, and then hiw to allocate the payout structure accordingly.

Probably a billion monte carlo runs and I had a pay table. It was lots of fun. I wish more gambling games rewarded skill that way.


Replies

divbzerotoday at 6:19 AM

Casino games are rarely zero house edge. Is there a way you signaled this feature to problem solvers? Did the game prove to be successful?

show 1 reply
cruciotoday at 9:36 AM

any time there is skill in an online casino game where money is involved, there is cheating too

show 2 replies
huflungdungtoday at 9:33 AM

[dead]