Skip to content

Nebulavenus/compositorframework

Repository files navigation

🧩 Compositor Framework: A Godot C# Composition Engine

Attention! This project was "vibecoded" using the Gemini CLI. While AI assisted in the process, I invested significant time and resources to produce and refine this project. It serves primarily as a personal learning example, and the provided examples are functional.

Note on Completeness: Not all features of the framework are currently working. For instance, Networking is not functional in its current state, though it is designed to be possible in theory. This project is a snapshot of an evolving experiment.

I believe many developers will find this useful as a foundation for their own game frameworks. Through my experiments with "vibecoding" games, I’ve concluded that AI alone isn't capable of producing a finished game. Game development is an art; it requires human intelligence, creativity, and the willingness to handle even the "boring" parts of coding. However, these tools are incredibly valuable—they serve as a catalyst to help you learn and achieve your goals faster.


🎮 Two Ways to Play

This repository contains two distinct variants of the framework, depending on your needs:

1. 🦅 Compositor Lite (addons/CompositorLite)

The essential core. This is the distilled version of the framework, containing only the fundamental mechanics of composition. It is designed to be small, high-performance, and easy to understand.

  • Best for: Learning the concept from scratch, or using it as a "base" to build your own custom systems.
  • Includes: Entity containers, Component base, Blackboard (State), MessageBus (Events), and Dependency Injection (Attributes).

2. 🚀 Compositor Full (addons/CompositorFrameworkCSharp)

The complete ecosystem. This is what the framework became after adding production-ready features. It is a "battle-hardened" version ready for complex projects.

  • Best for: Developers who need advanced features like persistence and performance optimization out of the box.
  • Includes: Everything in Lite plus:
    • Networking (Experimental/Theoretical): Structural support for authority management and state synchronization (currently non-functional).
    • Pooling: A robust object pooling system to reduce GC pressure.
    • FSM: A built-in Finite State Machine for complex logic.
    • Serialization: System for saving and loading entity states.
    • Debugging: In-game developer console and visual gizmos.

🧠 Core Philosophy

  1. Strict Composition: Logic lives in Component nodes. The Entity is just a container.
  2. No Spaghetti Wiring: Never use GetNode() or GetParent() for logic. Use Attributes ([Bind], [NodeRef]).
  3. Data Isolation: Components hold logic. The Blackboard holds shared state.
  4. Decoupled Communication: Components talk via the MessageBus, never via direct function calls for loose events.

📂 Project Structure

  • addons/CompositorLite/: The lightweight core framework.
  • addons/CompositorFrameworkCSharp/: The full-featured production framework.
  • Example/SpaceShooterLite/: A code-only example using the Lite framework.
  • Example/SpaceShooter/: A comprehensive 3D example using the Full framework.
  • docs/index.html: The Interactive Documentation Portal (hosted on GitHub Pages).

🛠️ Getting Started

  1. Clone the repository into your Godot project.
  2. Open the project and enable either "Compositor Lite" or "Compositor Framework" in Project Settings > Plugins.
  3. Rebuild your C# solution (dotnet build).
  4. Run the examples in the Example/ folder to see the framework in action.

📜 License

This project is released under The Unlicense. It is free and unencumbered software released into the public domain. You can copy, modify, publish, use, compile, sell, or distribute this software for any purpose, commercial or non-commercial, and by any means, without attribution.


✨ Final Word

Use this as a starting point. Rip it apart, learn how it works, and build something uniquely yours. The "boring" code is the foundation upon which great art is built. Happy coding!

About

Godot C# framework

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors