# ⚔️ Warbell
**Defend the keep against nightly ork sieges.**
A knight holds a central castle through wave after wave of night assaults across a
five-biome island — real-time combat, an economy and upgrade tree, a town you build and
defend, inventory and consumables, villagers, wildlife, and a bloodline succession loop.
Built in Rust on [**Bevy 0.18**](https://bevyengine.org).
[**▶ Website**](https://miskibin.github.io/warbell/) · [**⬇ Download for Windows**](https://github.com/miskibin/warbell/releases/latest/download/Warbell-Setup.msi) · [**Changelog**](https://miskibin.github.io/warbell/changelog.html)
## Play
- **Windows:** download [**`Warbell-Setup.msi`**](https://github.com/miskibin/warbell/releases/latest/download/Warbell-Setup.msi) and run it. The installer is self-signed, so Windows SmartScreen shows "Unknown Publisher" — click **More info → Run anyway**.
- **itch.io:** [**miskibin.itch.io/warbell**](https://miskibin.itch.io/warbell) — Windows & Linux builds, pushed automatically on every release (works with the [itch.io app](https://itch.io/app) for auto-updates).
- **From source** (any platform): see [Build from source](#build-from-source) below.
| | | |
|---|---|---|
|  |  |  |
|  |  |  |
## Controls
- **WASD / arrows** move · **Space** jump · **Shift** sprint · **LMB** attack · **RMB** block
- **V** / the HUD **FP** button — toggle first-person view
- **E** contextual interact — walk up to the keep (upgrades), a merchant stall (shop), the
war bell (ring in the night), or a chest (open it) and a prompt names it
- **B** build mode — at your town, press **B**, then point and click to raise houses, farms,
woodcutters and mines
- **Tab / I** satchel · **Q** eat food · **Y / T** quick-slots · **Z / X / C** combat arts
- **F** forage / rescue · **R** recruit · **` (backquote)** free-roam fly-cam · **P / Esc** pause
- **F1** debug tuning panel · **F2** perf/state overlay · **1–5** swap biome patch
## Build from source
```bash
cargo run # build + open the game window
cargo test # run the crates/core parity tests (the validation spec)
cargo check # type-check without the (slow) link
```
On a fresh Linux box you need Bevy's system libraries once before the first build:
```bash
sudo apt-get update && sudo apt-get install -y \
libwayland-dev libxkbcommon-dev libudev-dev libasound2-dev
```
(macOS / Windows need none of this.) The first build is slow — `bevy` compiles at
`opt-level = 3` even in dev so the scene isn't single-digit FPS — but incremental rebuilds of
`src/` are fast.
## Architecture
Two crates:
- **`crates/core` (`tileworld_core`)** — pure, deterministic, zero-dependency game logic
(`f64` throughout). Pathfinding (A*), the wave director, upgrade / buff / resource /
inventory stores, ork & animal config, factions, RNG, the shop catalog. This is the
unit-tested validation spec — `cargo test` runs it. No Bevy, no I/O, no rendering.
- **`tileworld_bevy_forest` (root `src/`)** — the Bevy app: rendering, ECS systems, input, the
scene. It imports `tileworld_core` for all the numbers/logic that must stay correct, wrapping
core's stores as Resources (`PlayerRes`, `Bank`, `Inventory`, …).
Each `src/