FOV: How to use it for vision and lighting

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Duc_Guermantes
Prole
Posts: 1
Joined: Sun Oct 28, 2018 7:32 pm

FOV: How to use it for vision and lighting

Post by Duc_Guermantes »

Suppose I have a tilebased 2D game where all objects have the same 32x32 dimension. I have a light bulb inside a room, and I want it to work just like it would in real life, aka with shadows, and I also only want to render pixels inside the player's field of vision.

How could I do that? People tell me I need to use a depth test but I don't know how to do that with Love or GLSL. I suppose I could use some sort of geometry for each light, but I don't know how to do that either.

I'm completely lost, I don't even know where to start. I made a very simple FOV system with GLSL but it is terrible and not useful. Could someone help me?
User avatar
veethree
Inner party member
Posts: 875
Joined: Sat Dec 10, 2011 7:18 pm

Re: FOV: How to use it for vision and lighting

Post by veethree »

Here's a nice article about it.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 210 guests