# OpenTyrian

![OpenTyrian icon](pwa-512x512.png "OpenTyrian icon")

`open-tyrian` runs the classic vertical shooter OpenTyrian on an RCWeb display. Pair a phone with the [`open-tyrian-c`](../open-tyrian-c/appinfo) controller by scanning the QR code, or open `/open-tyrian-c/?r=<room>` with the same room ID.


## Features

- Classic vertical shooting with automatic weapons.
- Phone flight controls and dedicated menu buttons.
- Upgrades to weapons, shields and sidekicks between stages.

## About the game

OpenTyrian is an open-source port of Tyrian, the arcade-style shooter set in the year 20,031. You play as fighter pilot Trent Hawkins, flying missions against MicroSol while upgrading weapons, shields, generators, and sidekicks between stages.


## Pairing and controller ownership

- The display shows a QR code for the matching `open-tyrian-c` room.
- The first connected phone owns the single-player controls. A later phone waits until the owner leaves or stops announcing its presence for seven seconds.
- Refreshing the phone in the same browser can reclaim its active controls.
- The display releases all held keys when the controller disconnects, times out, or asks to release its inputs.

## Controls

- Touch the large flight surface to move in any direction. Distance from its centre controls speed, and diagonal input blends both axes independently.
- OpenTyrian fires the main weapon and sidekicks automatically during play.
- Use the controller's dedicated `Up` and `Down` buttons for single-step menu navigation, then tap `Select` to confirm.
- Tap `Menu` to open or close game menus.
- `Reset game` restarts the game on the display.

A keyboard connected to the display can also use the arrow keys, Space, Enter, Ctrl, Alt, and Escape.

## Screenshots

![Shooting through the opening Tyrian mission](screenshot01.png)

![Later enemy formation and terrain in the Tyrian mission](screenshot02.png)

![Enemy fire and terrain later in the mission](screenshot03.png)
