feat(packages): ludic.character - a third-person walking body: walk and run with their acceleration, a jump and gravity, a step within CHAR_STEP taken and a slope above it measured over a fixed probe, wading that shelves into a swim, the dive and the breath, sitting, one safe put-down spot, holds by reason, being carried, and the orbit camera with first-person eyes; ground, body and stick through ports; landed, jumped, footfall, too steep, the water's facts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 08:26:31 +03:00
parent 9e713bc39c
commit b24c523fa4
20 changed files with 1282 additions and 0 deletions

View file

@ -0,0 +1,24 @@
# system.ludic - the body as a system: reset, a tick from the input port, and nothing saved (where a
# body stands is the game's to write, with the rest of the player)
export function char_reset() -> void {
char_teleport(0.0, 0.0, 0.0)
chr_time = 0.0
chr_phase = 0.0
chr_breath = CHAR_BREATH_MAX
chr_can_run = true
chr_sit_t = 0.0
chr_steep = 0.0
chr_land = 0.0
chr_edge_said = 0.0
chr_fps = false
q_clear(char_facts())
}
function chr_sys_tick(t: Tick) -> void { char_tick(t.dt) }
export function char_system() -> System {
let s = system_new("character", PH_INPUT)
s.reset = fn char_reset
s.tick = fn chr_sys_tick
return s
}