Shop Forum More Submit  Join Login
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.
Add a Comment:
 
:iconwonderwhy-er:
wonderwhy-ER Featured By Owner Aug 17, 2010
Looks promising but kind of resource intensive no?
Reply
:iconssjskipp:
ssjskipp Featured By Owner Aug 17, 2010
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.
Reply
:iconwonderwhy-er:
wonderwhy-ER Featured By Owner Aug 17, 2010
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.
Reply
:iconssjskipp:
ssjskipp Featured By Owner Aug 19, 2010
This is very true -- I need to come up with a good way to render multiple light sources and their shadows. And I think I have a few ideas...
Reply
:iconwonderwhy-er:
wonderwhy-ER Featured By Owner Aug 19, 2010
Good luck with that, so far looks impressive :)
Reply
:iconsecv:
secv Featured By Owner Aug 17, 2010
Wow, that's pretty interesting! I'm curious as to what this game is going to be...
Reply
:iconlittlegoblet:
littlegoblet Featured By Owner Aug 17, 2010
very clever buddy you must be very familiar with action script.
Reply
Add a Comment:
 
×



Details

Submitted on
August 17, 2010
Image Size
24.9 KB
Resolution
550×400
Link
Thumb

Stats

Views
1,513
Favourites
5 (who?)
Comments
7
Downloads
14

License

Creative Commons License
Some rights reserved. This work is licensed under a
Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License.
×