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.
There's a lot of room for optimization. Right now, the only problem I'm having is with the bitmap half (the vector half is spot on). For me, it runs at a perfect 30 FPS... In the new one I'm working on I'll toss in an FPS meter, so we can see for sure.
Well it is not only about FPS, how much room you have left for other stuff like throwing in more graphics, collisions etc, for me it seemed to eat up 50% of CPU but visually being normal. But how much room for more is left there.