Skip to content

A technical document detailing a simplified approach to approximating real-time 2D illumination with cast shadows and rim lighting, designed for GameMaker and adaptable to other engines. Includes mathematical foundations, implementation details, and example visuals.

License

Notifications You must be signed in to change notification settings

Emperor2000/Real-Time-2D-Illumination

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Approximating Real-Time 2D Illumination with Cast Shadows and Rim Lighting

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.

Image

Table of Contents


Overview

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.


Features

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.

Document Contents

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.


License

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.


Acknowledgments

  • 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.

Contact

For any questions or feedback, feel free to reach out via GitHub or LinkedIn.

About

A technical document detailing a simplified approach to approximating real-time 2D illumination with cast shadows and rim lighting, designed for GameMaker and adaptable to other engines. Includes mathematical foundations, implementation details, and example visuals.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published