This repository contains the document "Approximating Real-Time 2D Illumination with Cast Shadows and Rim Lighting", which presents a practical approach to implementing dynamic lighting in 2D games. The system is designed to balance simplicity and efficiency, focusing on dynamic point lights, cast shadows, and rim lighting.

Lighting is a key element in game design, creating atmosphere and enhancing the player's experience. This document details a 2D lighting system suitable for small- to medium-scale projects. The system prioritizes adaptability and ease of replication, making it accessible for game developers.
The system described in this document includes:
- Dynamic Point Lights: Adjustable intensity and range.
- Cast Shadows: Realistic shadows calculated dynamically.
- Rim Lighting: Highlights the edges of objects illuminated by nearby light sources.
- A mathematical framework and implementation guide to help developers integrate the system into their own projects.
The document includes:
- Mathematical Framework: Core principles for light attenuation, shadow casting, and rim lighting.
- Implementation Details: Code snippets and shader logic for GameMaker.
- Results and Visuals: Demonstrations of the system’s features using sample scenes.
- Limitations and Future Work: Discussion on current constraints and potential areas for improvement.
Note: The sprites shown in the document are licensed assets purchased from Mana Seed and are used for demonstration purposes only. They are not included in this repository.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
You are free to:
- Share: Copy and redistribute the material in any medium or format.
- Adapt: Remix, transform, and build upon the material for any purpose, even commercially.
Attribution is required. Please provide appropriate credit when using this material.
For the full license, see the LICENSE file in this repository.
- Securas: For the EdgeNormals tool used to generate normal maps in this project.
- Mana Seed: For the licensed sprite assets used as examples in the visuals.
For any questions or feedback, feel free to reach out via GitHub or LinkedIn.