Okay, me and a couple of friends had the idea to make a website where you can earn some credits and later on wager these credits, all fun and stuff. Everything works but now we are stuck on a gamemode we thought of.
(BustABit Solo) How the gamemode works is a player chooses a wager amount, then starts the game. When the player has clicked start on the backend there will be a 'crash number' generated on which the game will end. Then on the browser a counter will count up from 1.00x to infinite. Let's say the server decided to crash the game on 2.00x. If a player clicked the cashout button on let's say 1.50x, then he'll get 1.50x (150%) his wager.
Now where the problem lays, the server needs to keep track on what number the player cashs' out, therefor we need some sort of interval (or do we?) to keep track on what number the crash is when the player clicks the cashout button. But there could be over two hundred people at the same time playing which all would need their own interval (?), wouldn't it be a giant load on the server? How do we go about this correctly?