ssjskipp on DeviantArthttp://creativecommons.org/licenses/by-nc-nd/3.0/https://www.deviantart.com/ssjskipp/art/Shadows-and-Lights-175673182ssjskipp

Deviation Actions

ssjskipp's avatar

Shadows and Lights

By
Published:
1.6K Views

Description

WASD to move one light source, Arrow keys to move the other.

So, after a weekend of working, I've made a sort of shadow & light engine for my top down shooter game.

It has support for up to 256 on screen shadows (it can really go up to 65535, but that'd be weird). It can use a lot of optimization, and there are a few obvious glitches to hammer out.

I had a MUCH nicer version with only 1 light, but I feel two lights make it much...cooler :3

PLEASE IGNORE THE LACK OF WALL COLLISION. THAT ISN'T A PART OF THE TEST DARN IT.

By the by, the map is made up of rectangles (I can place as many as I like), I haven't added circles with shadows, but they wouldn't be that hard. I could really add convex n-gon shadows, but I'm lazy. So sue me.

For now, this is completely mine, and I won't be giving out the source (but I will say the method if you're curious). I need the script for future games.
Image size
550x400px 24.91 KB
Comments7
Join the community to add your comment. Already a deviant? Log In
wonderwhy-ER's avatar
Looks promising but kind of resource intensive no?