Hack Club ยท Mini YSWS Build Night

Ghost Ship

One club meeting. One haunted canvas. Everyone leaves with a game where you click the ghosts before the clock runs out. Beginners finish it; everyone else breaks it in new directions.

Duration90-120 min
StackJavaScript + p5.js
Format2D browser game
OutputPlayable build + candy

How it works

Build

Fork the p5.js starter and code a ghost or Halloween-themed game in the meeting.

Ship

Get the core loop working end to end: start screen, play, game over.

Get candy

Show it off at the showcase and get candy on the spot, no follow-up needed.

01

The pitch

Ghost Hunt is a click-the-ghost arcade game with the smallest possible core loop: something spawns, you click it, your score goes up, a timer ends the run. That loop takes about 30 lines of p5.js, which means everyone in the room can have it working in the first half hour, and the entire rest of the meeting is theirs to spend making it their own version of spooky. The premise is simple: ship a ghost or Halloween-themed game in p5.js, get candy. It's a mini YSWS, same shape as a real Hack Club ship (build something, ship it, show it off), compressed into one meeting instead of one summer, with the reward handed over in person instead of mailed.

02

The challenge

Build Ghost Hunt: a 2D browser game where ghosts appear on screen and the player clicks them to score points before time runs out. Start from the shared p5.js template, get the core loop running, then spend the rest of the meeting adding upgrades from the menu. Ship something playable, get candy: a small finished game beats a big unfinished one, and only shipped games count.
03

Rules

Must ship

  1. Fork the starter. Don't start from a blank sketch: the core loop (spawn โ†’ click โ†’ score) must already run.
  2. Playable end to end: a start screen, a play state, and a game-over screen, even if bare-bones.
  3. Pick 1-3 upgrades, not ten. A finished small game scores higher than an ambitious broken one.
  4. Credit your assets: self-made, or linked from a free-use source.

Fair play

  • Talk with your neighbor, don't paste their file.
  • AI is fine for unblocking a single line, not for writing your upgrade.
  • Sound and art from OpenGameArt, Kenney.nl, or Freesound: link the source in your README.
04

Schedule

Written for a 90-minute meeting.

0:00-0:10
Cold open

Play the finished build on the projector: ghosts, fog, a jump-scare. This is the hook, not the tutorial.

0:10-0:20
p5.js speed-run

setup(), draw(), mouseClicked(), random(), dist(): the five functions that run this entire game.

0:20-0:30
Fork the starter

Everyone opens the shared p5.js Web Editor sketch, hits Fork, confirms it runs, clicks one ghost.

0:30-1:15
Build time

Pick upgrades from the menu, code, playtest yourself. This is the bulk of the meeting. Protect it.

1:15-1:25
Submit

Paste your share link into the one-question form. Link stays live even if the code isn't "done."

1:25-1:30
Showcase

Three volunteers demo live. Popcorn shoutouts: Spookiest, Most Creative, Most Polished.

Running 120 minutes instead? Add the extra 30 to build time (0:30-1:45) and spend the freed-up minutes on a second showcase round, so more people get to demo.
05

Starter kit

Hand everyone a working, boring game. Boring is the point: the upgrade menu is where it gets fun.

  • 01A canvas with a drawn ghost shape spawning at a random position on a random interval.
  • 02Click detection: dist(mouseX, mouseY, ghost.x, ghost.y) < ghost.r removes it and adds to score.
  • 03A 30-second countdown timer driven off millis().
  • 04A start screen ("click to begin") and a game-over screen showing final score with a restart button.
  • 05One ghost type, no movement, no sound. Everything past this line is an upgrade, not a requirement.
๐Ÿ“Ž
Host it on the p5.js Web Editor.

Zero install, forkable in one click, and the share link doubles as the submission link. Keep a GitHub Pages / Glitch option on hand for anyone who wants real version control.

06

Upgrade menu

Pick from lower tiers first: they're what make a base game feel finished.

Tier 1: Quick wins

~15 min each
Moving ghostsmovement

Give each ghost a velocity and bounce it off the canvas edges instead of sitting still.

Sound effectsp5.sound

A spawn blip, a click pop, a game-over stinger: three loadSound() calls.

Start & game-over screensstate

A real title screen and a restart button, not just a console log when the timer hits zero.

Juicy scoringfeel

Flash the score text or the ghost itself on a successful hit: a one-line size/color pulse.

Tier 2: Core upgrades

~20-30 min each
Multiple enemy typesvariety

Fast ghost worth more, slow pumpkin worth less, bat that costs you a life if it escapes.

Health / livesstakes

Lose a life when a bat crosses the screen unclicked; game ends at zero, not just at 0:00.

Power-upsvariety

A rare pumpkin that freezes spawns for 3s, doubles points, or clears the whole screen on click.

Difficulty ramppacing

Shrink the spawn interval as millis() climbs, so the back half of the run is harder than the front.

Tier 3: Boss level

~30-45 min, for the experienced
Boss enemyadvanced

A big ghost with an on-screen health bar that takes multiple clicks and has its own attack pattern.

Fog, lightning & jumpscaresatmosphere

A semi-transparent particle layer for fog, a screen-flash for lightning, a full-screen sprite for a miss-streak jumpscare.

High score storagelocalStorage

Persist a top-5 list across runs so the leaderboard survives a refresh.

Combo multiplieradvanced

Consecutive hits within a short window stack a score multiplier; a miss resets it to 1x.

07

Presenting it as a mini YSWS

YSWS (You Ship, We Ship) is Hack Club's ship-something-get-something model. Here the trade is concrete: ship a ghost or Halloween-themed p5.js game, get candy. This meeting compresses the usual weeks-long YSWS loop into 90 minutes: the "ship" bar is a working link and a repo, not a finished product. The point is that everyone actually finishes and submits something real, not that it's polished.

What participants submit

  1. Playable link: the p5 Web Editor share link, or a GitHub Pages URL.
  2. Source: the editor link already has it, or attach a repo.
  3. One GIF or ~20-second clip of the game being played.
  4. Two sentences: which upgrades you added, and why.
  5. Your name / Slack handle, for the showcase and so we know who to hand candy to.

Before the meeting

  • Run the starter start-to-finish yourself, including a full game-over.
  • Publish it as a forkable p5 Web Editor sketch; link it in the invite.
  • Pre-load a small free-use sound pack (spawn, click, jumpscare sting) so no one stalls hunting for audio.
  • Set up a one-field submission form: just the game link, nothing else.
  • Bring the candy. That's the reward, full stop: hand it out on the spot to anyone who ships a working game, the same trade as trick-or-treating.
08

FAQ

Who can join?

Anyone at the club meeting. No prior JavaScript or p5.js experience needed: the tutorial builds the base game from a blank sketch.

Can I use AI?

For unblocking a single line, sure. Not for writing your upgrade. The point of the meeting is that you wrote the thing you're showing off.

What if I don't finish?

Ship what you've got. A working base game with zero upgrades still counts: the bar is a playable link, not a polished product.

Can I work with a partner?

Talk through problems together, but write your own file. Two people submitting the same code both need to have actually built it.

Is there a deadline?

The end of the meeting. Submissions and candy happen live at the showcase, not after the fact.

Do I need to install anything?

No. Everything runs in the p5.js Web Editor in a browser tab.