Closed joshuacortez closed 1 month ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
curious q re the line of sight case they mention -- does the logic handle this? https://www.redblobgames.com/grids/line-drawing/#line-of-sight
@tm-jc-nacpil I think that's more of a game dev concern! For simulating light that should be blocked by walls or characters that should be blocked. Not a concern for polygon filling
ohhh apparently we also need @butchtm 's review also to merge
This PR uses a more elegant implementation of voxel traversal using integer arithmetic that is not prone to floating point precision errors. It was inspired by the
supercover lines
implementation in this blog postA key difference of the new voxel traversal implementation is it doesn't include excessive grid cells as seen in the example below comparing the before and after:
Before:![image](https://github.com/user-attachments/assets/23a93855-5779-465c-b044-e69b4b35fa13)
After:![image](https://github.com/user-attachments/assets/fd2d3805-07c6-4150-b65d-d78c201ce452)