Skip to content

liuchia/Shadowcasting-in-Love2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Love2D-Shadowcasting

Implementation of shadowcasting in Love2D.

How to run:

Install love. Run love with the folder as the argument.

Left click to insert boxes, right click to insert lights. Press space to toggle gravity.

How it works:

For each light source :

  • Record the angle from light to each vertex of every box.
  • Sort the above array.
  • Iterate through the array, raycasting from the light source towards each angle, recording the hit positions.
  • Draw triangles using above information.

Screenshots

; ;

About

Implementation of shadowcasting in Love2D.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages