Hello, I am wondering how I could implement 2D ray-casting in a Slick2D game, for lighting purposes. I realize that Slick2D is somewhat dead but that is irrelevant to ray-casting, as far as I know.
The "map" would consist of either rectangles or line segments.
I've read the article at http://www.redblobgames.com/articles/visibility/
but I can't seem to figure out how this is implemented in Java.
My best guess is to have a Ray class and a Line class and determine where intersections lie, and then create triangles from those points. Also, on a slightly irrelevant note, I have not learned how to create radial gradients in Slick2D, any help there would be appreciated too. I'm also wondering if efficiency would be an issue in a situation where there are a large number of lines. I hope my question makes sense.
One other question: how would I combine the lights from multiple sources? I'm thinking additive blending or perhaps transparency would be the solution.
Any help would be appreciated!