Object Lifecycle

Not implemented in GalaxyEggbertCNA yet. This page describes the porting target.

Nothing here exists in CNA today GalaxyEggbertCNA has no object pool, no pickups, no enemies, no patrol movement, and no contact/collision events beyond terrain collision. This page describes mobile-eggbert's Decor.cpp system as the behavioral reference that a future CNA object system must replicate faithfully — per CLAUDE.md, Decor.cpp (~11,700 lines) is canonical behavioral reference only; it must never be linked or copied.

mobile-eggbert's Object Model (reference only)

A fixed-size pool of moving objects, each with a type (ObjectType), a linear patrol path (posStart/posEnd), an animation phase, and an active flag. Table-driven linear movement (MoveObjectStepLine) handles most patrol enemies; a handful of types (dynamite, chargers, followers, crates) are hand-coded exceptions. Full catalog: mobile-eggbert-reference/03-objects.md (204 ObjectType IDs) and 04-enemy-behavior.md.

What GalaxyEggbertSimple3D Already Ports

The reference target (GalaxyEggbertSimple3D) has its own GEDecorSystem implementing much of this already — crate push, platform patrol, hazard detection, enemy stomp, respawn invincibility, pickups (treasure/keys/shield/egg/drink), exit-gate logic. That implementation is a useful structural reference when the CNA port eventually begins, though the CNA target will need its own billboard-rendering path first (see Easy3D::CubeMeshRenderer and its roadmap note).

Roadmap (plan.md, E3D-MIG-070…074)

  1. Render pickups/enemies as billboards from element.png (blocked on Easy3D billboard support).
  2. Reuse ObjectType IDs from the existing engine-agnostic enum — already numerically frozen to match mobile-eggbert.
  3. Use Decor.cpp as behavior reference only, never copied.
  4. Faithfulness checks against mobile-eggbert before implementing any object behavior.
  5. Stop-and-discuss rule if a change would require exposing internal Decor state beyond what's needed.