Update 2

I continued to mainly work on behind-the-scenes stuff.

I made sure path supports work properly on sloped terrain; the fundaments wouldn’t appear before:

Next I made sure that when drag-building paths already occupied spots are highlighted red and aren’t build (and you don’t pay for them again):

Garret made some new cursors for the terraform tool, and I extended the tool by the ability to raise multiple tiles at once or just individual corners. It still needs more work and requires additional features, for example the ability to flatten a whole area of land to the same height, but for now this is pretty usable.

I made trees subtly sway in the wind (so subtle it’s barely visible in the gif except for the cut):

Then I started implementing shopkeepers, but so far they don’t do more than walk to their shop.

The rest of the week was spent on researching and implementing Behaviour Trees - I don’t want to get too technical here (see the link for a pretty nice explanation), so the short summary is that this is a method for structuring AI code into many smaller reusable parts that can then be plugged together to tell an agent what to do. For example, the code that tells the shopkeeper to walk to his shop looks like this:

new Sequence( // do the following actions one after another
	new FindPathAction(), // find a path to the destination
	new FollowPathAction(), // walk to the destination
	new RotateToQuaternionAction() // turn around to look outside window
);

I can’t imagine more comfortable code than this, and so far it looks like it’ll be a great tool for creating our AI behaviours :)