The Daily Click ::. Downloads ::. Engine ::. ShadowCaster Engine

ShadowCaster Engine
Author: Pixelthief Submitted: 28th December, 2006 Favourites:0
Genre: Engine Downloads: 335

Edited By Pixelthief on 12/28/2006

No, it doesn't have anything to do with ShadowCaster, besides the sweet name.

Basically, late last night I was browsing some old shadow examples in MMF, ranging from impressive stuff by Andos to downright crap involving oversized active objects. So I get the idea; what if one were to use a raycasting engine, in the style of the wolfenstein-esque 3D games, in order to draw shadows with the overlay object?

Basically, its a realtime, 2d single source lighting that accurately draws shadows projected from the single focus, while allowing for limited line of sight, background preservation, and allowing for the use of backdrop objects as light obstactles. It requires the Overlay 1.5 (redux) object, and its main problem is the questionable framerate. With the setting I put in as default (90x 4degree loops with 30*8 sight radius), it runs on my computer at a fairly withstandable 40 FPS. Attempting super high detail (360), with "flashlight" mode, will probly run you down to 5-10 FPS.

At any rate, I might use this in an upcoming game. Feel free to use it in any of your projects. Bear in mind it needs some serious adjusting to allow the overlay object to work in a scrolling environment, which won't be very fun.

EDIT: Remember its open sourced, and only 17kb. Download it!
*oh and the coding is amazingly sloppy. You'd be better off rewriting it in your own style...

Review This Download (17 kkb )

Posted by Aptennap 29th December, 2006

could you make an exe file please?
Posted by s-m-r 29th December, 2006

Looks great, man. I could see someone using this for a survival horror game, or even a game where you need to bumble around the basement to try and find the fuse box after the power's gone out in the house...

Lots of ideas generated with this little example. Nice job!
Posted by Pixelthief 29th December, 2006

Yeah, i was personally thinking something around the lines of being chased through a mansion by a guy with a chainsaw

I might try remaking it with the line of sight being drawn rather then the shadows, to see which has a better FPS
Posted by Pixelthief 29th December, 2006

Exe File:
Posted by Pixelthief 30th December, 2006

Here, I went and did that improvement, changing from drawing the shadows to draving the inverse light, and yeah it runs much more smoothly:





Worth A Click