In scope (gzengine-core.wasm):
- Advance simulation by
dtor fixed tic (35 Hz classic) - Mobj thinkers, sector specials (GZDoom semantics)
- Line activation, switches, doors, platforms, crushers
- Player cmd → movement/weapons (when enabled)
- Monster AI (incremental corpus)
- Export GZTICK snapshots and patch buffers for the renderer
Out of scope:
- WebGL/WebGPU draw calls
- Texture upload, BSP draw order generation (renderer)
- HUD, menu, music playback (host / doom-wad-lab)
- Full ZScript mod compatibility on day one (fixture-driven later)
C-style exports for minimal JS boundary crossing:
gze_create();
gze_destroy();
gze_load_gzstate(uint8_t* gzstate, int len); // initial world from doom-wad-core / GZDoom
gze_set_player_cmd(int forward, int side, int buttons, int angle);
gze_tick(int tics); // advance N tics
gze_export_gztick(uint8_t** out, int* len); // full snapshot for parity tests
gze_drain_patches(uint8_t** out, int* len); // renderer-facing deltas since last drain
gze_get_last_error();Renderer consumes gze_drain_patches — sector floor/ceil deltas, thing spawn/move/remove, light changes — without importing the full mobj graph.
GZDoom fork:
-dumpgzstate map.gzstate # t=0 baseline (shared with renderer)
-dumpgztick N out.gztick # after N tics + fixed input log
WASM engine:
load gzstate → replay input log → tick N → export gztick
Node:
diffGztick(gzdoom, wasm) === identical
Source of truth: gzdoom-project (your fork). Strip order:
p_setup/ level load — reuse GZSTATE import instead of re-parsing WAD in WASM initiallyp_tick,P_Ticker, thinkersp_map,P_UseLines, specialsp_mobj, states,P_SpawnMissile, …d_player,p_psprp_enemy(corpus monsters)p_acs(ACS VM)- ZScript VM (isolated crate, optional compile feature)
Build with Emscripten (-sMODULARIZE, -sALLOW_MEMORY_GROWTH). No GL linkage in engine crate.
| Tier | Target |
|---|---|
| Unit | GZTICK codec, patch merge, fixed-point helpers |
| Tick fixtures | 10 → 100 → 1000 deterministic scenarios |
| Demo slice | demo1.lmp first 300 tics (input replay) |
| Engine+render | patches applied → renderer frame diff (doom-wad-lab) |
100% line coverage of GZDoom is not a project goal.
100% fixture corpus pass rate is.
| Doc | Scope |
|---|---|
| TESTING.md | This repo — GZTICK codec, planned tick corpus |
| ../../docs/TESTING.md | Workspace-wide guide |
| ../gzdoom-project/docs/PARITY-TOOLS.md | -dumpgztick (planned) |