# RCWeb Flappy Birds 2 Control

**RCWeb Flappy Birds 2 Control** is the companion controller app for the shared display at `/flappy2/`. It is designed for phones and tablets, and gives each player a single large flap button plus a live view of their assigned bird, score, and win count.

![icon](pwa-512x512.png "Flappy Birds 2 Control Icon")

## Screenshot
![screenshot](screenshot.png "Flappy Birds 2 Control Screenshot")

## What It Does

- Opens at `/flappy2-c/` and connects to the RCWeb room provided in the QR code link.
- Starts in a simple **JOIN** state so new players can enter the flock with one tap.
- Shows the same bird PNG artwork used on the main display, matched to the assigned bird name.
- Sends flap input to the shared screen and reflects score, win count, and alive or crashed state.
- Uses haptics and a short synthetic lose sound for quick feedback on supported devices.

## RCWeb Integration

The controller uses `rc.sendFunctionCall` to talk to the main `/flappy2/` display app.

- Joining sends `flappy.joinAndFlap` to the shared screen.
- Flapping sends `flappy.flap` for the current controller client.
- The display sends callbacks to `onAssignedBird`, `onScoreUpdate`, `onStateUpdate`, and `onRemovedBird` so the controller stays synchronized with the real game state.

The controller does not run the game simulation itself. It is intentionally lightweight and depends on the shared screen for bird assignment, physics, scoring, and round flow.
