A space shooter game built with p5.js, Tone.js, and Arduino integration!
You control a spaceship using a joystick connected to an Arduino. Shoot falling asteroids, score points, and survive as long as you can!
- Arduino joystick control for player movement
- Button-triggered shooting (via joystick or external button)
- LED feedback on firing
- Background music and sound effects using Tone.js
- Animated asteroid enemies loaded from a sprite sheet
- Scoring and lives system
- Game start and restart functionality
- p5.js โ Graphics, input, and game loop
- Tone.js โ Background music and sound effects
- Arduino โ Hardware joystick + button + LED
- Serial communication โ Data exchange between p5.js and Arduino
- Connect a joystick module to your Arduino:
X-axis โ A0Y-axis โ A1Joystick button โ D2External button โ D3(optional)LED โ D13(optional feedback)
- Upload a simple Arduino sketch that sends data in the format: