Ashenfall: Echoes of the Forgotten Crown
2D Atmospheric Action-RPG & Metroidvania Game
Crafting precise combat mechanics, deterministic state machines, and atmospheric world systems in Unity and C#.


Ashenfall: Echoes of the Forgotten Crown is an independent 2D atmospheric action-adventure and Metroidvania game built in Unity and C#. Drawing inspiration from Hollow Knight and dark fantasy classics, it features responsive combat mechanics, interconnected level design, hierarchical boss state machines, and rich hand-animated sprites.
Developing responsive 2D action games requires frame-perfect physics, precise input buffering, and clean decoupled game architecture. Many indie games suffer from physics jitter, input delay, and brittle combat state transitions that break under complex boss encounters.
Game architecture is one of the most demanding disciplines in software engineering: it requires managing real-time loops, deterministic physics collisions at 60+ FPS, memory allocation discipline to prevent garbage collection spikes, and modular AI behavior trees.
Engineering Objectives
System Architecture
Built using Unity's Universal Render Pipeline (URP) with a modular C# architecture. Core gameplay follows component-based design patterns, decoupling input management, physics resolution, visual feedback, and combat logic into dedicated subsystems.
Hierarchical Boss State Machines
Boss AI is driven by decoupled state machines managing telegraphing, attack execution, cooldown recovery, and phase transitions.
Deterministic Combat Resolution
Hitbox and hurtbox queries utilize non-allocating 2D physics casts to prevent memory fragmentation and GC pauses.
Juice & Polish Subsystems
Centralized combat feedback manager synchronizes micro-freeze frames (hit-stop), camera impulses, and particle impacts.
Core & Backend Implementation
- Custom C# PlayerController with kinematic physics calculations and slope handling.
- State Machine Pattern implemented for player states: Idle, Run, Jump, Fall, Dash, Attack, Hurt, Dead.
- Non-allocating Physics2D queries (Physics2D.OverlapBoxNonAlloc) for high-performance collision detection.
- ScriptableObject architecture for weapon stats, enemy definitions, and audio event configurations.
- Custom batch build scripts and automated asset validation pipelines.
Client & Interface Layer
- Custom 2D pixel-perfect and atmospheric lighting shaders in URP.
- Sprite animation state blending with synchronized sound effects and particle triggers.
- Dynamic camera system utilizing Cinemachine with framing transposer and impulse noise.
- Diegetic HUD displaying health, soul energy, and acquired abilities.
- Interactive dialogue and lore delivery system with character portrait styling.
Data & Schema Design
Persistent world state manager serializing player stats, unlocked checkpoints, defeated bosses, and inventory flags.
Authentication & Security Controls
- Save file integrity hash checks preventing corrupted save states.
- Graceful fallback to backup save files in case of sudden application termination.
Engineering Challenges & Technical Decisions
Key Challenges Solved
Trade-Off Decisions
Testing & Verification Methodology
- Frame-rate stability benchmark: Consistent 60+ FPS on mid-range hardware.
- Input buffer accuracy: Verification that jump/dash buffers trigger reliably within 100ms prior to landing.
- Memory profiling: Zero heap allocations during sustained combat loops.