KAZIK/docs/HELL_EXPEDITION.md
Игорь Федосеев ce5121debd feat: add native hell expedition
Add a painting entrance, Freedoom combat and Doom-style HUD.

Persist the one-time clear reward in signed saves without changing file sizes. Include native regression checks and synchronized game/launcher builds.
2026-11-01 22:29:09 +03:00

4.7 KiB
Raw Blame History

Hell Expedition

Play

Launch poker.exe or dist/Assembler Casino.exe. On the casino's first floor, approach the large gilt-framed hell painting on the wall opposite the bar (map position 6, 30.9), face it and press E. The upstairs Hell Tower remains a separate game. The old freestanding portal and its collision frame are gone.

Input Action
WASD Move / strafe
Mouse Turn
Left mouse / Space Fire; hold for repeated fire
1 / 2 Pistol / shotgun, after collecting it
E Open nearby gates/secrets; activate final exit
Enter after death Restart expedition
Esc Return to casino

Collect the shotgun near the starting point. Cross the barracks and lava court, find the blue key in the northern crypt, open the eastern gate and defeat the warden in the southern sanctum. Use the exit portal to finish. Two concealed side rooms contain extra supplies. Lava causes damage; armour absorbs half of incoming damage while it lasts. Health and ammunition are expedition-local.

Death and retry do not deduct casino money. The first successful clear credits $6,660, subject to the existing bank cap. Later clears show statistics without paying again. Leaving or retrying starts a fresh expedition; mid-level progress is not saved. Completion belongs to the current casino profile.

Implementation

  • MASM32 runtime: src_graphics/hell_fps*.inc; integrated with the existing raycaster, collision, window/input and signed profile code.
  • Authored 32×32 map: five encounter regions, 28 enemies across four types, 24 pickups, a blue-key gate, two secrets and a boss-controlled exit.
  • Combat simulation: fixed 35 Hz; existing frame-time-scaled player movement.
  • Hitscan pistol/shotgun, wall occlusion, enemy attack windups, BFS navigation, projectile pool, health/armour, weapon and monster animation, HUD/statistics.
  • Shotgun: seven independent pellets per shell, approximately 12.7-degree horizontal cone, individual damage/occlusion and short-lived impact puffs. A single shot can hit several enemies; the pistol remains a single ray.
  • Doom-layout Freedoom status bar: large red ammunition/health/armour numbers, damage-dependent animated face, weapon slots, key and ammunition reserves.
  • Completion flag: bit 18 in native and preview signed saves; file sizes stay unchanged. Native profiles remain the normal game save path.
  • Music: existing assets/music/tower/Mick_Gordon_-_The_Only_Thing_They_Fear_Is_You_OST_DOOM_Eternal_72020713.mp3. Dedicated MCI music alias at 35% of the previous music level (still follows the volume setting, including mute), applied before playback starts. Six independent waveaudio effect channels retain their existing loudness.

Assets and regeneration

Graphics and effects originate from Freedoom 0.13.0, imported offline into ANM1 BGRA packs and WAV files. Licence and credits ship in assets/hell/COPYING.txt and assets/hell/CREDITS.txt. Exact source lumps, download URL and archive SHA-256 are in assets/hell/manifest.json. The casino level is original; no Doom WAD is loaded at runtime.

python tools/generators/import_freedoom.py path/to/freedoom-0.13.0.zip
python tools/generators/make_hell_level.py
cmd /c build.bat
powershell -ExecutionPolicy Bypass -File tools/tests/publish_graphics.ps1

The final command updates local root/bin game copies and recompiles the existing C# launcher with the new integrity hash. It does not upload a release. Python/Pillow are offline development dependencies only. Include all of assets/hell/ and the existing soundtrack when copying the game distribution. Freedoom's licence applies to its assets, not to the separate soundtrack.

Verification

python tools/tests/check_hell_fps.py
python tools/tests/check_hell_fps.py --window
python tools/tests/check_artifacts.py

Native checks execute shipping ASM procedures: portal targeting, wall/body collisions, single-ray pistol versus multi-target pellet spread, wall occlusion, one-shell consumption/empty weapon, impact pool, pickups, armour/death/retry, key gate, secrets, 1,050 AI ticks, a finite-ammo boss fight with strafing and normal health, boss-locked exit, one-time reward, both signed save formats and return to the hall. Framebuffers are saved in build/scratch/. The window check presents 120 frames through Win32, sends mouse press/release events, checks shots, all six SFX opens and music's MCI playing status, then returns and closes. It also exercises asset-path resolution from a non-root working directory. Tests compare all runtime/ file hashes before/after.

These are automated mechanics/render/audio checks, not a complete human playthrough. The requested 10–15-minute first-clear duration and final difficulty still need playtesting; no measured duration is claimed.