Commit 38cd6c4d

– Add togglable object mechanics (WiP, mostly done)
– Add temperature selection for temperature modifying objects
– Extend the Python API to support modifying temperature modifiers properly
– Add a configuration option to enforce debug logging in release builds

Relates to #69, #56

Hello, while this is a rather substantial change I will refrain from creating a video for now, enjoy this screenshot instead:

The reason for this is that the topic is not quite done yet, and I would rather present it when it is working without any (known) quirks. The basic mechanic is fine, but due to some regressions when updating room data it may lead to crashes if things are being done in a certain order.
Getting this off the ground required the usual extensions of the Python API, as well as implementing some new functions on the C++ side to make it happen.
While doing so I also realised I definitely need to properly support multiple temperature modifiers on the same tile. A fact that I, for some reason, convinced myself at first is not necessary. Oh well.

The other headliner here is that it is now possible to override the standard setting of not having debug style output in release builds, it can be enabled by setting force_debug_logging to true in the config.json.
Byee 🙂

Commit 82e217cb

– Only slowly change an agent’s temperature depending on its surrounding temperature
– Boost the temperature by 5+C when the agent is lying down (presumably covered up)
– Slowly decrease HP if the agent is above or below its allowed temperature range

Resolves #61

Hi! I initially wanted to take a video for this commit, but as it turns out, looking at bars go up and down isn’t exactly riveting to watch 🙂
That being said, you better get those agents into a warm, cosy house at night (or into a bed), as otherwise they might suffer from hypothermia. Ouch.
Next up will either be a quick bugfix or two or build the temperature selector for temperature modifiers, the next few days will tell. Byee! 🙂

Commit 74d7304f

– Extend Python API to support object specific temperature functions
– Add some glue code to the GameState to allow passing of the current tile temperature to the Python side
– Add a very simple WiP implementation on the Python side that just uses the current tile temperature as the object one
– Make the linter happier
– Play around with some constants in regards to temperature propagation through walls (feels more realistic now)

Relates to #61

Hello! While not exactly atomic in nature, this commit is mainly about getting the temperature calculation going. The actual “calculation” as such is simply done assigning the temperature value of an agent’s underlying tile to the object itself, but bulk of the work here was setting up all the right values without getting too much of a performance hit.

The latter can happen since this code is being executed on every tick and calls from C++ land to Python (and vice versa) can end up in more overhead that one may initially anticipate.

To somewhat mitigate this effect the pre-fetched value is being passed when calling to the tick handler from the C++ side, even though the Python API could simply fetch it on its own, in order not to make yet another call on every tick.

You can check out below what that currently looks like:

Next up will be writing some actual logic to make it feel a bit nicer, but I probably won’t get hung up on too many details here, as there is another ticket or two (or three) to be done overall before the temperature topic can be considered more or less done. Bye. 🙂

Commit 6238532c

– Finish work on the “show value in range” status bar
– Re-do code that does the colour calculation for the absolute value status bars
– Draw a visible border around both types of status bar

Resolves #60

Hello and happy new year! This commit finishes off the work started in the last commit, but also brushes up the existing StatusBar some more:

Before
After

As you can see the colours shown for the different states make a lot more sense now, as well as adding a border and changing the default background colour to a plain white make it look a lot cleaner. Overall, I really like the new look!

The next step will be actually calculating a value for the shiny new widget. Byee!

Commit 70750c1d

Add new UI widget that shows a current value on a range (WiP)

Relates to #60

Hello, this commit adds the ground work for the new UI widget similar to the existing StatusBar. Unilke the StatusBar though it will show how a passed value is doing in relation to a pre-defined range, as well as using configurable colours for that range:

As you can see right now there is no indicator yet, worse even, sometimes due to a race-condition it is rendered black, but I felt it’s a good point as any to make a quick commit. See you next year!

Commit e2fa1fe7

Implement temperature modifiers for non-room tiles (aka”outside”)

Resolves #62

Hello! This commit, unlike what the slightly commit confusing message says, does not actually implement temperature modifiers for the “outside world”, but actually lets the already existing modifiers have an effect on the overall tile temperature information.
The entire bookkeeping aspect was already fully (albeit slightly buggy as it turned out) implemented, the modifiers simply did nothing, that is however different now as can be seen on the screenshot below:

Next up the focus will go on the UI, as a new element will be needed to show the temperature state of the agents, depending on their tile position (temperature of the tile they are on). Stay tuned for that change, byeee. 🙂

Commit 3e49fbda

Move the task of spreading temperature changes from the modifiers to a more generic solution

Relates to #62


Hi! This commit changes the way the per-tile temperature is being calculated, before it was the temperature modifier’s responsibility (e.g. a radiator that generates heat) to, well, radiate heat from its point of origin.
This approach was changed so that the temperature modifier is only changing the temperature of the tile it is being placed on, the propagation (and subsequent drop-off) of that is being done by doing a weighted averaging of the surrounding temperatures for every tile.
Walls have a very insulating effect, doors and windows less so. Since a picture says more than a thousand words, look at the following picture:

Even though I cleverly choose a bad lighting situation, you can see three distinct heat sources (radiator objects) here, all the rooms (except the one at the top right) are connected by doors, so you can actually see how the heat is spreading through the building “naturally”. 🙂
Next up is doing something similar for the outside world and trying to figure out how to implement heat pumps the best way, but hopefully that should not take too long. 🙂

Commit 4ffc5f9e

Partially implement per-room temperature calculation

Relates to #62


Hello! Finally there are some visual changes as well:

What can be seen here is the temperature modifiers working as intended, the heat is then spread out by calculating the average around individual tiles. What this is still not doing this is:

  • Take a time aspect into consideration, the effect is immediate
  • Differentiate between “air” and “walls”, so there is no insulating effect yet
  • Support heat pumps properly

So the ticket is still far from done, however finally useful progress can be seen. 🙂

Commit 568295a3

Automatically re-assign temperature modifiers when the room topology changes. Refactor the object-to-modifier mapping code on the game state.

Resolves #64


Hi! This commit came a fair bit quicker than the previous one 🙂 This finishes the legwork of having all the different modifier information in the right place, so next up is actually using all this data and calculating per-tile temperature values, then finally one should be able to see visual differences when activating the temperature view. Stay tuned!