dmnet.st Commando

How it works · write-up

Scenes outside gameplay in 3D (BACKLOG_3D 3D-14 to 3D-20)

docs/SCENES_3D_PLAN.md · 8 KB · updated 2026-11-02

Working notes, rendered as they are: they were written while building the game, so expect ROM addresses, register names and references to source files that are not published.

The 3D models and 3D bricks presentations in playlab.html decide per frame from a PresentationScene value (src/presentation/presentation-scene.ts, 3D-14) whether to draw in 3D or show the whole 2D arcade frame (SCENE_VIEW_3D in src/render3d/art-bindings.ts). Every scene now draws in 3D except boot and service, which stay 2D by decision. Text, scores, the name-entry letters and its cursor ring stay on the 2D overlay. The final exit effect (finalExit_87F1) still draws only a marker. The inventory below records what each scene looked like when this plan was written; BACKLOG_3D 3D-14 to 3D-20 hold the current state and what is still open.

Inventory

# Scene Source and state What the arcade shows Semantic data today 3D today
S1 Boot and service $03C9, MainSceneStage.bootService_00 RAM/ROM checks, service screens none 2D
S2 Attract $0400-$0561, attract_01, AttractPhase setup/walkingTitle/titleWait/scoreWait/endMessage/endWait title over a scrolling backdrop (AttractCamera.walking_0800) with an animated walking figure, score table, end message native sprites and foreground text only 2D
S3 Start input $0562-$05FB, startInput_02, StartInputPhase PUSH START / player-count menu over the backdrop foreground text only 2D
S4 Game start and entrance cinematic $0646-$07FB, $A9BC-$AE94, startGame_03, NativeStartPhase 00-04, CinematicPhase 00-07, CinematicPulsePhase 00-04 the transport ($E160, packed body $AB27, separate ground shadow $ABCE) arrives, the player deployment effect ($E420, pulse $AD63: follow, particles, explosion, player motion) puts the player down, saved scenery animates scene_0388 objects: cinematicTransport_A867 with body, shadow and pulse components, clips per phase, physical height unknown 2D
S5 Section transition ("between levels") $0A6D/$0E60/$0B28/$0B36/$0B86, SectionMode setup_05/update_06/ready_07 a vignette: static tile base $0999 (3 rows of 4 tiles), animated figure $0B36 (sequence per section from $0BDD), optional secondary figure $0B65, section-0 foreground effect $0B86, typed text from $0E60 scene_0388 compound sectionVignette_0999 with its four components and poses 2D
S6 Final section exit $8744/$87AE-$87F1, final $A8A8 vehicle, $88A6 player approach the player walks to the exit, a 20-sprite exit effect animates, the section vehicle runs its 13-callback sequence finalExit_87F1 object; sectionVehicle_A8A8 scene object marker / 2D
S7 Life lost $897A-$8A7A death, $081B/$086C continuation, $070D->$A58E rebuild over three physical frames, NativeStartPhase.restorePlayer_01 death pose, then the screen is rebuilt at the checkpoint and the player reappears death: player clips; restore: scenery during the ready wait 3D (3D-15)
S8 Game over $086C sets $E001=$08, $E047=$B4 (decremented on odd ticks), $0609/$03B7 video clear at expiry, $0E05 rank GAME OVER text over the last frame, then a clear nothing projected (the arcade shows no sprites); text in the foreground layer 3D until the $0609 clear, then 2D (3D-15)
S9 High-score name entry $985F-$9C6B, GameOverFlowMode highScoreEntry_09/highScoreWait_0a the player shoots letters: four shots and ten letter effects reuse $E200/$E2C0 with their own layouts not projected as name-entry objects attempted, unchecked
S10 Two-player turn handoff BACKLOG item 95 the other player's turn begins not implemented in gameplay n/a

Approach

The 3D view stays a reader of semantic state. Every scene gets a typed scene identity and semantic objects first (under the project rules: ROM evidence, compound entities, no identity inferred from looks), then bindings and models. The 2D renderer keeps the exact output, and Show the arcade frame beside the 3D view is the check for every scene.

Text, scores and logos stay in the foreground layer, which the 3D view already draws as an overlay (and on the VR panel). Only the world and the figures in it become 3D.

Steps

  1. 3D-14 Scene classification. Replace the boolean sceneFrame and the mainScene test with an explicit PresentationScene value derived from mainScene, the post-game mode, the restore step and the visible scene objects (src/presentation/presentation-scene.ts). For each value the renderer then chooses 3D or the arcade frame (SCENE_VIEW_3D). Add a scene readout to the semantic inspector, and lab presets that jump to each scene (several exist: ROM title, section transition, respawn). Tests: every scene value maps to one choice, and today's 2D cases stay 2D until their own step lands.
  2. 3D-15 Life lost and game over (S7, S8). Measured on the headless runtime before choosing: the arcade shows no sprites during the one-update rebuild, only the rebuilt checkpoint's scenery during the ~192-update $0621 ready wait, and no sprites during the 360-update GAME OVER. Holding the pre-death frame would therefore show the wrong place for seconds. The 3D view draws the stage at the current camera with exactly what is projected, and the projection now includes scenery during the ready wait. The $0609 clear switches to the arcade frame. Still to verify: a natural death and a final-life loss side by side in the browser, both styles and VR.
  3. 3D-16 Entrance cinematic (S4). Extract and show the $AB27 transport templates and the $AD63 pulse sprites in the review page, then confirm the transport's identity from them before modelling. The separate ground shadow suggests an airborne vehicle. Then: - build it in both styles: low-poly, and brick from an LDraw set as for the other vehicles; - bind its clip per CinematicPhase (arrive, the two poses, flash, depart); - leave the shadow component to the 3D lighting (covered); - give the deployment pulse phases an effect model (particles, explosion) and drive the player through playerMotion_03.

The physical height is unknown today. Estimate it from the body-to-shadow offset, and record the estimate as a judgement, not ROM fact. 4. 3D-17 Section transition vignette (S5). Extract the $0BDD per-section figure sequences, $0B65 and $0B86 sprites and the $0999 tile base for every section, and show them in the review page. Then decide the 3D form with the user: the vignette either as a small diorama (the tile base as relief or bricks, the figures as models) or as a 2D panel over a frozen 3D world. Bind the four components as one compound, as the semantic object already does. The typed text stays in the foreground layer. 5. 3D-18 Final section exit (S6). Model the $87F1 exit effect (five groups, frame from (globalTick >> 1) & 3) and the $A8A8 section vehicle; the player approach is ordinary player movement and already projects. Replace the marker. 6. 3D-19 Attract and start input (S2, S3). Project attract state as semantic objects: the backdrop camera from AttractCamera as cameraPixels, the walking title figure as a soldier with a walk clip, and the score table and messages as foreground text. Render the Area 1 stage behind the 2D title and menu overlay. Verify all six attract phases and the start menu against the arcade frame. Boot and service (S1) stay 2D by decision; record that as an exclusion. 7. 3D-20 High-score name entry (S9). Project the name-entry shots and letter effects as their own archetypes (they reuse the $E200/$E2C0 records with different layouts, so they must not bind as gameplay shots). Build letter blocks: 3D glyphs, or printed 1×1/2×2 tiles in the brick style. Show the player and shots in a fixed 3D arena. Verify a ranked game over end to end.

Two-player turn handoff (S10) waits for BACKLOG item 95.

Order and size

Steps 1 and 2 are small and remove the most visible 2D flashes in normal play. Step 3 is the next most visible, since every game starts with it. Steps 4 and 5 need sprite extraction and a design decision first. Steps 6 and 7 need new semantic projection before any modelling. Each step updates this file and BACKLOG_3D, adds review-page entries for new models with their original graphics, and is checked side by side with the arcade frame, in VR where it applies.