Technicalities

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.

Pathfinding updated to support all the new fortification features : porcos now use stairs to access walls, and can now pass below “bridge” platforms (here used to create the city gate).

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!

5 Replies to “Technicalities”

  1. Pour couvrir tout le continent américain, il faudrait au moins ajouter le portugais. ^^

  2. Courage, et la traduction espagnol est également attendue pour la v 2.0, afin de couvrir tout le continent américain.

  3. I hope elephants and mammoths troops also wander in the village. 😛

    Good luck for the battles.

  4. Thanks 🙂
    Yes for now they just wonder around their camps.
    When a battle happens they run into the camp as the full troop emerges.

  5. Invisible update, but great update nonetheless. With the new pathfinding optimization, servers can now handle more regions. Does it mean they can also handle more players? Or even display more animations on the regions maps?

    We can see 2 spearmen and one archer in the screenshot. Do they wander in the city just like any civilian unit, or do they have a specific destination?

    Anyway, good luck for the battle coding. I feel it’s going be epic!

Leave a Reply