I would really like to create the effect in games like Helsing's Fire and Monaco.
Andy Schatz wrote a great little how-to on the shadowcasting in Monaco-
https://www.facebook.com/notes/monaco/l ... 1301481995
Could this be done quickly in Love2d?
Can it be done without the use of PixelEffect?
I think if all of your light-blocking objects were square, this is relatively easy to handle. You would just raycast out like his suggestion, and create a mask (canvas) to use as your lighting source. But what if you had object with rounded edges or something similar? Would it be worth using Box2d at that point for both the player collision and the raycasting? Maybe you could use per-pixel maps to determine the light source, or something in GLSL involving an occlusion map.
Thoughts?
Can we make a vector Shadow Caster?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- TylertheDesigner
- Citizen
- Posts: 80
- Joined: Sat Apr 10, 2010 2:27 am
Re: Can we make a vector Shadow Caster?
Hey, there are demos on here that show you how to program something like this.
I don't think Box2D's raycasting could be useful in this particular case.
It depends on how complicated you want to make this but usually you can create nice-looking shadow effects using just math.
I don't think Box2D's raycasting could be useful in this particular case.
It depends on how complicated you want to make this but usually you can create nice-looking shadow effects using just math.
- TylertheDesigner
- Citizen
- Posts: 80
- Joined: Sat Apr 10, 2010 2:27 am
Re: Can we make a vector Shadow Caster?
Do you have links to any of them? I've seen (and done) tile based shadow casting, but I couldn't find any vector based ones in Love2d.ivan wrote:Hey, there are demos on here that show you how to program something like this.
I don't think Box2D's raycasting could be useful in this particular case.
It depends on how complicated you want to make this but usually you can create nice-looking shadow effects using just math.
Edit- I agree on the Box2d aspect.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Majestic-12 [Bot] and 2 guests