Darkness is a 2D platformer game written in C#.

The game was inspired by Minecraft and written using the XNA framework. It features randomly generated infinite worlds, dynamic lighting using shaders and multiple different mechanics like crafting, magic, weather, day and night cycle and random events.

As the framework used by the game provides only basic functionality related to loading textures or sound files, drawing and handling user input many features had to be created from scratch. The chunk based engine was created with infinite worlds in mind and can handle them without performance problems. The infinite map is generated using algorithms based on perlin noise with additional methods used for cave generation, placing resources, trees and other landscape features. The lightning is a combination of fully featured dynamic lights and cell based lightning system and supports many moving and stationary light sources, as many lights originate from the particle system. Every block on the map can be damaged or removed and new blocks can be placed in a persistent world which can be freely shaped by the player.