Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 632 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 632 Bytes

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

; ;