Development Blog

Goal Oriented Action Planning

Posted on

So I had a problem. I was moving merrily along with a task system based on state machines. And it was becoming an unreadable nightmare. It started out fine. An object is lying loose on the floor of the station. The task dispatcher is aware of the object and wants to store it in a stockpile. So it pulls the object out of its object list and creates a PickupAndStoreObject task. Works fine. Until the what-ifs start. What if the stockpile is de-zoned mid task. What if the entity assigned the task suddenly goes into a starving state and wants to find food instead. What if the item is iron ore and a smelter on the station is looking for iron ore as a raw material.

These are all fine cases. They can all be handled. But now start thinking about inter-dependency between tasks. Between tasks and entities and objects. Initially, I just broke down the task into the smallest possible sub-tasks. PickupObject. MoveToLocation. StoreObject. But each subtask would put the entity into a different state. And the tick loops for my entities were getting insanely long.

Luckily I stumbled on this site

Unwittingly I had been preparing for this. In Goal Oriented Action Planning, a goal (store item in stockpile) is comprised of independent actions. Each subtask would become a self-contained action with all the knowledge of how to execute contained in the action itself. Prerequisites and results would let the actions know how to relate to each other and a Goal planner would be able to find a path tree through multiple actions to achieve its goal. The entity would need to know nothing about execution and would only need a state for working action. The task would tell the entity model what cosmetic states to select. By adding a cost value to every action we can also dictate which actions will be preferred. Prefer taking the iron to a smelter over storing it in a stockpile for instance.

It took me a few days to rework my whole task system but its going to pay dividends. Adding a new action type will be trivial now top gaming chairs. I can even add and remove usable actions to an entity on the fly based on game circumstance. I recommend anyone doing complicated state machine for AI entities take a look at this approach instead.

I’ve got two artists creating assets for the game now so I’m planning for next update to contain concept art and new models to make up for no new pics this post.

Development Blog

A Look into Crew Needs Mechanics

Posted on

Today I want to talk about the needs system, as this is what I am in the middle of implementing and balancing. I’ve modeled Dwarf Star’s needs off of The Sims, as I like the way that system works. The six needs in my system are Energy, Hunger, Thirst, Bio, Social, and Entertainment.

Energy, or fatigue, is pretty easy. The harder your crewman works, the faster his energy will deplete. Energy is restored by relaxing and sleeping. The quality of the rest is modified by furniture available. A high quality bed will be more refreshing than sleeping on a pile of rags, but starting out your crewmen will just have to make do.


For hunger, I’ve come up with a system of hydroponics. Your station will start out with the seeds for a couple of plants, potatoes and lettuce perhaps, and be able to grow those in a basic hydroponics bay. Your food types can be expanded later through traders and raider loot. This food will need to be prepped in one of several kitchen work stations. I’m going to have fresh food cold storage and some type of preserved ration food type.

Thirst is self explanatory except for a water source. Comet mining provides ice to the station which can then be stored in the water tanks. I’ll also be adding a machine soon to split the water and provide hydrogen for ship fuel and oxygen for station needs.

Bio is just the bathroom needs. There are a handful of bathroom structure types for use in relieving this. I’m also thinking of adding cleanliness as a need and putting in showers but this might be a bit further down the road.

I’m implementing a social interaction model. Crew interact with each other and form opinions about one another. I’m also putting in some social entertainment options to give to social and entertainment needs. I definitely think the mess hall needs a dom-jot table.

Entertainment, or maybe joy or happiness, is affected by all other needs. Specific entertainment structures are available to refill this need. Happiness will also be increased by the quality of the environment and of the crewman’s quarters.

Adding needs has been the most enjoyable part of game development for me so far. I’m basically adding personalities to my little people and its making the game infinitely more playable. Once needs are finished and I complete the majority of the combat systems, the greater part of the game systems will be in place. At that point it will be more about integrating all the planned content and balancing the tech tree. I’ve also just recruited a character artist. As soon as I have real character models and not just Unreal Engine’s mannequin, I want to start uploading some video of gameplay.


Development Blog

An Introduction to Dwarf Star

Posted on Bed

This is my first official development blog entry for Dwarf Star and I’m going to use it to introduce the game. When I first set out to make this game a little over a year ago, I knew I wanted a base builder, but I wanted to add something new to the genre. My initial prototypes were ground based but I quickly decided to move the game into space. At the time I had played tons of Dwarf Fortress and Rimworld, and had never even heard of Spacebase DF9. I came up with a game that would take place on a space station and in the surrounding star system.

In Dwarf Star, you will manage a small but growing crew through a multitude of hazards. Resources will come from asteroid and comet mining in purpose built space craft. Refining these minerals and gasses on your station, you will be able to build all kinds of improvements and expand your station footprint outwards. I envision a tech tree requiring rarer and rarer minerals, as well as more and more high tech equipment on station. This will become available to build as your crewmembers’ specific skills level up.

The crew management system is currently modeled most closely to The Sims. Each crewmember will have to balance fatigue, hunger and thirst Lalafanfan duck, biological needs, social interactions and entertainment. Somewhere in there they will need to find the time to do their jobs as well. Let needs go unfulfilled for too long and your crewman might become unhappy, depressed or enraged, or might just die off.

Space is a dangerous place. I’ve put in place an air pressure model on the station. You will need simple duck drawing to manage oxygen supplies to keep everyone alive. Entrance and egress is through working airlock rooms. Damage to the station walls could result in explosive decompression of some compartments. In addition, raiders will periodically attack your station as it becomes more prosperous. These attacks may result in stored items stolen, crewmen captured, or extensive damage to your station. I also envision a trade system, with friendly traders docking at your station to make deals.

Ships will dock inside hanger bays on the station. The mining and space combat portions will take place on a larger scaled map showing some or all of the solar system. Asteroids will need to be surveyed and mined for precious resources, and raiders’ ships will need to be fought off before they can dock onto your station.

Dwarf Star is currently in a semi-playable state. If I can keep to my current schedule, I hope to have a development release available to a limited group in February or March. We’ll see how this goes. In the meantime, I’m planning to use this dev blog to detail what’s already in the game and what features I’m currently working on or plan to put in. I’m really excited to be making this game, and I look forward to everyone’s responses.Dwarf Star Logo