Download
138 lines 3.3 KiBMarkdownModified 2026-05-26 raw

Pico8 Test

A test of pico8

About RCade

This game is built for RCade, a custom arcade cabinet at The Recurse Center. Learn more about the project at github.com/fcjr/RCade.

Getting Started

Install dependencies:

npm install

Start the development server:

npm run dev

This launches Vite on port 5173 and connects to the RCade cabinet emulator.

Building

npm run build

Output goes to dist/ and is ready for deployment.

Project Structure

├── public/           # Static assets (copied as-is)
├── src/
│   ├── main.js       # Game entry point
│   └── style.css     # Styles
├── index.html        # HTML entry
├── vite.config.js    # Vite configuration
└── package.json

Adding Assets

Imported assets (recommended) - Place in src/ and import them. Vite bundles these with hashed filenames for cache busting:

import spriteUrl from './sprite.png';
import jumpSound from './jump.mp3';

const img = new Image();
img.src = spriteUrl;

const sound = new Audio(jumpSound);
sound.play();

Static assets - Place in public/ for files copied as-is. Access via root path (/sprite.png).

Arcade Controls

This template uses @rcade/plugin-input-classic for arcade input:

import { PLAYER_1, SYSTEM } from '@rcade/plugin-input-classic'

// 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) { /* ... */ }

// System
if (SYSTEM.ONE_PLAYER) { /* Start game */ }

Development Keyboard Controls

When developing locally, keyboard inputs are mapped to arcade controls:

Classic Controls (@rcade/plugin-input-classic)

Player Action Key
Player 1 UP W
Player 1 DOWN S
Player 1 LEFT A
Player 1 RIGHT D
Player 1 A Button F
Player 1 B Button G
Player 2 UP I
Player 2 DOWN K
Player 2 LEFT J
Player 2 RIGHT L
Player 2 A Button ;
Player 2 B Button '
System One Player Start 1
System Two Player Start 2

Spinner Controls (@rcade/plugin-input-spinners)

Player Action Key
Player 1 Spinner Left C
Player 1 Spinner Right V
Player 2 Spinner Left .
Player 2 Spinner Right /

Spinners repeat at ~60Hz while held.

To add spinner support: npm install @rcade/plugin-input-spinners

Deployment

First, create a new repository on GitHub:

  1. Go to github.com/new
  2. Create a new repository (can be public or private)
  3. Don't initialize it with a README, .gitignore, or license

Then connect your local project and push:

git remote add origin git@github.com:YOUR_USERNAME/YOUR_REPO.git
git push -u origin main

The included GitHub Actions workflow will automatically deploy to RCade.


Made with <3 at The Recurse Center

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
# Pico8 Test

A test of pico8

## About RCade

This game is built for [RCade](https://rcade.recurse.com), a custom arcade cabinet at The Recurse Center. Learn more about the project at [github.com/fcjr/RCade](https://github.com/fcjr/RCade).

## Getting Started

Install dependencies:

```bash
npm install
```

Start the development server:

```bash
npm run dev
```

This launches Vite on port 5173 and connects to the RCade cabinet emulator.

## Building

```bash
npm run build
```

Output goes to `dist/` and is ready for deployment.

## Project Structure

```
├── public/           # Static assets (copied as-is)
├── src/
│   ├── main.js       # Game entry point
│   └── style.css     # Styles
├── index.html        # HTML entry
├── vite.config.js    # Vite configuration
└── package.json
```

## Adding Assets

**Imported assets** (recommended) - Place in `src/` and import them. Vite bundles these with hashed filenames for cache busting:

```js
import spriteUrl from './sprite.png';
import jumpSound from './jump.mp3';

const img = new Image();
img.src = spriteUrl;

const sound = new Audio(jumpSound);
sound.play();
```

**Static assets** - Place in `public/` for files copied as-is. Access via root path (`/sprite.png`).

## Arcade Controls

This template uses `@rcade/plugin-input-classic` for arcade input:

```js
import { PLAYER_1, SYSTEM } from '@rcade/plugin-input-classic'

// 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) { /* ... */ }

// System
if (SYSTEM.ONE_PLAYER) { /* Start game */ }
```

### Development Keyboard Controls

When developing locally, keyboard inputs are mapped to arcade controls:

**Classic Controls (`@rcade/plugin-input-classic`)**

| Player   | Action           | Key |
|----------|------------------|-----|
| Player 1 | UP               | W   |
| Player 1 | DOWN             | S   |
| Player 1 | LEFT             | A   |
| Player 1 | RIGHT            | D   |
| Player 1 | A Button         | F   |
| Player 1 | B Button         | G   |
| Player 2 | UP               | I   |
| Player 2 | DOWN             | K   |
| Player 2 | LEFT             | J   |
| Player 2 | RIGHT            | L   |
| Player 2 | A Button         | ;   |
| Player 2 | B Button         | '   |
| System   | One Player Start | 1   |
| System   | Two Player Start | 2   |

**Spinner Controls (`@rcade/plugin-input-spinners`)**

| Player   | Action        | Key |
|----------|---------------|-----|
| Player 1 | Spinner Left  | C   |
| Player 1 | Spinner Right | V   |
| Player 2 | Spinner Left  | .   |
| Player 2 | Spinner Right | /   |

Spinners repeat at ~60Hz while held.

To add spinner support: `npm install @rcade/plugin-input-spinners`

## Deployment

First, create a new repository on GitHub:

1. Go to [github.com/new](https://github.com/new)
2. Create a new repository (can be public or private)
3. **Don't** initialize it with a README, .gitignore, or license

Then connect your local project and push:

```bash
git remote add origin git@github.com:YOUR_USERNAME/YOUR_REPO.git
git push -u origin main
```

The included GitHub Actions workflow will automatically deploy to RCade.

---

Made with <3 at [The Recurse Center](https://recurse.com)