0.0.5 - symmetric shadowcasting with edges
Hiya! This week I implemented a symmetric shadowcasting fov algorithm but with a head-melter twist; edges.
The way I generate (ships/dungeons) means that there's an edge between two grid rooms. Symmetric shadowcasting doesn't need edges, but I do to prevent issues like:
My implementation was pretty ugly, I just ran the fov-algorithm in a pre-processing step to change anything behind an edge to be a wall, so it looks like this internally where red is the adjusted floor=>wall tile. However, this whole approach of edges breaks the symmetric-ness in some situations e.g.
Overall I'm gonna keep it to prevent looking through walls, but it's not ideal that a room that should have identical fov doesn't. Alternative fixes could be: a) change the room generation algorithm b) remove edges between rooms, but I don't like this because the eventual idea is that rooms will contain oxygen, so the smaller rooms allow for more fine-tuning of where o2 gets blown out the ship.
Thanks :) Turtwiggy
Solar Warfare
Space roguelike
Status | In development |
Author | Turtwiggy |
Genre | Simulation, Role Playing |
Tags | 2D, Atmospheric, Indie, Roguelike, Sci-fi, Singleplayer, Space |
More posts
- 0.0.3 -> 0.0.4 progress (29-06-24 -> 20/07/24)Jul 20, 2024
- 0.0.3 updateJun 28, 2024
Leave a comment
Log in with itch.io to leave a comment.