Endless winter-city ride: pelican on a bicycle or reindeer on a unicycle, procedural canvas skyline, garlands to duck, snowmen to hop, fish to hoard.
41 lines
1.4 KiB
Markdown
41 lines
1.4 KiB
Markdown
# Advent of AI Slop — Day 5: Pelican on a Bike
|
|
|
|
> Task: *Create a game with a pelican on a bike riding your city. Or maybe a reindeer on a unicycle?*
|
|
|
|
Both. Obviously.
|
|
|
|
An endless side-scroll ride through a procedurally drawn winter city at dusk:
|
|
a **pelican on a bicycle** (one big flap-jump) or a **reindeer on a unicycle**
|
|
(double jump, Rudolph nose). Hop the snowmen, duck under the Christmas
|
|
garlands, don't flat-spot yourself in a pothole, and collect the fish — they
|
|
are for later.
|
|
|
|
## Play
|
|
|
|
**Live:** https://pages.obahan.xyz/lullu/advent-of-slop-05-pelican-on-a-bike/
|
|
|
|
- `Space` / `↑` / `W` / tap — jump (reindeer: press again mid-air to double-jump)
|
|
- `↓` / `S` — duck (required under garlands; hold in the air to slam down)
|
|
- `P` / `Esc` — pause · `R` — restart · `1`/`2` — pick rider
|
|
|
|
Best score per rider is kept in `localStorage`.
|
|
|
|
## Build
|
|
|
|
Vite + TypeScript, no dependencies beyond the template, no images — every
|
|
pixel (skyline, snowmen, pelican, antlers) is drawn with canvas paths.
|
|
|
|
```sh
|
|
pnpm install
|
|
pnpm build # tsc + vite build
|
|
```
|
|
|
|
`dist/` is published to the `pages` branch and served at the URL above.
|
|
|
|
## Layout
|
|
|
|
- `src/art.ts` — all canvas drawing (city parallax, obstacles, riders)
|
|
- `src/game.ts` — physics, spawning, collisions, state machine
|
|
- `src/main.ts` — DOM wiring, input, HUD, overlays
|
|
- `scripts/smoke5.py` — headless Playwright smoke test of the built site
|