Documentation

Extending the Engine

Common extension points and engine internals.

Extension Points

Common extension points for adding new functionality:

  • Add new components in SceneObject.h + serialization in ProjectManager.cpp.
  • Add new rendering features in Rendering.*.
  • Add new script APIs in ScriptRuntime.* and managed bindings in ManagedBindings.*.
  • Add custom editor windows via script exports.

Engine Loop

From Engine::run, the core flow is:

  1. Poll events and check for project/scene loads.
  2. Update viewport focus and camera controls.
  3. Update scripts (Play/Spec/Test only).
  4. Update player controller + 2D physics + camera follow.
  5. Update animations and world transforms.
  6. Step PhysX if enabled and active.
  7. Render editor and game views.

This loop keeps edit-time changes isolated from runtime simulation.

References

Key source files in the repository:

Documentation

  • docs/Scripting.md - Full scripting guide and API details.
  • docs/mono-embedding.md - Mono embedding requirements.

Source Files

src/Engine.*          - Main loop and editor control
src/SceneObject.h     - Component definitions
src/Rendering.*       - Renderer and post-processing
src/PhysicsSystem.*   - PhysX integration
src/AudioSystem.*     - Audio playback and reverb
src/ProjectManager.*  - Project + scene serialization