Last week I initially worked on the combat calculations and managed to make some good progress on overhauling and optimising the way the calculations were handled. Then I inevitably kept thinking about the navigation and got drawn back into it.
So, let me talk (hopefully for the last time) about navigation once more. I never know how technical I should get in these updates, so I will try to keep it sensible here as well. When I talked about setting up graphs (mathematical representations of the terrain) before, I mentioned that they were both used for villagers to be able to “see” the world and calculate where to go, as well as a range of other things (e.g. validating where the player orders a soldier to go, colour of the map, etc). My ideal solution used a very cleaned up graph to do all of these - but there were many issues with actually creating or cleaning up a graph as the system wasn’t built for it to be updated manually.
My alternative solution was to find a middle ground between good pathfinding and addressing the other considerations - which would have worked for now, but sort of left a bad taste in my mouth for being very half-finished and not ideal on any one function. However, I now decided to essentially use 2 graphs to do what I wanted - one to validate orders, etc, and one for the actual pathfinding. This means that I needed to adjust quite a bit of the code, but as a result, we have a reasonably clean setup now, which should take no time at all to switch over to the ideal solution if that becomes viable - while performing pretty well on all functions.
Once this was set up, I switched the rest of the game to using the new solution (so plants and buildings would be recognised by the graph, etc), and things are working very well already. I’m sure there will be a few things I will have to adjust over the coming few days as I remember that they need to be switched over, but for the most part, performance of the villager and soldier pathfinding is much faster than it was before.
The new system also gives us much more flexibility for further optimisation and improvement if and when we need it, so I am overall very happy with where we have gotten.
Over the next week, I will hopefully finish the optimisation of the combat calculations - As usual, I will keep you posted.
Until next week!
Weekly Update 88 - The Return of Falling Trees
Hey everyone!
I finally finished the graphics optimisation this week (as far as I can tell right now), and as a side-product, I also changed the system by which trees fall.
Before this week, our trees used physics to fall. Considering we used to have very hilly landscapes, we wanted our trees to fall according to the angle of the hill they were on, according to the force applied to them by the axe, etc. However, while this worked fairly well in the beginning, as our game grew more complex and we had more and more different trees to put into this system, things started to break down a little.
Some trees would fall over quickly and lie on the ground for a while, others would never fully fall over before disappearing, yet others steadfastly refused to fall at all. Using the physics system to calculate such a simple (and frankly unimportant) part of the game became a computationally expensive and yet unpredictable process. As I was investigating where I could further optimise things, this quickly jumped out as a problem and I started thinking about alternatives that would look good enough, while being much faster to calculate.
As a result, I decided to write a little system that kicks in every time a tree gets cut down. The system checks if the tree is leaning in a direction to start with (and if so, lets it fall in that direction), if the tree is “growing” on a hill (and if so, lets it fall in that direction), or if the tree is on flat ground, in which case it chooses a random direction for the tree to fall in. The system also takes into account the size and weight of the tree, and changes the fall speed accordingly. While this isn’t quite as dynamic as our previous system, it is a lot cheaper to implement, and it makes the falling much more predictable, which will help us to implement sounds for the falling, as well as potential particle effects to having the tree hit the ground.
While the sound and particle effects aren’t the first priority on our minds right now, I am quite pleased that we have a good basis to create them from, and we will hopefully get around to some of that additional polish soon.
Before experimental 0.8, I still want to tackle a bit of optimisation of the villager pathfinding and the soldiers’ combat, but more on that next week.
Until next week!
Weekly Update 87 - Pioneer Wagon
Hey everyone!
Two weeks ago, I mentioned that I would give you some more information about our plans for how to improve on the multi-village setups, so today I will tell you a little about our plans for the pioneer wagon.
Let me outline the problem first: When you are planning on creating an outpost at this point of the game, you need to run ahead to the area in which you want to place your new village, and put down a market. This market now gets added to the construction queue of your first village, and villagers walk toward it to deliver the materials it needs to get built. Considering the size of the map, this can take a good 5-10 minutes, during which you can’t place anything else in the area of the new village (cause every building needs a functioning market in range). So, the player usually runs off to deal with other things.
Sooner or later, the market is built, and the player returns, now queuing up all sorts of new buildings (warehouse, accommodations, maybe some towers, mines, etc). All of these again get added to the construction queue of the first village, and a lot more waiting ensues. This is of course very sub-optimal.
Our current plans for a solution is a “pioneer wagon”. This wagon would be built in a special building in the first village (with adequate cost, of course), and the player could decide on a certain amount of materials to load up into the wagon. Once the wagon is completed, it can be sent out to the position of the new village, and the player can place a market, warehouse, and 2 small houses straight away. The wagon will come with the initial 4 villagers who will live in the small houses, and these 4 villagers will also construct the buildings from disassembling the wagon. Once the buildings are completed, the materials that were loaded into the wagon will be added to the warehouse and/or the market, and the new village essentially starts with a small workforce, as well as some initial supplies for further building, which means that any new construction will now be added to the construction queue of the new villager and reduce waiting times.
The system of this pioneer wagon will hopefully make it a lot easier to establish new outposts, and creating and loading up the wagon in the first village should make it a far more interesting project to complete with your ally than the piecemeal approach to building a new village we currently have.
Combining this with the restriction of villagers not being able to travel between villages themselves mentioned two weeks ago, the logistics becomes more streamlined by having only warehouse workers/ox carts carrying goods from one village to another across the island - this will mean you will have a clearer inventory management, where the local villagers are responsible for their patch and the larger distances and deliveries are made by specialists with larger inventories.
I don’t plan on throwing this new feature into the version of the game that will be uploaded to the experimental branch, but I am contemplating whether to make at least a rudimentary version of it a part of the public version 0.8 considering how much it will improve the progression across the map.
Let us know your thoughts!
Until next week!
Weekly Update 86 - Intermission
Hey everyone!
I’ve been feeling pretty under the weather this weekend (took a few tests, at least it wasn’t COVID), so I haven’t managed to write a post.
I am still feeling pretty tired, so I will try to focus on recovery and will write the second post on inter-village logistics next week. Goes to show that I should write these ahead of time if I already know what I want to say!
Until next week!
Weekly Update 80 - The Rich Lake Biome
Hey everyone!
I was travelling last week, so haven’t been able to do as much optimisation as I had hoped - but we finally finished upgrading the last assets for the last biome: the Rich Lake. So without further ado, let me introduce this new area!
The Rich Lake area comes directly after the Iron Plateau - and when players have access to the final tier of buildings and soldiers. The biome is dominated by tropical pine trees and a big lake in the middle, with very little vegetation below the canopy.
The result is a very open area, which does not hide a great deal of loot, while being host to a vast amount of pirates, as well as a large amount of possible mineral vein spawns, which give the area its name.
The Rich Lake area is largely designed to be a final push for the players - after receiving access to all technology, fighting their way through the Rich Lake will get them face to face with the final Pirate Fortress, which will hold the artefact that needs to be retrieved to win.
This means that it will be necessary for players to fight their way through the Rich Lake against increasingly large groups of pirate attack waves (assuming they are switched on), and every metre ground gained will be hard fought over. Any ground you do gain, however, will be rewarded with extra mines that may allow you to bolster your forces or establish a final fortress of your own from which to stage your attack.
Until next week!
Weekly Update 79 - A New Sound System
Hey everyone!
There were many smaller improvements and developments that happened last week, many of which were not particularly flashy, so I will be talking about one of the bigger ones that happened over the past few weeks instead: switching the system through which we deal with sounds!
Many of you who are playing the currently available version know that we had not included too many sounds yet by the time we uploaded this version. Over the past couple of months, we created a lot of new sounds for nature, buildings, and villagers - and I had managed to at least introduce a few of them into the development build already.
However, we quickly realised two limitations: firstly, adding many sounds to the default Unity audio system came with a lot of bugs and problems, and so a lot of the time spent adding sounds turned into figuring out why the sound wasn’t behaving the way it should. Secondly, and adding to that, we have a long, long list of things that I need to be doing on the game, especially as I had to take on a decent amount of art and world building tasks, which meant that finding time to add sounds (and figuring out their bugs) was becoming increasingly difficult.
As a result, Haakon offered to be working on the sounds directly in Unity. For this, we also wanted to change to a different underlying sound system which Haakon was more familiar with and which was going to give us more options, and we have been working on migrating to this new sound system and getting Haakon set up on the project for a little while now. Of course, this migration came with many problems itself, not all of which are fixed yet, but hopefully this initial pain will be worth it when we can add more sounds much quicker in the future.
I will keep you posted on the progress.
Until next week!
Weekly Update 78 - Optimising the Island
Hey everyone!
As we are waiting for art assets to come along, I’ve done a decent amount of bug fixing, QoL improvements, and optimisation in the past week - the bigger ones of which I will try to explain today:
First of all, I was finally able to fix the game’s behaviour when a coop partner left the game. So far, when a coop partner left the game, the game would essentially hand control of all the buildings to the remaining player (including the other commander), which led to all sorts of issues, including the menu not working properly after. This was difficult to solve for a variety of reasons, which largely come down to me having set the game up for PvP initially, with the strong possibility of capturing an opponent’s buildings. Since switching to a PvE and coop focus, I could restructure how the game was set up, which now allows us to delete a leaving player’s assets more easily.
Secondly, I was finally able to fully address a concern that many people have had: widescreen support. While I had tried to fix some UI issues for widescreen monitors before, it wasn’t until last week that I was once again reminded of the issue, and decided to look into fixing it. I am pleased to say that widescreens should now be fully supported for 0.8 as soon as it is on the experimental branch.
Beyond some smaller fixes, such as correcting how ground shrubbery got removed, I was also able to address some of the performance issues we’ve had: While my first priority over the past few months had been to set the world up as well as we could, this has also meant that performance had suffered in some areas. In fact, some parts of the island ended up dropping my FPS as low as 15 - which is obviously not acceptable, despite only happening on ultra quality. Over the past 2 weeks, I was able to identify a couple of bottlenecks that led to these issues, and I’ve already been able to improve the lows from 15 to 25 FPS. The bottlenecks are by no means removed yet, but I will keep at it, and I am quite encouraged by the fact that there are very distinct bottlenecks that lend themselves to fixing, rather than just consistently bad or mediocre performance across all areas which would be much more difficult to address.
Until next week!
Weekly Update 77 - The Iron Plateau
Hey everyone!
Last week was pretty productive again, with me finally having some time to look at performance optimisation of the new island - but more on that next week, this week I promised to introduce the next biome: the Iron Plateau.
The Iron Plateau follows immediately after the Jungle, and as you can see from the pictures, has a very different vibe. It is a very open area reminiscent of the Grasslands, but unlike the Grasslands, is full of pirates. In addition to many random groupings of pirates protecting the various loot across the biome, two of the pirate fortresses are in the area as well, which means that you will have your hands full if you want to secure it for yourself.
In good news, however, the Iron Plateau will be the first area that gives you access to, you guessed it, iron mines. With lots of space to expand to and fertile enough ground for farming, this should allow you to create a sizable outpost for mining, and it will give you access to the third tier of buildings and units.
With only one more biome left between this area and the final pirate fortress (and the artefact it holds), your base in the Iron Plateau will also be a perfect staging area for your final push into the island, so securing it against the pirates should be a big priority.
Until next week!
Weekly Update 76 - The Jungle Biome
Hey everyone!
Last week was very productive; we finalised the assets for the Jungle (and therefore also the biome itself), fixed a range of bugs, and are getting ever closer to uploading 0.8. As usual, I will show you the Jungle biome today!
The Jungle is the biome you will get into after the Stone Valleys. Unlike the Stone Valleys, however, the Jungle is a lush environment with lots of water, trees, and shrubbery. This makes it a surprisingly dangerous environment to move through - considering pirates can lurk behind every corner, and you may come face to face with pirate pistoleers without much notice.
In terms of resources, the Jungle will provide you with lots of wood - and a decent amount of expansion space once you cut down some trees. The Jungle will also be the first area in which you will be able to find coal mines - which will give you a much better option to get coal than burning copious amounts of wood. As a result, the Jungle will be a necessary step toward sustainable ammo production. The Jungle is also host to a number of banana trees, so it should provide your villagers with some food right off the bat.
Finally, the lush environment has given us many, many options to hide paths into the mountains and loot, so once you decide to brave the danger of running into pirates at every corner, you will also be able to get a reward around most corners!
The next biome, the Iron Plateau, has been ready for a few weeks now, so I will show you a sneak peak of it next week.