# Changelog

## 0.2.0 (6 November 2026)

Ten developers built games with 0.1.0, each with a different framework, and reported what got in their way. This release fixes what they found.

### Players coming and going

- `ControllerHost` and `RelayRoom` emit the same events: `join` (with `resumed: true` when a phone comes back to its seat), `leave` (the seat is kept for five minutes), `removed` (`reason: 'removed'` or `'expired'`) and, on `ControllerHost`, `invitation` when the join link changes. `connected` and `disconnected` still work.
- `join` fires once the phone is fully seated, so `setView`, `playFeedback` and `rumble` work inside the listener (no more `setImmediate`).
- A game engine that connects late no longer sees phones that left as players, and removing a phone tells engines it left.
- A listener that throws no longer disconnects a phone; its error goes to `host.on('error')` or the console.
- Godot, C, Unity and Unreal have the same events, a roster, `remove` and invitation updates. The C hub reuses old device slots instead of running out after 32 players.

### Feedback

- `feedback-result` events: what the phone did with a cue or rumble sent with an `id` (`played`, `fallback`, `unavailable`, `rate_limited`).
- `ControllerHost` feedback calls return `true` when the request reached a connected phone. Relay rooms accept an `id` too.

### Game readouts

- Games can write up to three lines on the wheel, flight stick and gamepad screens (`instruments.lcd`) and drive the flight instrument with the aircraft's real attitude (`instruments.attitude`).
- `host.instruments(playerId, patch)` and `room.instruments(playerId, patch)` update them cheaply, at most 20 times a second.

### Testing

- `@controller-plus/sdk/testing`: test a game with simulated phones in headless Chrome, with real touches, isolated phones, rotation, reloads, feedback observation and your game's own page. See `docs/testing.md`.

### Types

- TypeScript declarations for every package entry, checked in strict mode by `npm test`.

### Phone controller fixes

- Paddle keys show their names, colours and badges.
- Reloading the phone's page takes the same seat again.
- The settings tilt switch works for the wheel and the flight stick.
- A held key lets go when the game shows a new controller.
- Drawing undo and badges behave the same in the browser, iOS and Android.

## 0.1.0

First release.
