Skip to content

emollick/flipside

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪙 FLIPSIDE

A Balatro-style roguelike about coin flips. Heads pay Chips, tails pay Mult — build a pouch of enchanted coins, level up combos, chase impossible patterns, and outscore The House across eight antes.

FLIPSIDE


The idea

Every toss, you throw up to five coins. Each coin that lands Heads pays Chips, each Tails pays Mult, and your toss scores Chips × Mult. The pattern the coins land in sets the base — all heads is MIDAS, all tails NOCTURNE, perfect alternation PENDULUM, a palindrome MIRROR, and so on down to DUSK.

The signature decision is the reflip: a shared pool each round, spent one coin at a time. Land four heads and a tail, and you're one flip from MIDAS — do you burn a reflip chasing it, set the heads coin aside to lead your next toss, or bank everything and move on? That tension is the whole game.

Beat the target in four tosses, shop for Charms (passive engines), enchanted coins, single-use Fortunes, and combo-leveling Omens, then do it again against a tougher number — and every third bet, a Boss with a crooked rule.

Features

  • ~51 charms, 14 fortunes, 8 coin materials, 13 bosses, 5 relics, 11 skip-tags
  • 6 starting pouches and 4 stake tiers, unlocked through a persistent profile
  • 5 challenge runs — fixed-setup puzzles (Glass Cannon, The Purist, Pattern Recognition…)
  • Daily Run — one shared seed per day; everyone plays the same coins
  • 3D CSS coin flips, a juicy chips×mult scoring tally, and a generative noir-lounge soundtrack
  • Autosave/resume, endless mode, shareable seeds — all in one self-contained HTML file, no build step, no dependencies

How it was built

The whole game is index.html — a pure, seeded game engine (no DOM) plus a UI layer. That split is deliberate: the engine is extracted and run headlessly by the scripts in sim/, so balance is simulation-driven rather than guessed.

  • sim/sim.mjs — Monte-Carlo win-rate / death-curve / combo-usage harness
  • sim/archetypes.mjs — committed build policies (Sun/Moon/Glass/Pattern) to verify each archetype assembles and feels distinct
  • sim/fuzz.mjs — random-but-legal action fuzzer asserting state invariants (money ≥ 0, coin conservation, no NaN, guaranteed termination…)
  • sim/whatif.mjs — paired-seed A/B tests for proposed balance changes
  • sim/make_og.py — regenerates the social/share images
node sim/sim.mjs 3000          # balance pass (hedging-bot win rate ~8%)
node sim/archetypes.mjs        # per-build health
node sim/fuzz.mjs 400          # robustness — invariants across thousands of actions

The game was developed and balanced across five iteration rounds with agent-driven playtesting; details live in the commit history and sim/ output.

Run locally

It's a static file — open index.html directly, or serve the folder:

python -m http.server 8431
# → http://localhost:8431

URL params for testing: ?seed=NAME (fixed run), ?autostart=1, ?fast=1 (skip animations). sim/make_og.py needs the Rye font — curl -L -o sim/Rye-Regular.ttf https://raw.githubusercontent.com/google/fonts/main/ofl/rye/Rye-Regular.ttf.

Credits

Fonts: Rye, Bungee, Spectral (Google Fonts, OFL). Everything else — engine, art, audio synthesis — is original to this project.

License

MIT © Ethan Mollick

About

🪙 A Balatro-style roguelike about coin flips — heads pay Chips, tails pay Mult. Single-file HTML5, simulation-balanced. Play: play-flipside.netlify.app

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors