Post news RSS Status update September 5, 2014

Units, squads, stables, pathfinding rework and more.

Posted by on

First of all, thank you all for the support! Seeing that a lot of people like the game is what keeps us going.

We need a couple more weeks to flesh things out, so Hearthlands 0.2.0 will be released this month. You will be able to download an updated version through Humble or Groupees.

Here's what we've been working on this week:

At Sunday I decided that pathfinding in the game could be made better and ended up rewriting the whole thing from scratch. Sometimes parts of your code become just too complicated, which makes it more difficult to add new functionality. So rewriting the code, making it easier to understand and expand, before you need to do that saves time in the long run.

As a result a bug with a peddler getting stuck in his tent was fixed; migrants and merchants now prefer roads over rough terrain and it will be much easier to write monsters/invaders AI.

Other changes:

- Stocks screen added, showing the total amount of every resource in your city and how it has been changed in the last 12 months. Opening the stocks screen does not pause the game.


Click to enlarge

- Barracks now produce units (axemen, spearmen, archers and horsemen) - 8 units (1 squad) per barraks. You can select the squad by clicking one of its units or the squad icon above the barracks and give it orders. Shift and Control-clicks are also supported. Left-click on a squad icon centers the screen on that squad. There's gonna be an army screen showing all of your squads in one place as well. Units will attack enemies at will if they get close to the barracks or you can send them to a mission yourself.



It was quite difficult to implement a proper unit behavior mostly because you need to guarantee that there's gonna be one unit only in each tile. This screws up the pathfinding, especially when the army needs to go through gates (which are 1 tile wide). Also the game should not freeze for several seconds when you send a few dozen of units from one side of the map to another. I'm quite happy with what I ended up with; it's interesting to drive units around and see how they try to form a square when they reach their destination.


- You can scroll the map and use the mini-map while a window is opened now. This may be useful for example if you need to see a radius of a building.

- Stables (produce one horse out of 6 grain)!


Next steps:

- Army screen
- More units-related stuff
- Enemies and combat
- Various improvements

As always we would like to get as much feedback as possible, so please comment and send your thoughts to If you become our watcher on Indie DB, that also helps a lot! Don't forget to subscribe to one of our social network pages or YouTube channel. If you want to support the development — you can just purchase the game.

And, please, do vote for us on Steam Greenlight!

Thank you,

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.