- HTML 93.1%
- Shell 4.4%
- Dockerfile 2.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .harness | ||
| docker-compose.yml | ||
| Dockerfile | ||
| generate-config.sh | ||
| index.html | ||
| PLAN.md | ||
| README.md | ||
Collagen Depths
An 80s pixel arcade game built as a live demo for Harness CI/CD. Harvest marine collagen from jellyfish, avoid sharks, and complete waves to trigger a real Harness pipeline — which analyses your batch and returns a power-up for the next wave.
COLLAGEN
DEPTHS
A HARNESS CI/CD ADVENTURE
The concept
Most CI/CD demos show a green tick on a dashboard. This one puts the pipeline inside the game loop.
Complete a wave → Harness pipeline triggers → quality checks run → result returns as a gameplay upgrade. The pipeline isn't a side-show; it's the mechanic. If Harness can be the backbone of an arcade game, it can be the backbone of anything.
Gameplay
- Move your diver with arrow keys or WASD
- Touch jellyfish to harvest collagen peptides
- Fill the collagen bar to complete the wave
- Avoid sharks — one hit costs a life
- After each wave, a Harness pipeline runs and awards a power-up:
- NANO-SHIELD — absorbs the next shark hit
- HYDRO-BOOST — +65% movement speed
- PEPTIDE MAGNET — jellyfish drift toward you
Running locally
Standalone (no container)
Open index.html directly in a browser. Runs in mock pipeline mode with default difficulty.
Docker
docker build -t collagen-depths .
docker run -p 8080:80 collagen-depths
Then open http://localhost:8080.
Docker Compose
docker compose up --build
Configuration
All difficulty settings are injected as environment variables at container startup. The entrypoint script (generate-config.sh) writes them into /config.js before nginx starts.
| Variable | Default | Description |
|---|---|---|
PLAYER_LIVES |
3 |
Starting lives |
MOCK_DELAY |
2700 |
Pipeline simulation time (ms) |
WAVE1_TARGET |
10 |
Collagen to collect in wave 1 |
WAVE1_JELLY |
8 |
Jellyfish count, wave 1 |
WAVE1_SHARKS |
1 |
Shark count, wave 1 |
WAVE1_SHARK_SPEED |
1.00 |
Shark speed multiplier, wave 1 |
WAVE2_TARGET |
15 |
Collagen to collect in wave 2 |
WAVE2_JELLY |
11 |
Jellyfish count, wave 2 |
WAVE2_SHARKS |
2 |
Shark count, wave 2 |
WAVE2_SHARK_SPEED |
1.30 |
Shark speed multiplier, wave 2 |
WAVE3_TARGET |
22 |
Collagen to collect in wave 3 |
WAVE3_JELLY |
14 |
Jellyfish count, wave 3 |
WAVE3_SHARKS |
3 |
Shark count, wave 3 |
WAVE3_SHARK_SPEED |
1.65 |
Shark speed multiplier, wave 3 |
HARNESS_WEBHOOK_URL |
(empty) | Real Harness webhook — leave blank for mock mode |
HARNESS_API_KEY |
(empty) | Harness API key for webhook auth |
Example — crank up the difficulty:
docker run -p 8080:80 \
-e WAVE1_SHARKS=3 \
-e WAVE1_SHARK_SPEED=1.8 \
-e PLAYER_LIVES=1 \
-e WAVE3_NAME="NIGHTMARE ABYSS" \
collagen-depths
Harness pipeline
.harness/pipeline.yaml defines a two-stage pipeline:
- Build — builds and pushes the Docker image via
BuildAndPushDockerRegistry - Deploy — redeploys the container with difficulty settings as runtime
<+input>variables
When you trigger the pipeline in the Harness UI it presents a form with every difficulty parameter. Change them, run the pipeline, and the redeployed game reflects the new settings immediately.
Replace these three placeholders in the YAML before importing:
YOUR_K8S_CONNECTOR → your Kubernetes build infrastructure connector
YOUR_DOCKER_CONNECTOR → your Docker registry connector
YOUR_ORG/collagen-depths → your image repository
Wiring up a real pipeline
Set HARNESS_WEBHOOK_URL and HARNESS_API_KEY on the container. The game will POST to your webhook on wave completion and poll for the result. The pipeline should return JSON in the shape:
{ "power": "SHIELD" }
Where power is one of SHIELD, SPEED, or MAGNET.
File structure
├── index.html Game — reads window.GAME_CONFIG, falls back to defaults
├── generate-config.sh Writes /config.js from env vars at container startup
├── Dockerfile nginx:alpine + config hook
├── docker-compose.yml Local dev with explicit env vars
├── .harness/
│ └── pipeline.yaml Build + Deploy pipeline with difficulty as runtime inputs
├── PLAN.md Feature backlog
└── README.md This file
Why marine collagen?
Marine collagen — extracted from jellyfish, fish skin, and scales — is a genuine product category with a real quality-assurance pipeline: intake, peptide assay, biomarker check, grade certification. The Harness pipeline steps in this demo mirror that process. It's not just a cute theme; the metaphor actually holds.