yellowstonegames / SquidLib

Useful tools for roguelike, role-playing, strategy, and other grid-based games in Java. Feedback is welcome!
Other
455 stars 47 forks source link

Allow optional world wrapping for FOV algorithms #59

Open SquidPony opened 9 years ago

SquidPony commented 9 years ago

It would be nice if the user could set the FOV algorithms to world wrap when it hits edges rather than stopping hard.

Tricky bits include how light will blend if it effectively comes from two directions into the same space.

SquidPony commented 9 years ago

This requires either bulky additions to the space complexity to mirror the world for wrapping (perhaps several times if the radius is much larger than the world size) or it requires the lit squares to track the direction their lit from.

This is now on hold until directional light tracking is added for some other reason (thin walls maybe).

tommyettinger commented 7 years ago

Hey, we have thin wall support now! It's mostly in the Adjacency class and is used by CustomDijkstraMap. It doesn't currently involve directional light tracking, and LOS/FOV haven't been updated to work directly on the alternate way of handling creature positions (though they work fine with normal (x,y) positions, including with thin walls, but there's no way to, e.g. make one rotation in a cell have higher visibility than another). One thing that Adjacency does is to allow portals to exist between not-normally-adjacent cells, which can be handy for wrapping. This should see some activity soon.