Skip to content

Implement deterministic scene contexts and headless rendering #12

Description

@zoeyrose

Important

This preserved product issue is now part of the fresh MIT replacement program. Final implementation owner: atrinik/renderer. Legacy C/SDL2, packet, global-state, and file-path details below are historical evidence only.

Replacement implementation contract

Create source-neutral complete scene contexts and offscreen output directly in the shared Rust renderer. The Go server exports bounded authorized full scene bundles separately from connection deltas; do not replay classic MAP packets as a durable format.

New implementation and tests are independent MIT work unless an exact contribution by an approved MIT provenance grantor is admitted through the recorded file-level MIT grant. Do not copy or mechanically translate other GPL source/tests. Preserve every player-facing, accessibility, disclosure, and performance design decision below.

Required verification

  • Add deterministic Rust and/or Go tests at the owning boundary plus cross-language protocol fixtures for new fields.
  • Exercise malformed/stale/reordered inputs and lifecycle failure without partial state.
  • Use the shared renderer rather than a client/editor fork.
  • Validate through a wrapper-managed replacement scenario where the feature is interactive.
Preserved product/design specification and historical implementation notes

Parent and roadmap

Outcome

Create reusable server scene-capture and client renderer/resource contexts shared by the live client, offline renderer, and later editor preview.

Scope

  • Separate complete scene capture from sockets, per-connection delta state, and mutable player assumptions.
  • Separate map rendering from widget/process globals behind explicit scene, viewport, output-target, resource-provider, clock, lighting, fog, and cutaway inputs.
  • Add isolated offline asset lookup for collected faces/animations/archetypes with strict missing-asset diagnostics.
  • Support explicit deterministic world and player-view policies and clean repeated context lifecycle.

Superseded path / cleanup target

Delete proof-only adapters that duplicate the durable context. Do not copy map.c or create separate interactive/headless render implementations.

Acceptance criteria

  • The connected client and atrinik-map-render call the same scene/render/resource modules.
  • World and player-view manifests capture all inputs required for repeatability.
  • Missing assets, malformed snapshots, and unsupported backends fail without partial output.
  • Renderer and exporter contexts pass create/render/destroy/recreate tests without process-global leakage.

Validation baseline

Before: scene generation is coupled to socket deltas and rendering is coupled to client widgets/process globals.

After: transport-independent scene capture and reusable renderer contexts support deterministic offline consumers.

Run scene round trips, lifecycle/leak tests, equivalence fixtures, isolated-asset failures, and Linux/MinGW client/server builds.

This issue is a bounded child of #13. The parent remains open until every sibling child is complete.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions