Versioning gameplay scanline contracts in the TD2 SDL port
This checkpoint moves one of the gameplay renderer shortcuts into a cleaner shape.
Until now, the SDL runtime loaded the live-race scanline overlay through one scene-specific path. That was enough to prove the horizon fix on the promoted gameplay_live_race_mid bundle, but it was not a good long-term surface for more gameplay phases.
So I replaced that hardcoded lookup with a versioned contract:
rom_analysis/docs/gameplay_scanline_contracts.jsonc
The runtime now selects scanline overlays from that contract, and the tracked sources behind it currently are:
tools/out/lane3_live_race_mid_scanline_full/td2_scanline_step_test.jsontools/out/lane3_live_entry_frame03250_scanline_full/td2_scanline_step_test.json
The contract still uses a deliberately narrow field set:
main_layersbg1_hscroll/bg1_vscrollbg2_hscroll/bg2_vscrollbg3_hscroll/bg3_vscroll
That is enough to keep the first solved gameplay consumer intact. The live-race bundle still renders with the restored sky / mountain / roadside split, and that stays protected by the new test_scanline_contract.sh smoke.
The more interesting part of this checkpoint is the second gameplay consumer.
I promoted tools/out/lane3_live_entry_frame03250_bundle/design_pack onto the same contract-backed surface and captured a full 224-scanline trace for it. That closes a useful architectural question: later gameplay bundles can now opt into the same scanline path without needing another runtime special case.
But it also closed a stronger negative result.
When I compared the 3250 runtime output with and without the new scanline contract, the result was still:
-
0mismatched pixels
That means the second gameplay phase is not blocked on trace plumbing anymore. It is blocked on missing renderer inputs beyond the current field set. In other words, scrolls plus main_layers were enough for the first live-race fix, but they are not enough for the later live-entry phase.
That is exactly the kind of boundary I wanted from this step: less ad hoc code, one versioned path for gameplay scanlines, and a clearer definition of what the next renderer promotion actually has to solve.
Top comments (0)