Open Dovyski opened 10 years ago
I can't remember if I saw this in Flixel or somewhere else, but does Flixel already have some sort of ray-casting code in the tilemaps?
There was a game that had lasers and a ninja, I can't remember, he had released some Ray tracing code which worked with flixel tile maps. I made it look like shadows and stuff, hope to share that as soon as I get home -_- On 02-Dec-2013 6:46 PM, "Andreas Renberg" notifications@github.com wrote:
I can't remember if I saw this in Flixel or somewhere else, but does Flixel already have some sort of ray-casting code in the tilemaps?
— Reply to this email directly or view it on GitHubhttps://github.com/FlixelCommunity/flixel/issues/198#issuecomment-29616520 .
http://space.madsoftgames.com/ - I'd be happy to share the code for the lighting effect, although, I don't know how easy it would be to make it work better in Flixel...
Yush! BTN had a ray tracer that worked with tilemaps! You can do stuff like this. :)
Thank you all for the contribution, guys! It seems this is a nice feature to add :)
I can't remember if I saw this in Flixel or somewhere else, but does Flixel already have some sort of ray-casting code in the tilemaps?
Yeah, it has, it's FlxTilemap::ray()
(here's the function definition). It could be used to create the feature I suggested if we build on top of it.
@SeiferTim Thanks! Your game is really cool! :D The lighting effect is amazing, it's exactly what I had in mind when suggested this feature. If you are ok about sharing the code, we could try to make it work with Flixel (maybe combining it with @yadurajiv 's tilemap ray tracer).
I got this idea while seeing this amazing demo by @yadurajiv (Github repo here). It's an AS3 implementation of ray casting using soft shadows.
It would be outstanding to have something like that in Flixel, as a plugin or a core feature.