Rogue-like shadow casting
Posted: Sun Jan 09, 2011 11:02 pm
Could someone explain to me how one would go about doing shadow casting in a rogue-like grid-based game?
example:
I've managed to recreate the effect with a trace function, where it traces from the light source and goes around 360 and scans for tiles to light up. Which is very inefficient.
Any ideas? (code examples would be nice )
PS. couldn't find any older threads about this.
example:
I've managed to recreate the effect with a trace function, where it traces from the light source and goes around 360 and scans for tiles to light up. Which is very inefficient.
Any ideas? (code examples would be nice )
PS. couldn't find any older threads about this.