Dynamic lighting in pixel art: the technical case of Core Keeper

Published on May 23, 2026 | Translated from Spanish

Core Keeper proves that pixel art is not at odds with modern technology. Developed in Unity, the game combines classic sprites with an advanced cell-based lighting system that casts real-time shadows. Each torch placed by the player modifies the environment, revealing hidden minerals and enemies in the darkness. This effect is achieved through a light buffer that calculates visibility per tile, optimizing performance even in scenarios with dozens of active light sources.

Dynamic lighting in Core Keeper's pixel art with real-time shadows in Unity

The cell-based shadow engine in Unity 🎮

Core Keeper's technical trick lies in a hybrid 2D lighting system. Instead of using traditional point lights, the game employs a custom shader that divides the screen into a grid of cells (tiles). Each cell stores a light value that is dynamically updated based on the distance to torches. This allows character and object sprites to react to the outline of darkness without needing complex per-pixel calculations. Aseprite is the key tool here, as it allows designing sprites with reduced palettes that maintain their readability under different lighting conditions, from bluish twilight to the warm glow of fire.

Lessons for indie developers 💡

If you're looking to replicate this atmosphere in your project, prioritize data structure over graphical realism. In Unity, use the Tilemap system along with a script that manages a two-dimensional array of light intensity. Define your light sources as simple objects that modify that array within a specific radius. Aseprite will help you create color variations for each sprite under different light levels, preventing real-time rendering from distorting the original palette. The result is an immersive experience where darkness is not just a background, but an active gameplay mechanic.

How Core Keeper's dynamic lighting system is implemented in Unity to make pixel art sprites react to light sources in real-time without losing the retro aesthetic

(PS: shaders are like mayonnaise: if they break, you have to start all over again)