- It works on a 2D grid. Now, Going Medieval's terrain is made out of voxels, which is a 3d grid, but it's easy to add a 3rd dimension into the existing algorithm. Having fantastic programmers helps, too.
- These models are generally simpler and require less computing power. This makes them ideal for quick simulations, where you can change the rules to explore different fire behaviors without needing complex calculations.
- It's easy to add randomness due to its adaptability to different patterns. Cellular Automata is great for capturing irregular patterns of fire spread, like when the fire jumps between patches of vegetation or changes shape due to obstacles. It handles these kinds of “messy” patterns better than wave propagation, which is more suited for smooth, continuous waves.
- Voxel health - Anything burnable (trees, grass, buildings) has health > 0
- Flammability - Indicates how fast things should burn.
- Flame intensity - Represents size and strength of fire and is between the range of 0.0 - 1.0. If the value is greater than 0, fire will burn. It will appear as a small fire with less strength if it has lower values. The closer it gets to 1.0, the bigger the size is and its strength.
- Wetness - Affects voxels that are moist. This moisture slows down burning, may even stop it.
With a couple of shaders, it was time to upgrade it visually:
[previewyoutube=8dtioSjziqQ;full][/previewyoutube]
As the fire burns, it gradually damages the objects around it. However, to keep the game running smoothly, this damage isn’t applied immediately inside the fire system. Instead, fire damage is collected and applied later, outside the main fire logic, to avoid slowing down the game.
The game waits a few frames before applying this accumulated damage to objects in the world, which helps spread out the computational work. When the damage is finally applied, the health and flammability of each affected voxel are updated, so the fire system stays in sync with the current state of the world. Once applied, the accumulated damage resets to zero, and the process repeats as the fire continues.
Because of this, fire data will be stored in the save file the same way we store water - separated from data of all other game systems. That means if you get into an overwhelmingly heated situation and don’t want to deal with it gameplay wise, you will be able to delete all of the fire from your save. More on that once the update goes live.
But there is also still so much to talk about! This was just a fun (we hope it was fun) talk about fire movements. Next week we’ll discuss how to control fire spreading in the game. While you wait, let us know if this MMT was understandable as it went into more behind-the-scenes detail than we usually do. See ya in seven days and until then…
Stay medieval!
[url=https://store.steampowered.com/developer/foxyvoxel][i][b]Foxy Voxel[/b][/i][/url]
[url=https://discord.gg/goingmedieval style=button]Discord[/url] [url=https://www.reddit.com/r/goingmedieval/ style=button]Reddit[/url] [url=https://x.com/going_medieval style=button]X/Twitter[/url] [url=https://bsky.app/profile/foxyvoxel.bsky.sociall style=button]Bluesky[/url] [url=https://www.tiktok.com/@going.medieval style=button]TikTok[/url] [url=https://www.facebook.com/FoxyVoxel style=button]Facebook[/url]
