01 Jul

Week 13 Recap

Looking Back

Advancing with the building system has been a good decision. Building their own dwellings will be a significant source of satisfaction for future players. Any time spent on this feature will tremendously impact the final quality of the game. During last week, I added some more basic building parts and construction rules. See those in action in the following clip:

Some key features are still missing, such as a proper information display which shows the currently active part. Also, players are supposed to plan the building first and create a world-place blueprint (like tents and camp fires). Afterwards, a construction task will make settlers construct the individual pieces in logical order, i.e. foundation / floor > pillars > walls > stairs > props. Additionally, I will need a way to hide building floors which obstruct visibility. Just showing the player outline is not going to help an awful lot once buildings contain furniture. And to top that off, pathfinding for NPCs must be updated regularly while building.

Looking Forward

I am going to continue straight ahead with the building part. First, I want to re-structure some of the rule-set for building. Some pieces contain multiple slots for other pieces of different sizes, all of which must be expensively checked against when determining correct placements. See a composition of just three pieces below:

Building parts and slots

Building parts and slots

Each of the black wireframe boxes represents a slot for a fitting building piece. A large wall piece, for example, will check against any of these boxes it overlaps when a player tries to place it. A modest building, like the one from the clip above, can already cause performance problems.

Once this mess is cleaned up, I will create an information panel which displays the currently active part, material, size and variant. It should also contain controls to finish a plan or discard it. If the panel does not take too much time to implement, I will also compile and distribute a new alpha version.

Thanks for reading and until next week!

24 Jun

Week 12 Recap

Looking Back

Once again I have mostly discarded my plans for the week. But still, the results are positive. I really wanted to get another slight visual upgrade done. Some weeks ago I changed the terrain geometry to pre-built blocks. Previously, all geometry was basically made up of unit cubes which were further split up into smaller parts, which could then be slightly offset to give the terrain some detail. Modern hardware has little trouble with this brute force approach but I required the more flexible building block method, anyway. An unsavoury consequence was a very flat and repetitive look of the ground. The current iteration uses tri-planar mapping of normal splat maps in a custom shader, which adds back some nice detail at very little cost (except some nerve-wracking wrangling of shader code).

The biggest deviation from my plan was that I decided to leave the task overview for a later time. It is not currently relevant, as there are much more pressing issues to resolve and try out. Therefore I gave the building system a shot. Check out a very early prototype, here:

It is done using uConstruct which takes a big load off of implementation time. After getting acquainted with it and writing some interaction code, the definition of a simple structure as seen in the video was pretty much done, already. I still need to beef up the system a little, especially adding variably sized walls and angled elements.

Looking Forward

Next week I will continue with the building system. For the game, it should only produce a building plan / blueprint, which settlers will then build when tasked. I would like to get in nicer looking building elements and a suitable building task.

Thanks for reading!

17 Jun

Week 11 Recap

Looking Back

Finally! NPCs can now keep a camp fire going (the “pants on fire” issue will be solved, eventually):

Basically, the task makes characters look for combustible materials (e.g. fire wood next to trees), pick it up and drop it on the fire. The task appears simple, as I can describe it in a single sentence. However, it already incorporates most of the fundamental mechanics required for any other tasks. As mentioned before, this means adding additional behaviour becomes much faster now.

I also added an outline to the player character, whenever its top half is occluded by some large object. The last half of the video snippet above demonstrates it well.

Looking Forward

Still pending: Task overview. Another tedious user interface to implement. But it is important. I also need to clean up some more code around the task system and organize text fragments into a central repository. Next week’s update is probably going to be a tad boring. But we shall see…

Thank you for reading.

10 Jun

Week 10 Recap

Looking Back

Rainy days, productive days. The general concept for a task UI has kept me back for longer than I would like to admit. Eventually, I came to the conclusion that it would make sense to put everything on one page / view. Singular tasks should not exceed my complexity target of 5 concept units per (sub-)system, anyway. Take a look at the current prototype:

The main work flow of this design is based on task assignment by conversations. The more generic work flow of open tasks can also utilize this UI. I still need to build an overview of all currently issued and accepted tasks of players. Their own tasks remain tracked on the right hand side, but may be toggled for tracking in that new view (as in e.g. World of Warcraft). The whole UI still, let us be honest, looks like shit. However, that is not a concern until it is functionally complete.

Looking Forward

The task UI is still a bit of an empty shell underneath. To make it mostly viable, I plan to add the following parts next week:

  • Add overview of tasks and display it when task menu is called from circular context menu
  • Actually create actionable character tasks from the menu

Also, I keep getting lost in dense forests. For the target picking functionality I have integrated a highlighting component which draws nice outlines around objects. I might use that to highlight the player character and some other objects when they are occluded by stuff inbetween them and the camera.

Once again, thanks for reading and until next week!

03 Jun

Week 9 Recap

Looking Back

What a slow week… Pollen attack! Fucking hay fever, lack of sleep and too many distractions. The task UI is still just a concept. It required a semi-functional conversation system beforehand, anyway, which I can claim to have implemented at least.

Prototype of conversations in game

Prototype of conversations in game

The options are already wired to actions, such as ending the conversation and triggering the currently empty task view. The selected option in the screenshot (“How are you doing?”) will at some point provide insights into settlers’ needs, which should inform a player’s priorities or even create new player tasks directly.

The task UI will be quite a beast. I have tried to imagine how it would look, but it turns out that I need to make it work for two work flows. Firstly, tasks can be given directly to settlers, as seen in the screenshot (first option). This consequently requires opening a task view where the current settler is the default and unchangeable assignee. The direct approach should be used by players for high-priority tasks which they need to have reliably completed. As a second and more commonly employed approach, tasks will be given out indirectly by posting them to the settlement at large. Any settlers willing to work for a given reward will then sign up for the task and start working on it. Thus, one way focuses on a settler, while the other emphasizes the task. At the same time, the implementation and workflow is reversed for each case. I will need to draw up an actual flow chart for this. The task UI is eventually going to be the most viewed menu within the game (probably rivalled only by the building mode), so it must be done properly.

Looking Forward

Well, this is easy: keep going on the task UI. The conversation system will also need some more work. I am still deferring the management of text strings (messages, menu labels, atc.) to a later time. I might need to get that in sooner, though, since yanking out all text into a suitable repository does not become more pleasant with time. I hope I can show off a little video sequence of the task UI in action next week. Getting one of those guys to gather some firewood is still the goal.

Thanks for reading and until next week.

27 May

Week 8 Recap

Looking Back

Two months gone by, already. Time flies.

As expected, I have been busy with the loading and persistence aspect. This stuff is just hell to get right with performance in mind. Until a few days ago, I still had a mechanism which would unload terrain chunks from memory once they at a large distance from the player. Upon tracking back, those chunks would then be loaded again. First, this was a major improvement, since the chunks were not being completely generated from scratch, anymore. However, harddisk input / output tends to become a bottleneck very quickly. As it turns out, that was not even the biggest issue. Unity’s many flaws (compensated by its myriad of benefits) include the reliance on rather old Mono version, with its abysmally bad garbage collector. Frequently allocating large chunks of memory, e.g. for terrain loading, is therefore a surefire way to produce equally frequent, nasty spikes of performance drops when the garbage collector runs. Big no-no.

As a temporary solution, I simply do not evict any data, anymore. The memory footprint will appear high for a “simple” looking game, but at this time I am not willing to put in any more time into an issue which is largely out of my hands.

So, what will actually work now? Well, starting a game in one of the larger regions will take only slightly longer instead of multiple times as long as a small region start. When players move around the environment, more terrain is loaded incrementally, until the entire map resides in memory. Here is a little demonstration of the loading in the Unity editor:

The current settings in the standalone build should make it hard for players to overtake terrain building, so they should be able to seamlessly run from one corner of the map to the other. While this means that precious little time has gone into actual game features, the performance fixes will make testing a lot more bearable.

Speaking of testing, I have uploaded a new alpha build with all changes as of today. Check the forum and help me out, if you like.

Looking Forward

With the most glaring performance issues having been addressed, I have a good feeling about continuing on gameplay. Last week I mentioned the task system, especially its user interface, as a next big task for me. Next week’s goal will be enabling players to assign a “tend campfire” task to one of the companion NPCs. From there, I can iterate on the system and extend it for arbitrary tasks, as usual.

Thanks for reading and until next week.

20 May

Week 7 Recap

Looking Back

As mentioned last week, it was time for another look at the terrain. Previously, all geometry was generated procedurally from (relatively) simple algorithms. While this offers a maximum of flexibility, it is also a maximum of pain in the ass to implement and extend. I have changed the system to still create the basic terrain layout procedurally, but geometry is now made up of pre-built pieces which are then combined into a whole terrain chunk.

Work in progress terrain pieces

Work in progress terrain pieces

These pieces have lower complexity, because I made fewer subdivisions on their surfaces. Currently, this also means that flat ground areas look very bland. Some shader-magic and splatted normal maps will change that soon enough.

Terrain with new pieces

Terrain with new pieces

On the loading front I am still working on continuous terrain loading. First I had to switch to a different persistence solution. Now I am trying to find a way to load terrain without slowing the game to a crawl.

Looking Forward

I will continue working on the terrain until the whole thing runs somewhat acceptably. Initial loading times are already down by a large amount. Once the continuous loading is done, I will upload a new alpha build.

After that, I want to tackle the task system next. All characters in the game are supposed to be able to issue and work on tasks of all kinds. Players also need a useful interface to define their tasks. That will keep me busy for a while…

Thanks for reading and until next week.

13 May

Week 6 Recap

Looking Back

So, the last two weeks have flown by. First I have had some mental/physical health issues which stopped me in my tracks. I thought I was resistant to stress when working on something I love. I was mistaken. Stress-induced panic attacks are not fun. 0/10, would not do again. Luckily, I had a few days of vacation planned already just after breaking down. This week I had to start slow to keep the pressure low. Now I should be back in full swing.

As for the interesting part, I was still able to implement some good stuff. Object placement is now in a solid state, with spawning locations finally being consistent, correct and efficiently queryable. Consequently, players will not spawn below the terrain geometry, anymore.

I have also made some fixes to the player representation. Movement is much smoother, the player character now has an actually updated physical volume and cannot move through walls anymore… Additionally, character animations are now unified, which also affected NPCs. See the following, short video:

Compare that to the last video to see the small but significant progress.

As a last improvement, NPCs now have latent survival tasks. Finding and consuming food already works, albeit in a rather rudimentary fashion.

Looking Forward

Next week I want to make another iteration on the terrain. Running the game on a weaker machine is barely watchable. I will try to simplify geometry and retain detail using shaders. If time permits, I will also implement continuous terrain loading. In effect, this means that only the immediate surroundings of the player need to be loaded, while all other geometry can be replaced with simplified representations for pathfinding purposes.

This is a deviation from my plan to work straight towards an MVP. However, since I would like some testing feedback, I need to provide testing versions which actually run on medium performance machines.

Thanks for reading and until next week!

29 Apr

Week 4 Recap

Looking Back

I will keep the retrospective short this week. Reasons include the first alpha release and a hangover.

Another week of system building has gone by. From last week’s menu re-implementation I still needed to complete the actual placement of objects in the world. With that done, I can now put in new placeable objects in minutes. As another UI improvement I have made context-sensitive button icon displays on interactable objects. The system is still not completely fleshed out, but already improves usability for new players.

The big task this week has been enabling NPC behaviour based on tasks which they are signed up for. This meant coming up with a code architecture which lets me define behaviours for each task condition. Right now, there is only one behaviour: build an object (currently a tent). But again, I can now easily extend that to match any task and condition. Here’s a little sequence showing how objects are placed and NPCs haphazardly build their tents:

Looking Forward

Today I am releasing the first, extremely early and unfinished alpha version. I hope to get some bits of good feedback. If you are interested in a first look or even helping me out, consider registering on this site. This will get you access to the forum where I will post download information for any releases.

Next week I plan to improve NPC behaviour to make them look more alive. No more segway-driving lamp posts! Of course I will also keep track of testing feedback and work on the most pressing issues.

22 Apr

Week 3 Recap

Looking Back

Apparently I am really bad at planning tasks for my own work. Again I have found myself working mainly on code which enables the stuff I actually wanted to do. Fortunately, all the stuff I have done keeps making my job easier. Earlier this week I had shown off a screenshot of trees and little bushes on the terrain:


The addition of these props was a logical prerequisite of NPC survival behaviour: those guys need resource nodes to gather food and materials, hence trees for firewood and bushes for berries. I thought went a bit overboard with the prop system when adding it. However, when it came to making video material for today’s update, I was able to add two more kinds of props within a couple of minutes. Time well spent.

I put some more work into the task and quest system, which was actually planned. Again, adding some more steps and conditions is really easy now. Here’s a video showing off the slightly expanded first steps:

At the end of the video, I also demonstrated the completely redone context and building menu. I had done an iteration on that before I started the game in earnest, but decided to scrap that in favor of a cleaner version because I have learnt a great deal more about Unity, already.

Here is another video showing what happens behind the loading screen:

Looking Forward

I still want to release the first alpha version at the end of next week. I will invite a batch of testers in time. As for the game itself, I plan (hah!) to do the following:

  • Flesh out settlement quest
    • Add camp fire
    • Add tents for player and NPCs
    • Add stockpile
    • Start NPC survival mode
  • Start work on player-NPC interaction
    • Define and assign tasks
  • Filler stuff
    • Move pathfinding navigation data processing to loading scene
    • Day-night cycle

Thanks for reading and have a good week!