This is an RCade port of project-tank p5js game.
It is now LIVE on RCade at The Recurse Center
demo.mp4
Install dependencies:
npm installStart the development server:
npm run devThis launches Vite on port 5173 and connects to the RCade cabinet emulator.
| Key | Action |
|----------|------------------|
| Player 1 | |
| W | UP |
| S | DOWN |
| A | LEFT |
| D | RIGHT |
| F | A Button |
| G | B Button |
| Player 2 | |
| I | UP |
| K | DOWN |
| J | LEFT |
| L | RIGHT |
| ; | A Button |
| ' | B Button |
| System | |
| 2 | Two Player Start |
Spinner Controls (@rcade/input-spinners)
| Key | Action |
|-----|------------------|
| C | P1 Spinner Left |
| V | P1 Spinner Right |
| . | P2 Spinner Left |
| / | P2 Spinner Right |
npm run buildOutput goes to dist/ and is ready for deployment.
├── src/
│ ├── sketch.js # p5.js sketch (game code)
│ └── style.css # Styles
├── index.html # HTML entry
└── package.json
This template uses @rcade/plugin-input-classic and @rcade/plugin-input-spinners for arcade input:
import { PLAYER_1, PLAYER_2 SYSTEM } from '@rcade/plugin-input-classic'
import { PLAYER_1 as SPINNER_1, PLAYER_2 as SPINNER_2 } from "@rcade/plugin-input-spinners"
// D-pad
if (PLAYER_1.DPAD.up) { /* ... */ }
if (PLAYER_1.DPAD.down) { /* ... */ }
if (PLAYER_1.DPAD.left) { /* ... */ }
if (PLAYER_1.DPAD.right) { /* ... */ }
// Buttons
if (PLAYER_1.A) { /* ... */ }
if (PLAYER_1.B) { /* ... */ }
// Spinner Angle
tank.turretAngle = SPINNER_1.SPINNER.angle
// Same for PLAYER_2
// System
if (SYSTEM.TWO_PLAYER) { /* Start game */ }This game is built for RCade, a custom arcade cabinet at The Recurse Center. Learn more about the project at github.com/fcjr/RCade.
Made with <3 at The Recurse Center