World Forge Progress
Happy new year to all of you! No rest for the wicked though, as the gamedev marathon keeps going on and on. So, more work towards the World Forge this week!
Before that, just to mention that Sigil of Kings retrospective is up!
The last biome-related bit of the World Forge is done, which is the vegetation. In terms of major painting features, what's missing is placing roads and cities. And then, it's basically about making a UI to support all this nicely.
GPU-powered modifications
When a change happens in the overworld data, e.g. via a brush in the World Forge, or later on in the game, because of some event or a spell etc, the "pretty" version of the overworld data gets rebuilt. For example, locating all the positions that we should have mountain tiles, and choosing which mountain tile to display and what color should it be, or where do we have which vegetation tiles. All this work happens in compute shaders running in a "local" rendering device. This is much faster than it used to be, but there's still some room for improvement, as I still have to copy some data around because data generated in the "local" rendering device cannot be directly used for the "main" rendering device, which means some unnecessary GPU -> CPU -> GPU memory copies, of several megabytes worth of data, every time we make a change. But still it runs fast enough on the desktop, so that you can make changes and rebuild the "pretty" version instantly, which was originally a "nice to have" sort of goal. There is allegedly a way to share resources between different devices, but it's not super official or documented, but might worth a try, to allow this to run smoothly on older machines.
Editing route map
Biome is done, and I have 2 main things left for the world forge: editing the route map (the default being all city-city connections) and editing the actual cities. There was a bit of refactoring work for the route map editing, since code was a bit stinky and didn't support edits. New code is a bit better! One little detail is that custom routes are just visual for now. Road highlighting is also possible, as roads behind mountains or in some terrains are quite hard to see.
Starting from scratch
It was actually easier to start this World Forge mode from a procedurally generated map compared to a clean slate, but that's now done too.
Pending
What's left for the World Forge mode?
- Placing cities
- Setting arbitrary key/value pairs in cities
- Save/Load maps
- Export maps to JSON for DIY processing/visualisation
- Sprites for vegetation for some biomes, as I'm missing a few
- Polish, I guess
That's all for now, over and out for now!
