July 2020 - Week 43 - Sowing
Summary
- Job-system refactor
- Combat audio balancing
- Flex-box with TDD
- Music update
- Three crops for farming
Detail
This week has been all about farming and the cold, bleak winter music. Back in week 24 when I was adding stockpiles, I mentioned the job-system needed refactoring. While adding farm-jobs I found myself about to duplicate behaviour that the existing job-system already did. So now is the time to do that refactoring. The plan is to organise collections of jobs into providers. Each provider is keyed on a responsibility so that when prioritising of responsibilities per Dwerg is added the system will support that. Parts of the existing system can be shared between providers and parts can be moved into a general provider. Move jobs are an exception as they take priority over all others. My first step in doing this refactor was to add comments to each function indicating what needs to be done. This game me a refresher on how the current system works and allowed me to think through the new system. I've since extracted the move-job-provider and all the tests pass, so the next step is to make the general job-provider.
To help Frans balance the combat audio I made a short trigger and script that continuously spawned dire-wolves. It was encouraging to be able to use scripts for testing in development. While doing this I added a bear behaviour to attack dire-wolves, they are notoriously natural enemies.
Over the weekend I continued work on the flex-box implementation in my UI system. I'm developing this using TDD as an exercise. The UI system does not have any tests around it as I, mistakenly, thought that unit tests around UI code is a bad idea. I think that is true for producing UI with a system because the product is entirely visual. Developing the system itself can be done with very simple elements so unit tests are a quick way of verifying behaviour. The next time I do some UI work that uses my flex-box-layout I'll let you know how successful it is.
We've finally decided to loop the background music continuously rather than just play it once per day and night. Frans has finished the winter music and it has made me really want to develop the weather system further so we can have snow. I'm going to restrain myself here as the current goal is to make the game fun.
Farming work has started with three different crops; blueberries, oats and potatoes. Blueberry seeds are now dropped when a Dwerg eats blueberries and they can then be planted. These three crops are each an example of fruit, cereal and vegetables respectively and they each behave slightly differently. Fruit can be eaten immediately and the plant remains after harvesting. Cereals and vegetable both have multiple tiles indicating their growth with the final tile being specific to the type of crop. Cereals are removed when harvested and must be processed to get seeds and food. Vegetables provide seeds when harvested and some of them will be immediately edible while others will need to be cooked. For this first implementation of farming only blueberries will be useful as the processing and cooking are not currently possible.
For the next week Frans will be working on night-time variations of each of the seasonal music tracks. I'll be finishing off the farming and extending the second tutorial to cover it. There will be a new release next week so I'll also be fixing the release pipeline.
Get Dwerg Saga
Dwerg Saga
Mine out a home for your Dwerg clan, play with friends on a LAN. WIP.
Status | In development |
Author | haikuinteractive |
Genre | Strategy |
Tags | 2D, dwarf-fortress, Massively multiplayer, Multiplayer, Procedural Generation, Real time strategy, Sandbox, tile-based, Top-Down |
Languages | English |
More posts
- Release 0.23.0.3Nov 07, 2023
- Release 0.23Jul 01, 2023
- Release 0.22Feb 15, 2023
- February 2023 - Weeks 165-180 - ContractingFeb 14, 2023
- November 2022 - Week 167 - New LogoNov 12, 2022
- October 2022 - Week 164 - UpdatesOct 23, 2022
- Release 0.21Oct 17, 2022
- October 2022 - Week 163 - HoldingOct 15, 2022
- October 2022 - Week 162 - Game PanelsOct 08, 2022
- October 2022 - Week 161 - Context MenuOct 01, 2022
Leave a comment
Log in with itch.io to leave a comment.