A downloadable game for Windows

A simple demo of a 2d lighting effect using ray casting to determine line of sight. The light emanates from the mouse location and is obstructed by the objects on the screen.

I created this while following along with the Comp4300 course streaming on YouTube.

Controls are listed on the screen while running but are as follows, along with more info.

KeyEffectDefaultNotes
LToggle LightOn
RToggle RaysOffRays are drawn before the light shape for optimization so they will not be visible if the light is active
PToggle Intersect PointsOffPoints are drawn at the same time as rays and before the light shape for optimization. They are partially obscured when the light is active.
Points are drawn with a gradient between full red  and white in order to visualize the order they are drawn.


Download

Download
RayCasting.zip 600 kB

Install instructions

No install necessary. Just unzip and run RayCasting.exe

Leave a comment

Log in with itch.io to leave a comment.