Skip to content

Latest commit

ย 

History

48 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ Pixel Olympics

Pixel Olympics is a browser drinking game built around a side-scrolling pixel-art race: pick your racers, cheer them to the finish line, and let the standings decide who sips.

It now includes 9 race scenes including Bangkok City, 18 selectable racers including Evil Bad Guy, Old Guy, and Monk, plus an in-game English / French language switcher.

Everything runs in the browser โ€” no backend, no accounts. Clone the repo and run pnpm dev, or play the live build on a phone or laptop. Add up to six players and start the race.

Play now: pixel-olympics.vercel.app

The game was built by Jonathan Rycx, who leads product direction, design, and implementation across the Rixouu party-game repos.

HTML5 Canvas Vanilla JS Vercel License: PolyForm NC

โœจ Key Features

๐ŸŽ๏ธ Pixel-art race

  • Side-on race, left โ†’ right, with photo finish and live standings HUD.
  • 18 PNG-sequence racers in public/sprites/ โ€” Forest Ranger, Pirate, Anubis, Assassin, Black Ninja, Egyptian Mummy, Egyptian Sentry, Jungle Master, Pumpkin Head, Robin Hood, Rogue, Skull Night, Thief, Vampire, White Ninja, Evil Bad Guy, Old Guy, Monk
  • Each player gets a custom colour (UI swatch) and character picker in the lobby.

๐ŸŒ Scenes & atmosphere

  • 9 scene packs: Sky Kingdom, Mountain Valley, Ancient Greek, Desert Grand Prix, Neo Tokyo, Space Colony, Tropical Island, Volcanic Racing, Bangkok City.
  • Each scene uses a bespoke background + track scene pack.
  • 3 race lengths: Sprint (quick), Classic (balanced), Marathon (epic).

๐ŸŒ Languages

  • Full UI support for English and French.
  • The selected language is saved locally in the browser.

โšก Power-ups (optional)

Toggle power-ups on or off before the race.

All pickups currently share the same question-box asset in public/power/power-up.png, while the gameplay effects stay distinct.

Power-up Effect
Boost Burst of speed
Star Speed + immunity
Banana Drop a trap behind you
Lightning Slow racers ahead
Shield Block one hit

๐Ÿป Drinking rules

Built for groups โ€” the results screen calculates sips automatically:

  • Winner deals sips equal to the number of players.
  • Everyone else drinks their finishing place (2nd = 2 sips, etc.).
  • Last place gets one extra sip (chug call-out).
  • Slowpoke clause: never led the race โ†’ +1 sip of shame.

Drink responsibly โ€” water counts too. 18+

Full rules and house variants: docs/game-rules.md

๐Ÿ”Š Audio & UX

  • Procedural Web Audio SFX (boosts, spins, finish fanfare).
  • Mute toggle in the corner; respects prefers-reduced-motion for the countdown.
  • English / French language switcher in the lobby; the selected language is saved in the browser.
  • Mobile-friendly layout with pixel fonts (Press Start 2P, Jersey 10).

๐Ÿ›  Tech Stack

  • Vite โ€” dev server and production bundle (split ES modules, hashed assets)
  • Canvas 2D rendering with a low-res pixel scale (image-rendering: pixelated)
  • Web Audio API for sound โ€” no external libraries
  • Self-hosted fonts โ€” Press Start 2P & Jersey 10 (WOFF2 in public/fonts/)
  • Vercel static hosting โ€” see docs/deployment.md

๐Ÿš€ Quick Start

Develop locally

corepack enable
pnpm install
pnpm dev

Open http://localhost:5173 (Vite prints the URL in the terminal).

Production build

pnpm build
pnpm preview   # optional โ€” serve dist/ at http://localhost:4173

Play online

No install needed โ€” pixel-olympics.vercel.app

Deploy on Vercel

  1. Import github.com/Rixouu/pixel-olympics in Vercel.
  2. Framework preset: Vite (auto-detected) โ€” install: pnpm install, build: pnpm build, output: dist.
  3. Deploy โ€” live at pixel-olympics.vercel.app.

Optional share URL: /play (rewrite to /). Details in docs/deployment.md.

๐Ÿ“ Project Structure

pixel-olympics/
โ”œโ”€โ”€ index.html              # App shell + meta (Vite entry)
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main.js             # Boot
โ”‚   โ”œโ”€โ”€ styles/
โ”‚   โ”‚   โ”œโ”€โ”€ fonts.css       # Self-hosted @font-face
โ”‚   โ”‚   โ””โ”€โ”€ game.css        # UI + overlay styles
โ”‚   โ””โ”€โ”€ game/
โ”‚       โ”œโ”€โ”€ assets.js       # Asset preload + lobby scene reveal
โ”‚       โ”œโ”€โ”€ backgrounds.js  # Scene image source helpers
โ”‚       โ”œโ”€โ”€ config.js       # Constants (colors, lengths, power-ups)
โ”‚       โ”œโ”€โ”€ color.js        # Color helpers
โ”‚       โ”œโ”€โ”€ characters.js   # Racer registry + sprite crop data
โ”‚       โ”œโ”€โ”€ engine.js       # Canvas, race sim, UI, lane alignment, main loop
โ”‚       โ”œโ”€โ”€ i18n.js         # EN/FR copy, scene labels, and metadata translations
โ”‚       โ”œโ”€โ”€ image-loader.js # Shared image request cache
โ”‚       โ”œโ”€โ”€ palette.js      # Sprite palette helpers
โ”‚       โ”œโ”€โ”€ scenes.js       # Scene registry + track layout tuning
โ”‚       โ””โ”€โ”€ sprite-sheets.js# Sprite frame loading + source rect helpers
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ background/         # Scene packs (background + track)
โ”‚   โ”œโ”€โ”€ fonts/              # WOFF2 font files
โ”‚   โ”œโ”€โ”€ power/              # Shared power-up artwork
โ”‚   โ”œโ”€โ”€ sprites/            # Character frame sequences
โ”‚   โ”œโ”€โ”€ favicon.svg
โ”‚   โ”œโ”€โ”€ og-image.png
โ”‚   โ”œโ”€โ”€ site.webmanifest
โ”‚   โ””โ”€โ”€ sw.js
โ”œโ”€โ”€ docs/
โ”œโ”€โ”€ vite.config.js
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ pnpm-lock.yaml
โ””โ”€โ”€ vercel.json

๐ŸŽฎ How to Play

  1. Pick English or French from the lobby language switcher if needed.
  2. Add players (up to 6) โ€” tap colour to recolour, tap the racer sprite to cycle character.
  3. Choose scene and race length.
  4. Toggle power-ups if you want chaos (or turn off for a pure sprint).
  5. Tap START THE RACE โ€” countdown, then watch the HUD.
  6. Results show placement, sip counts, and optional party prompts โ€” race again or edit settings.

Expand How to play & power-ups in the lobby for the in-game rule card.

๐ŸŒŸ Implementation Notes

  • Extending characters / scenes: see docs/extending.md.
  • Character assets: racers load from numbered PNG sequences (Running_000.png ... Running_011.png) with crop metadata in src/game/characters.js.
  • Localization: all lobby, HUD, toast, results, scene, and metadata copy lives in src/game/i18n.js.
  • Latest content additions: Bangkok City is registered in src/game/scenes.js, and Evil Bad Guy, Old Guy, and Monk are registered in src/game/characters.js.
  • Lane model: scenes define explicit lane geometry and top-slot formation so 1..N racers occupy the correct visible lanes from the top.
  • Track layout: track textures render proportionally, with scene-specific lane offsets and mobile height tuning to avoid squeezed tracks or oversized lower aprons.
  • Asset loading: the lobby keeps the main canvas hidden until the active scene art is ready, then reveals the real background and track.

๐Ÿ” Privacy & Security

  • No accounts or third-party analytics.
  • Core gameplay runs locally in the browser.
  • Self-hosted fonts โ€” no Google Fonts CDN at runtime.
  • No data persistence โ€” refresh the page to reset the lobby.
  • Security headers configured in vercel.json.

๐Ÿค Contributing

Contributions are welcome.

  1. Keep changes in src/game/ โ€” run pnpm dev to verify.
  2. Preserve the pixel-art aesthetic and mobile-first layout.
  3. Test on both desktop and a phone-sized viewport before opening a PR.
  4. Update docs when you change rules or extension APIs.

๐Ÿ“„ License

PolyForm Noncommercial 1.0.0 โ€” Copyright (c) 2026 Jonathan Rycx

Commercial use is not permitted under this license.

๐Ÿ‘ฅ Team

  • Jonathan โ€” Lead Developer โ€” Rixouu

๐Ÿ™ Acknowledgments

  • Press Start 2P & Jersey 10 (self-hosted WOFF2)
  • Classic party-game energy from the Rixouu drinking-game collection (split-the-g, split-the-g-mobile, and friends)

Built with โค๏ธ for friendly races and responsible sips.

About

Pixel Olympics is a drinking game playable in the browser, featuring pixel-art racers with customizable colors, selectable scenes and times of day, power-ups like boosts and banana traps, and support for up to 8 players.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages