It turns out Circular-vision systems like this are quite rare, and a lot of roguelikes prefer directional field-of-vision (On sites like Roguebasin there are literally tons of ways to do directional field-of-view and it's a very deep subject for Roguelike Devs)
After a long period of trying to find ways to draw circles onto a tile-grid, I turned up with nothing. In the end I have had to resort to to "Midpoint Circle Algorithm", which is an algorithm designed to draw circles in a very pixel-by-pixel way, but it turns out that transfers easily onto a roguelike tilemap!
As such, a basic run of the vision system now looks like this:
At first, I had big problems with trying to realize what the circles could even see, and ended up with it just deleting the map when it thought it could see it!
| Deleted Tiles show the blue void that scares a developer. |
So for now, I can move onto allowing the player to move, and then I can worry about drawing bigger circles, which has proven to be a massive failing point unfortunately (Innovation requires risk!). At the moment, drawing larger circles, because the circles are drawn via outlines, has lead to gaps which I will need to manually plug in:
Moving forward, I'll need to be able to deal with larger circles, and then I need to begin doing logic for seeing around corners (Pathfinding time!). Firstly, I'll be working on player-movement so that at least I can animate a basic little gif or something of it working.
Until next week!
Until next week!