⭐ Forensic Friday 1: The Beginning
Today marks the first Forensic Friday, which is a weekly update blog which will run every Friday from now on. As you may have noticed, it is in fact Saturday, but “Succinct Saturday” didn’t have much of a ring to it. In terms of development, Dillan is currently indisposed with exams; it’s just me working on the game for the meantime, which should only last a 2 weeks or so. I have been up to a lot of, for lack of a better word, low level stuff, as I prepare the project for Dillans eventual return to development. Since it is the opportune time to fix all the issues with the code base, I have been hard at work fixing every single bug and kink I could find in the game, whilst also making a lot of things easier to implement and work with. One of those main things being NPC path-finding.
Pathfinding Changes #
Path-finding is a lot more robust now. For the longest time NPCs would not update their path if a wall or structure was built, leading to NPCs defying the constraints of euclidean space and walking straight through walls. Considering this is a game with anomalous entities, you would think that wouldn’t be the most outlandish thing; and yes some anomalies can walk through walls, but I don’t think the corporation is going to hire anomalies to work as staff any time soon; so that’s been fixed. There is also a way to force an NPC to path somewhere now which is perfect for enacting your crazy sadistic experiments on your staff during moments of non-containment breach peace. I am planning to add a guard feature to the NPCs today as well, which should force them to stop carrying out all automated tasks; this would make directed tasks happen more immediately, instead of waiting for NPCs to finish wandering over to some random place first.
Multi-floor Shenanigans ( & Scary Technical Stuff (⊙.⊙) ) #
All the multi-floor stuff is STILL not finished, however it is getting stupidly close. In short the two things I need to finish is structural integrity and Multi-floor path-finding the latter of which I have formulated an algorithm for. In-case you don’t care about how it’s going to work you can skip to the next paragraph. This is how its going to work: whenever the player places a stair on the ground level, the stair creates a new weighted undirected graph. This undirected graph basically represents the connection between stairs on different levels, where the nodes represent the stairs, and the edges represent being able to travel between those stairs. Each edge will hold a weight which corresponds to the distance between the nodes (a.k.a stairs).
Using this graph, if an NPC wanted to path-find to a target on a different floor, the target will tell that NPC what the nearest stair to it is, then return the undirected graph to the NPC. Using this graph, the NPC will likely run some modified version of Dijkstra’s algorithm to find the shortest path of nodes and edges to the target node; with the start node being the nearest stair(on the same level) to the NPC that is in the graph. Then once the NPC knows what nodes it needs to travel to, its as easy as just queuing up a bunch of path-finding tasks and moving the NPC up a level every time it hits a stair. Phew! That was probably a lot, and I am not entirely sure If I explained it well but if you read this, you’re a champ!
Case Closed #
As the second week comes by am feeling much more energised and productive. Though I was unable to get the multifloor pathing done this week, I have already made a start on it which is promising; and I was still able to clean up the project and make it almost completely bug free (as of now). In the end, its more important that everything is set in place for when the game is barely playable and we have to just add content. Due to the nature of the game, the playable state is skewed on the more content heavy side of the spectrum, since it is just a very complicated game. Though I can’t help but be optimistic about the summer and the prospect of getting it to a playable state by the end of it. If we do manage it, we would probably have to sell our souls and half a kidney, but damn would it be an achievement.
Other than that sentimental garbage, and the multi-floor hell I’ve put myself in, I am also planning to finish up all the room region stuff (offices, infirmary, mess hall etc) as well; currently it is probably 70% done, which just a few quirks to iron out. I would say that out of all the things I want to get done next week, multi-floor pathing is top priority; and in that respect is likely going to be completed by the next time I’m writing one of these.
Anyways I’ve rambled on way too long and have probably broken the record for the longest dev log we have ever done. Until next Saturday Friday!