Week 12-Finalised Concept

 Concept

It’s Crossy Road gone fairy-tale: guide an on-screen duck across busy roads and small streams in p5.js. Reach the final, wide river and a real-world duck glides straight across a tabletop “river,” lights pulsing as a victory lap. Screen and reality shake hands for one perfect moment

 What Already Works (p5.js Only)

 

Module Done Notes
full screen canvas, road- rivers, predators, food 60 fps, collision OK( still needs work)
Duck sprite + full-axis movement Arrow keys for now
Item counter + score/time keeping only counted through codes so far
Final-river trigger zone logic works

 Real-World Interaction (Planned)

  • Prop: duck on a 30 cm linear rail (continuous-rotation servo + belt).

  • Motion: one smooth back to front glide only.

  • FX: underside RGB LED strip (water glow) + small piezo “quack” sample.

  • Cue: begins the instant p5 fires DUCK_GO and stops at rail limit.

 Arduino Paragraph (hardware plan)

Thinking of using the Arduino as the go-between that lets the computer game talk to the real duck. A little joystick and one “hop” button plug into it; the board simply reads how far you push the stick and whether the button is pressed, then sends those numbers to p5.js through the USB cable every split-second. Most of the time the Arduino just listens. When the game finally says “DUCK_GO”, the board springs into action: it turns on a motor that slides the rubber duck straight across a mini track, switches on soft blue-green lights under the “water,” and makes a quick quack with a tiny speaker. When p5.js later sends “DUCK_STOP,” the motor and lights shut off and the duck stays put. Because motors and lights can gulp a lot of power all at once, they’ll run from their own plug-in adapter so the Arduino itself never loses juice mid-move.

 Next-Week Targets

  1. Prototype rail — mount servo + belt, confirm straight glide

  2. Minimal Arduino sketch —  joystick; act on DUCK_GO with LED blink

  3. Serial bridge live — replace console.log() with serial.write() in p5

  4. End-to-end smoke test — finish level, duck moves

 Risks & Mitigation

  • Servo overshoot → limit switches or timed cutoff.

  • Serial lag → short packets, high baud.

  • Scope creep → no extra rivers, no particle splashes until core loop is solid.

Leave a Reply