ndouglas / downdelving-old

An experimental roguelike written in Rust.
The Unlicense
1 stars 0 forks source link

Replace RLTK field of view system with symmetric shadowcasting algorithm. #55

Closed ndouglas closed 2 years ago

ndouglas commented 2 years ago

Story

The RLTK FOV system seems to be a bit quirky, as noticed in #54 . The current state of the art appears to be symmetric shadowcasting. I should use that instead.

Acceptance Criteria

Implementation Notes

ndouglas commented 2 years ago

My rendering is a bit broken -- probably because of the fancy walls -- but this gives a good comparison.

The shadowcasting algorithm seems to give better visibility:

Screen Shot 2021-11-02 at 8 32 03 PM Screen Shot 2021-11-02 at 8 32 19 PM Screen Shot 2021-11-02 at 8 33 03 PM Screen Shot 2021-11-02 at 8 33 13 PM

But it's not dramatically better. I have seen some odd behavior with faraway tiles with the Bracket algorithm, but I haven't tried to reproduce it.

I don't see a measurable performance cost or benefit to switching algorithms.