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.
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
InstantiateandDestroycalls, 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.
-
WaveEngine: State-machine based orchestrator for wave sequences and lifecycle management. -
WaveEngineState: Explicit state tracking (Idle, Spawning, Waiting, etc.) for system observability.
-
WaveProfile: Individual wave data containers with injected enemy statistics. -
LevelWavesProfile: Sequential wave collection assets for level-based configurations.
-
WavePool: High-speed O(1) object retrieval engine using generic queues. -
WavePoolManager: Automated dictionary-based pool registration and container management.
-
IWaveEntity: Contract-based interface for dependency injection between the engine and custom entity logic. -
WaveTrigger: Universal physics adapter for cross-dimensional engine activation.
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: 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.