Skip to content

clovisphere/blip

Repository files navigation

Tests Release Docker Bun Vanilla JS

Captain Blip

Blip β€” a pirate-themed deduction game for ages 9–12. Six hidden sea creatures lurk on a 4Γ—7 grid. Fire cannonballs to find them all before you run out of shots.

How to play

  1. Serve locally (see below) and open http://localhost:3000.
  2. Pick a level: n00b, ninja, or hacker.
  3. Tap any cell to fire a cannonball β€” a creature pops up on a hit, a βœ• marks a miss.
  4. Find all 6 beasts to win. Run out of shots and it's game over.

Levels

Level Shots Beasts hide… Hints?
n00b 22 In straight lines No
ninja 16 Anywhere (scattered) Yes β€” Captain Blip whispers a row or column after each miss
hacker 12 Anywhere (scattered) No

No timer β€” it's all about the shots.

Running locally

With Bun:

bun run dev

With Docker:

docker build -t blip .
docker run -p 3000:3000 blip

Then open http://localhost:3000.

Note: The game uses ES modules (type="module"), so opening index.html directly via file:// won't work. A local server is required.

Running tests

bun test

Project structure

blip/
β”œβ”€β”€ index.html
β”œβ”€β”€ server.js             # Bun static file server
β”œβ”€β”€ tests/
β”‚   └── game.test.js      # unit tests (bun:test)
└── public/
    β”œβ”€β”€ css/style.css
    └── js/
        β”œβ”€β”€ game.js       # pure logic β€” board building, hints, constants
        β”œβ”€β”€ main.js       # UI β€” 5-screen state machine, DOM, events
        β”œβ”€β”€ matrix.js     # Matrix rain canvas (unused, kept for later)
        └── sound.js      # Web Audio sound effects

Tech

  • Vanilla JS (ES modules, no build step, no dependencies)
  • Web Audio API for procedural sound effects
  • Pure CSS/HTML Captain Blip mascot (pirate face, 3 moods)
  • Fonts: Bangers + Patrick Hand via Google Fonts

TODO

  • Unit tests (game logic β€” board placement, hints, adjacency)
  • Mobile touch support
  • Multiple creatures with per-type colours
  • Pirate/comic-book redesign with Captain Blip mascot
  • End-to-end tests (Playwright)
  • Dockerfile for containerised deployment
  • Makefile with dev, test, build, and docker targets
  • CI workflow (GitHub Actions β€” build and push image to Docker Hub)
  • Custom favicon (Captain Blip)
  • Early-loss rule: end the game when shots remaining < beasts remaining (unwinnable state)
  • Per-level theming: distinct background/palette for ninja and hacker to reflect increasing danger
  • Center the game layout on all screen sizes (mobile and large desktop)

About

Fire cannonballs. Find the beasts. Don't run out of shots. πŸ΄β€β˜ οΈ

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors