Line of sight & cosmetics
The only noteworthy feature I’ve been working on lately – while I cringe at even the thought of making meaningful progress with the AI – is line of sight. I have all these snapshots in my head about how it felt to explore caves and dungeons in NetHack.
Feelings of dread and excitement at the same time, wondering what will pop up when I turn a corner. A rare item? The bloody mess of corpses some high level monster left passing through the area, allowing me to safely (but carefully) rummage the remains for loot? The monster itself, forcing me to flee immediately?
This was my first time using raycasting (aww) and it was all way simpler than I thought it would be, but I still spent a solid weekend afternoon and a night to get it to feel right. Actually, to be exact it’s not raycasting, it’s collider casting, which is conceptually the same except instead of checking intersections of an infinitely narrow line, you’re virtually dragging a collider with a specified size along the line and seeing what it hits. This proved to work really well with my existing tile grid setup, I just had to add (trigger only) box colliders to the flat tiles.
The results are surprisingly good. I initially thought I was excited about implementing this because of the visual aspect (the usual fast rewards that I’m hooked on), but I was pleasantly surprised about how immense of an impact it has on the feeling of exploration. Instead of easily being able to run around from biome to biome fairly fast, sometimes you’re forced into narrow forest paths you can only get out of using your axe.
Also, as it turns out the visuals reminded me not only of NetHack (success!) but funnily enough, of Minesweeper; namely the feeling you get when you click an empty tile and you see a large open field expand from it. So satisfying.
Apart from this feature, most of the changes I’ve made since the summer are pretty minor: some palette and sprite tweaks (still experimenting), and a lot of under the hood stuff like porting the hacky C# rolling horizon to a shader (as simple as that is in concept, it was my first time with shaders so it was quite a challenge).
Next up, uhh, whatever I can find to do that allows me to put off working on the AI some more.