KAZIK/docs/STARTUP_PRESENTATION.md
Игорь Федосеев 24d66ddf0e feat: add startup briefing and entry music
Sequence studio, texture AI disclosure and MASM code comparison before arrival. Show a typed hall briefing after admission.

Start the jukebox at 50% user volume on hall entry. Apply positional gain before playback to avoid a full-volume startup burst.
2026-11-02 01:04:11 +03:00

84 lines
4.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Startup presentation and hall briefing
All runtime presentation, text, timing, input and drawing are MASM32. No browser,
video player, Python runtime or additional graphics dependency is introduced.
## Startup order
1. Existing Eblan Games animated logo (7 seconds; its F2 variant is retained).
2. Russian AI-use disclosure (10 seconds): artificial intelligence technologies
were used to create some game textures; third-party resources retain their
authors and licences.
3. Code fact (11 seconds): side-by-side editor-style C++ and MASM panels for
clearing the same 640×480 framebuffer. C++ is explicitly an illustrative
equivalent, not a second game runtime. MASM shows the actual clear operation
from `src_graphics/startup_sequence.inc`.
4. Existing first-person city opening, guards and profile selection.
Pages advance automatically. **Enter/Space** advances one page, clearing held
input so it cannot skip several screens at once. **Escape** skips the startup
pages and begins the existing city scene. Starting again resets all pages.
Existing missing-logo fallback still works; the two new pages need no art files.
## Post-entry briefing
After a guest/existing/new profile is admitted and the player enters the hall,
the jukebox starts **Bolden - Art Deco** on repeat at **50% user volume** (5/10).
Existing distance/floor attenuation still applies, so it sounds quieter away
from the cabinet. Volume is applied before playback, avoiding a full-volume
startup burst. No jukebox music plays during startup/profile selection.
Closing the briefing does not restart the track or reset volume; the existing
jukebox controls and +/- volume keys remain available after closing it.
At the same entry point, the centred panel deploys from a point: horizontal
expansion for 200 ms, then
vertical ease-out for 400 ms. Cyan/magenta rails and a scanning marker frame the
dark panel. The hall is rendered by the normal ASM renderer and dimmed beneath
it; movement, interactions and camera input do not run until the modal closes.
After deployment, Russian text types at one character per 18 ms with a blinking
cursor: version **4.0 / Windows x86**, engine, activities, controls
and profile persistence. Version follows the existing 4.0 build identity; this
change does not introduce a new release/version bump or alter save formats.
- **Enter/Space**: complete the text; press again to close.
- **Escape**: close immediately, without opening pause.
- **Enter game** button: same complete/close behaviour, with mouse input.
- No automatic dismissal; the information remains readable.
- Shown once per admission on each launch, not on returning from tables or Hell.
The core remains assembly-only; the pre-existing C# packaging tools and the
approved C++ fortune inference worker are separate from the game engine.
## Copy and implementation
- `tools/generators/make_presentation_text.py`: editable Russian copy; emits
numeric CP1251 declarations into `src_graphics/presentation_text.inc`.
- `src_graphics/presentation_data.inc`: timings, page/briefing state and API.
- `src_graphics/presentation_code.inc`: native bitmap text, code windows,
unfolding modal and typewriter.
- `src_graphics/startup_code.inc`: three-page sequencing.
- `src_graphics/arrival_scene.inc`: briefing starts after admission/entry only.
- `casino3d.inc`: modal input gate, mouse unlock and Escape handling.
## Verification
```powershell
python tools/generators/make_presentation_text.py
python tools/tests/check_presentation.py
python tools/tests/check_presentation.py --window
```
Tests compile the production procedures with an isolated ASM entry point. They
check automatic and key transitions, restart/reset, existing city-scene handoff,
guest admission, delayed modal trigger, deployment, typing and manual completion,
button/close input cleanup, and unchanged bank, RNG and player save files.
They also query actual MCI playback and gain after entry, verify silence before
admission, retain a changed volume and playback position across modal closure,
then exercise manual track selection and Stop. MCI gain assertions allow device
rounding (four units out of 1000); both success and failure close `jboxmusic`.
`--window` also presents 150 real Win32 frames.
Outputs: `build/scratch/presentation-00..11.png`, `presentation-contact.png` and
`presentation-window.png`. Existing action/arrival tests also check the revised
startup order and the new admission trigger.