These last weeks i’ve been focusing on technical things, so sadly there’s nothing fun to show, but so you dont get the impression i’m doing nothing, i’ll try to summarize what i’ve been up to.
Basically, after beeing done creating the tools and display to terraform and build fortifications, i’ve been busy implementing the ‘logic’ of all these features, so that they are actually “seen” and understood by the porcos and the game, and not just a display thing.
I’ve patched pathfinding to be modified in realtime as you build things. I’ve optimized memory usage of the pathfinding and especially how its gradually loaded on the server depending whats needed, so more regions can be handled.
I’ve divided pathfinding grids size by 9 and also created a new way of storing them in the memory so they’d use less RAM. Instead of having 9 logical tiles per terrain tile to handle “walls” on the edge between tiles, i’ve properly implemented a system of “edge blocking”. So now one tile of logic can be the same as one tile of terrain.
Also, pathfinding now looks for a path starting from both the starting point and the destination point at the same time, until they reach a meeting point ( doing this makes finding paths faster in some specific cases compared to looking only from the starting point until it reaches the destination).
Porcos now “see ” walls. They can pass beneath bridge platforms, and basically find their path to their destination correctly without moving through things they shouldnt be able to.
I’ve added a new infrastructure, stairs, to allow porcos to move from a height to another.
Their primary use is to control how porcos can move on the walls, but they can also be used on terrain against cliffs.
I still have to add “gates” though, but its at this point a pretty straightforward task.
Now, the point of all this is that i’m finally restoring and updating the last remaining feature of the prototype : battles.
It’s a big chunk of work, especially that it was just ‘prototyped’ and now i need to properly do it, and there will be more to see in the next updates.
The basic battle algorithm on the server side is now functionnal and i’m working on the battle display on the client side.
These last days i’ve worked on sounds and the transition to battles. It’s pretty cool, and to give you an idea, it includes city alarm horns and citizens panicking and taking shelter into their homes!