duck-sort

Duck Sort (working title: “Ducks”)

Duck Sort is a small experimental game about sorting points on a plane. The points are thematically called “ducks.” The goal is to design a playful, tactile experience with realistic motion and multiplayer collaboration.

Live demo: Play the demo

Gameplay

Terminology:

Rules and flow:

  1. Wolves follow the current player’s cursor with a delayed, inertia-driven movement.
  2. Ducks bounce away from wolves and retain momentum according to the physics simulation.
  3. The number of simultaneously active wolves per room is limited by configuration (max 4).
  4. When all ducks of a given color cluster within a contiguous area that contains no other colors, that area is considered that color’s zone.
  5. The game is won when every color has its own zone.
  6. On win, show: “You sorted the ducks in XX.XX seconds”.
  7. A timer runs during gameplay. It starts when the first player initiates the game. Late joiners do not affect the timer.

Highlights

Technology stack (accepted)

Architecture overview

Monorepo layout

This repository is organized as a monorepo with the following packages:

Status

Planning and structure in progress. See the ADR for architecture decisions:

🪲 Known Issues & Limitations

🚀 Running Locally

# install dependencies
npm install

# run web client in ./web
npm run dev --workspace=web

# optionally, start Firebase emulator for testing in ./infrastructure/firebase
firebase emulators:start

Deployment GitHub Pages

Deploy the web app to GitHub Pages or any static hosting service:

cd web
npm run build:prod
rm -rf ../example/web/*
cp -r dist/* ../example/web