ReviewOS

stacks/the-settlers-iii-remake

Render torso layers with explicit player colors and original map slots

#211
Closed chris opened this 7 days ago ·
7 days ago

The converter currently applies one prototype gold/brown tint to every torso layer. Settlers belonging to different players therefore share clothing colors, while territory and small enemy markers use a separate prototype palette.

The supplied remake provides a more complete reference path. MapDrawContext defines 32 player colors and explicitly identifies the first 20 as copied from an original Settlers III editor screenshot; its additional 12 are remake choices. The shader multiplies the torso's grayscale intensity by the selected player's RGB color. This is source evidence, not a measured original Gold runtime palette.

Primary sources at paulwedeck/settlers-remake@6ad8c42:

Acceptance:

  • Preserve the body and grayscale torso data needed to render each player's actual selected color, including transparent regions and signed anchors. Use the corrected generic torso alignment.
  • Adopt the reference palette with truthful provenance. Distinguish its first 20 editor-derived slots from the 12 remake additions; do not claim Gold runtime pixel equivalence.
  • Define the player-to-palette mapping explicitly. Engine player IDs are one-based; reference player IDs and original map slots are zero-based. Original indices must survive when unsupported civilizations are omitted. Do not infer an original slot by subtracting one from a filtered engine ID.
  • Keep territory, minimap and unit identity colors coherent where they represent the same player. Preserve existing body pixels, visibility and ownership rules.
  • If mapping needs saved presentation metadata, define its validation and compatibility deliberately, retain older saves/replays and avoid silent profile or checksum drift. Rendering must remain read-only.
  • Cover different players using the same body frame, grayscale/color samples, transparent boundaries, missing layers, original-slot mapping, save/reload and fog. Verify browser output and run relevant unit/browser, asset, type, lint and build checks.

Scope: player-color presentation, following the supplied reference. Full shadow rendering, other profession animations, original Gold measurements and native application presentation remain in broader #20, #41 and #4.

7 days ago

The next import pass also needs the RGB expansion correction in #213. Hand-encoded RGB565 and RGB555 midtones differ from the supplied reference by one channel value, while saturated colors agree. This can be verified from the reference's Color and DatFileType implementations without an original executable.

I also checked layer precedence against SettlerImage: the reference places opaque body pixels above the torso mask. All 335 sampled carrier, geologist, survey, priest and swordsman frames have disjoint opaque layers, so this order difference does not establish a visible defect in those samples. The new coloring path should still preserve the reference precedence for overlapping layers.

Original map slots are currently lost when unsupported civilizations are filtered. The mapping needs an explicit presentation contract that retains older saves and replay checksums; subtracting one from the filtered player ID would be wrong.

7 days ago

The importer now retains untinted bodies and aligned grayscale torso masks separately. Clothing, borders, foreign identity markers and the minimap use the same explicit player mapping. Original maps retain their source slots after unsupported civilizations are filtered, without changing saved simulation state or replay checksums.

The browser regression covers multiple players sharing one body frame, fog, save restoration, missing layers, opaque body precedence and the bounded texture cache. It also catches an unavailable saved mapping and verifies that startup preserves the checkpoint instead of replacing it.

Local checks passed: 377 unit tests, all 7,294 original body/mask layers compared against independent decoding, types, lint, asset verification, build and the targeted browser suites. Full CI verification is running before closure.

7 days ago

Player-specific clothing is working from separate original body and grayscale torso layers. Borders, foreign identity markers and the minimap share the same mapping. Original player slots survive civilization filtering, save restoration and replay without changing simulation state or checksums. An unavailable saved mapping preserves the checkpoint and shows a startup error.

All 377 unit tests and 502 browser checks passed, including 7,294 independently decoded original layers, 2,664 browser pixel samples, fog, layer precedence, missing layers, cache bounds, checkpoint preservation and the full ten-minute rival battle. Types, lint, asset verification and the production build passed. CI results.

A normal browser playthrough also completed a forestry and sawmill chain, built housing, reached 44 settlers, and saved successfully. The new exhaustive test's mixed-case archive filename error was corrected for Linux before this passing run.

The palette follows the supplied reference: its first 20 colors are editor-derived according to its author, and the last 12 are remake additions. Original Gold runtime colors, full shadows and remaining profession/faction animations are still unverified or unfinished under #20.

Sign in to comment on this issue.