Coding Style
Rules from CLAUDE.md's Current Direction Lock and the existing codebase.
The Direction Lock (binding, not a suggestion)
GalaxyEggbertSimple3D stays as reference, not to be expanded;
../mobile-eggbert is read-only — its code/data requires explicit approval to reuse,
its assets do not.
No #ifdef Engine Guards
Neither GalaxyEggbertSimple3D nor GalaxyEggbertCNA may use
#ifdef to paper over engine differences — each target speaks its own API
(Simple3D, or CNA+Easy3D) directly. If a backend is missing a feature, that's a problem for the
sub-repo (simple-3d or CNA/easy-3d), not something to
work around here.
Naming Conventions (as used in src/GalaxyEggbertCNA/)
| Element | Convention | Example |
|---|---|---|
| Classes | PascalCase, GE prefix for CNA/Simple3D game classes | GEWorldRuntime, GEBlupiController |
| Methods | PascalCase | LoadFromVwrFile() |
| Constants | kPascalCase | kMoveSpeed, kWorldCenterX |
| Enum values | PascalCase within enum class | GamePhase::Play |
| Namespaces | PascalCase | GalaxyEggbert::Worlds, GalaxyEggbert::CNA, Easy3D |
Header Layout
Public API headers used by tests live under include/GalaxyEggbert/ (all
engine-agnostic: Worlds/, def/, BlockTypes.hpp,
Def.hpp, GameConstants.hpp). Private implementation headers live
beside their .cpp under src/GalaxyEggbertCNA/ or
src/GalaxyEggbertSimple3D/.
Enum Stability
ObjectType, SoundChannel, BlupiAction, and other
def/ enums are frozen to match mobile-eggbert's level/save format exactly — do not
renumber existing values. New values must be appended at the end.
Approval Gates
- Modifying
../mobile-eggbert,../simple-3d, or../easy-3drequires explicit, per-change user approval. - Copying mobile-eggbert code or data (tables, enums, save-format bytes) requires explicit approval, even data that "looks like just data."
- No Lua unless explicitly requested by the user.