Object Lifecycle
Not implemented in GalaxyEggbertCNA yet. This page describes the porting target.
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)
- Render pickups/enemies as billboards from
element.png(blocked on Easy3D billboard support). - Reuse
ObjectTypeIDs from the existing engine-agnostic enum — already numerically frozen to match mobile-eggbert. - Use
Decor.cppas behavior reference only, never copied. - Faithfulness checks against mobile-eggbert before implementing any object behavior.
- Stop-and-discuss rule if a change would require exposing internal
Decorstate beyond what's needed.