PixiJSTypeScriptGSAPWeb AudioVitest
Controls
- Space or Enter bets during the countdown and cashes out during the flight; the same big key does both
- Up and Down or the minus and plus keys change the stake; A toggles auto-bet; M toggles sound; H opens how the odds work
- Set an auto cash-out multiplier before the round and the server cashes you out at that exact moment
- Add ?seed=7 to the address for a repeatable run, ?latency=150&jitter=60&drop=0.05 to stress the network, ?debug for the network panel
Needs WebGL. Without it the poster is shown. Respects the reduced-motion setting: no shake, parallax, particles or count-ups, and the multiplier steps four times a second. Sound is off until you turn it on. Credits and settings are saved in this browser. Play credits only: no real money, no prizes, 18+.
Questions
Is this real-money gambling?
No. Afterburn uses play credits only: no real money and no prizes. It is for ages 18+.
How do I play a crash game?
Place a bet during the countdown, then cash out while the multiplier climbs; if the round crashes first, the stake is lost. Space or Enter does both.
Can I cash out automatically?
Yes. Set an auto cash-out multiplier before the round and the server cashes you out at that exact moment.
What is the RTP?
97% for every strategy, proven by tests. H opens how the odds work.
How it’s built
How it's built
Afterburn keeps the round engine and the client apart on purpose. The engine in core/ owns the clock, draws the crash point before betting opens, settles every payout and never looks at the screen. The client in net/ and state/ only receives sequenced events over a simulated network and shows them.
- The multiplier is never sent per frame. The client derives it from the launch time and a synced server clock, so a 30 Hz phone and a 144 Hz monitor show the same value at the same moment.
- Events carry a
seq. The client drops duplicates, waits 150 ms for a reordered event, asks for a snapshot on a real gap, and reconnects with backoff after a cut link. - The server clock is estimated NTP-style from the ping with the smallest round trip among the last eight, so a latency spike does not move it.
- Cash-out is a race the server arbitrates: a request received before the crash pays the lower of the claimed and the server's own multiplier, a later one is rejected as too late. Auto cash-out runs inside the engine with no network in the path.
- The crash point is
0.97 / (1 - u) floored to 0.01 and capped at 1,000x, so every cash-out target returns exactly 97%. Vitest proves it in closed form and by simulation. - Money is integer cents, multipliers are integer hundredths, and the engine is driven by timestamps, so a throttled background tab catches up to the same result.
- A demo choice: when the tab is hidden, a live bet with no auto cash-out target is cashed out at that instant, because a hidden tab throttles timers and the player cannot react.
- Other players are simulated and labelled as such. Play credits only, no real money.
Try ?seed=7 for a repeatable run, ?latency=150&jitter=60&drop=0.05 to stress the network and ?debug for the network panel.