What's a roguelike without some lighting? #7DRL is fast approaching so I thought I'd re-familiarise myself with pico8. I've ported shadowcasting before but someone on this forum has already done that for me. Unfortunately it's not in cart format where I can see it in action. So let's fix that.
I did some small changes:
- "cast" gets used for a lot of things so I called it fov instead
- Recursive shadowcasting calculates within a square, which looks ugly. I've added a distance check to slice off those hard corners.
Here's the url of the original post: https://www.lexaloffle.com/bbs/?pid=28780
Obviously I'm not looking at pico8's map, just one I've generated. But one could modify it to taste. I'm also being quite wasteful because I only need to iterate through the keys in "visible", but I wanted to be certain there were no bugs and this proves the point.
[Please log in to post a comment]