tilt your phone, fly a paper plane through a desert. don't crash into stuff. that's it.
your phone becomes the controller — tilt it to steer the plane. gyroscope data streams to your desktop over websockets. no apps, just browsers talking to browsers.
- open the game on desktop
- scan the QR code with your phone
- tilt to fly
- crash. repeat.
step1: ⭐Star the repo — it makes the game smoother (seriously)
step2:
npm install
npm run devstep3: gyroscope API only works on HTTPS. use ngrok to tunnel your local server:
macOS
brew install ngrokLinux
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list
sudo apt update && sudo apt install ngrokstep4: then run:
ngrok http 5173use the ngrok HTTPS url on your phone. localhost works fine for desktop.
press A on your phone to calibrate and start.
| what | why |
|---|---|
| three.js | 3D rendering |
| rapier | physics & collisions |
| partykit | websocket sync between devices |
| device orientation API | phone gyroscope |
| blender | made the plane model |
full architecture breakdown, data flows, and file-by-file documentation:
original inspiration from mustache-dev/fishing-app
