Skip to content

DignaGG/Digna.WaveEngine

Repository files navigation

Digna.WaveEngine

C# Unity License

Digna.WaveEngine is a high-performance, modular, and data-driven wave management framework for Unity. It serves as a scalable solution for orchestrating complex combat encounters or sequence-based events with a focus on memory efficiency and decoupling.

🏗 Architectural Philosophy

Digna.WaveEngine is engineered with a "Performance-First" and "Agnostic-Design" mindset, adhering to rigorous software engineering principles:

  • Data-Driven Architecture: Utilizes ScriptableObjects to decouple wave definitions from scene logic, allowing for high reusability and modular level design.
  • Zero-GC Optimization: Implements a specialized, auto-expanding Queue-based Object Pooling system to eliminate runtime Instantiate and Destroy calls, ensuring stable frametimes.
  • Physics Agnosticism: Designed to be dimension-independent; the core engine operates seamlessly with both 2D (Collider2D) and 3D (Collider) physics engines.
  • Event-Driven Orchestration: Uses an agnostic event-bus pattern (UnityEvents) to ensure low coupling between the core engine and external systems like UI or Game Managers.

🚀 Roadmap & Current Modules

Digna.WaveEngine.Core

  • WaveEngine: State-machine based orchestrator for wave sequences and lifecycle management.
  • WaveEngineState: Explicit state tracking (Idle, Spawning, Waiting, etc.) for system observability.

Digna.WaveEngine.Data

  • WaveProfile: Individual wave data containers with injected enemy statistics.
  • LevelWavesProfile: Sequential wave collection assets for level-based configurations.

Digna.WaveEngine.Pooling

  • WavePool: High-speed O(1) object retrieval engine using generic queues.
  • WavePoolManager: Automated dictionary-based pool registration and container management.

Digna.WaveEngine.Adapters

  • IWaveEntity: Contract-based interface for dependency injection between the engine and custom entity logic.
  • WaveTrigger: Universal physics adapter for cross-dimensional engine activation.

💻 Installation & Usage

using Digna.WaveEngine.Adapters;
using System;

// Example: Implementing the engine contract in your custom enemy script
public class MyCustomEnemy : MonoBehaviour, IWaveEntity
{
    private Action _onDeath;

    public void Initialize(float health, float speed, float damage, Action onDeathCallback)
    {
        // Apply injected stats from WaveProfile
        this._onDeath = onDeathCallback;
        Debug.Log($"Enemy Initialized with {health} HP.");
    }

    public void OnEntityDeath()
    {
        // Notify the engine and return to pool
        _onDeath?.Invoke();
        GetComponent<Digna.WaveEngine.Pooling.WavePoolTracker>()?.ReturnToPool();
    }
}

✍️ Author & Documentation Notes

Author: DignaGG (DignaSoftware)

Design & Translation Note: The core architecture, algorithms, and system logic of this library are natively designed and developed in Turkish. To comply with international open-source coding standards, the code comments, XML documentation, and this README were translated into English with AI assistance. The primary engineering focus remains strictly on mathematical accuracy, hardware-level optimization, and system stability.

License: This project is licensed under the MIT License - see the LICENSE file for details.

About

Digna.WaveEngine: A high-performance, data-driven, and Zero-GC wave management framework for Unity. Features a modular architecture, agnostic physics triggers, and a robust object pooling system designed for scalable game encounters.

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages