feat: add app skeleton with balance module, arena and tower

This commit is contained in:
2026-08-10 15:50:58 +02:00
parent 524f3fdaef
commit bcc6d333d4
5 changed files with 391 additions and 2 deletions

48
src/balance/values.rs Normal file
View File

@@ -0,0 +1,48 @@
//! The raw balancing numbers (ADR-0001).
//!
//! **Every value in this file is a placeholder.** None of them has been tuned, and four of
//! the numbers this file will eventually hold are not derivable from any source at all
//! (see issue #8) — they can only be found by playing. Treat a value here as "a number that
//! lets the skeleton walk", never as a design decision.
//!
//! This is the only file in the crate that holds balancing numbers. Gameplay code never
//! sees these constants; it reads `Res<Balance>` (ADR-0001, decision point 4).
use super::Stat;
/// PLACEHOLDER. Distance from the tower to the rim enemies spawn on, in world units.
/// Taken from `examples/perf_spike.rs`, where it was chosen so the whole arena fits into a
/// 1920x1080 window without frustum culling.
pub(super) const ARENA_RADIUS: Stat = 500.0;
/// PLACEHOLDER. Enemy movement speed in world units per second.
pub(super) const ENEMY_SPEED: Stat = 50.0;
/// PLACEHOLDER. Enemy health of the one archetype the skeleton knows. The real curve is
/// per-wave and exponential (spec, "Feststehende Zahlen"); this is the wave-1 base it will
/// later be derived from.
pub(super) const ENEMY_HEALTH: Stat = 10.0;
/// PLACEHOLDER. Damage of a single tower shot. ADR-0002 §3: `Damage`, mode `Direct`, base > 0.
pub(super) const TOWER_DAMAGE: Stat = 5.0;
/// PLACEHOLDER. Seconds between two tower shots.
///
/// This is an **interval, not a rate** — ADR-0002 §3 is explicit that the stat is called
/// `AttackInterval` and not `AttackSpeed`, so that "attack speed x1.25" becomes a divisor on
/// a duration instead of a second accumulator. The skeleton keeps the same unit.
pub(super) const TOWER_ATTACK_INTERVAL: Stat = 0.5;
/// PLACEHOLDER. Tower health. ADR-0002 §3: `MaxHealth`, mode `Direct`, base > 0.
pub(super) const TOWER_HEALTH: Stat = 100.0;
/// PLACEHOLDER. A projectile within this distance of an enemy counts as a hit, in world
/// units. Taken from `examples/perf_spike.rs`.
pub(super) const HIT_RADIUS: Stat = 10.0;
/// PLACEHOLDER. Meta currency granted per killed enemy.
///
/// The skeleton pays out a flat amount per kill. The spec ("Feststehende Zahlen") calls for
/// drop-based meta income — a chance per normal enemy, guaranteed per boss, amount scaling
/// with the wave. That shape needs bosses and waves, neither of which exists yet.
pub(super) const META_GAIN_PER_KILL: Stat = 1.0;