Hi, I 'm hoping CommanderKeith is still around and can answer some questions on his awesome StraightEdge project? (or anyone really if they are familiar with it). The other thread was to old to respond to @ http://www.java-gaming.org/topics/straightedge-2d-path-finding-and-lighting/23427/view.html
Anyhoo. I’ve been hacking away at another community project (MapTool) and saw that another of our members jfrazierjr even asked some questions a few years ago so must be on the right track!
So, here we go:
-
Do you have any convenience methods to handle java.awt.geom.Area? Our current VBL (vision blocking layer) or “occulders” are stored as Area’s. I currentyl use PathIterator to pull back out individual polygons but having some issues (specifically on non rectangle poly’s, some points seem to be skipped or drawn out of order?). I was looking at JTP to see if there was a way to convert Area to Polygon(s) but didn’t see one. In fact, didn’t see any good methods out there other than PathIterator (and not sure how expensive that is to invoke?)
-
Did you ever crack Soft Shadows? (Not required but they sure would look cool!)
-
What’s the proper way to invoke multiple light sources? Each one should have it’s own KPoint eye of course, and I assume it’s own VisionData and then a single call to VisionFinder?
-
How do you clear/reset a given eye (to turn it off or change it’s range or numPoints?) Do you just call reset() then recreate the boundaryPolygon with updated KPoint? Wanted to make sure I’m doing things the most efficient for performance.
-
Is there a way (or rather an easy way) to utilize OpenGL or the video card in some way to improve performance? I’m new to this whole side of things and just trying to add some nicer affects and speed things up to get MapTool updated to 2015. You know, spice it up some!
-
I’m having trouble on translating the KPolygon’s in regards to scaling. When our map zooms/scales, I can scale the KPolygon to the proper size ok, but the x,y locations are off, I can’t seem to scale those coords properly… Any suggestions?
Anyway, awesome job on StraightEdge! I was looking for something simple to plug into MapTool to do a Proof of Concept without having to dive into the full libraries like LWJGL or Box2dLights. Within a few hours I had your code up and running! (took me longer to get it to paint in the correct frame of our tool and even longer to covert our VBL to occluders…)