Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Tested a bunch of approaches and landed on raycasting from the player. I only care if the player is lit right now, so light maps are overkill. Pixel sampling does this, but is too expensive for browser builds.

With some help from Claude (Fable), I built cheap raycasts to nearby lights. As my mum used to say, "if you can't see me, I can't see you." It gives softer falloff and silhouettes instead of hard cutoffs so corners, etc. feel right and also respects things like crouching.

The test level is working well, with WebGL holding 120fps.  But to really get that, I'm going to need some real levels, with real geometry. So next up is firing up Farclip to help me build some with decent sightlines for a stealth game.