Post

I'm slowly approaching something that feels like a reasonable save system... data is stored as JSON-like structures, with per-datatype validation tables to validate that stuff has reasonable values and all mandatory values actually are in the files when loading them. #gamedev #indiedev #JRPG

It might seem like overkill, but one of the core issues with my progen world chunk system is that tons of very DIFFERENT things can be in a chunk, and I only want to save certain types of data (objects have a lot of temporary cached stuff, like e.g. VRAM palette texture references)

Then some entities have a lot more data than others - e.g., shopkeepers need to store their entire inventory, because each one has a randomized selection and they will hold onto buybacks for a while so you don't accidentally lose rare items. And being NPCs, they also need to store their visual info.

I can't just stow them away in predefined city data, because cities are also fundamentally just map chunks, and most of them are procedurally generated too instead of being preset.

Oh, and items are also pretty complicated data structures on their own, since there's several systems that randomizes loot. Rarity, prefixes, upgrades the player has applied, personalized skill loadouts, ... (potions, materials etc aren't using most of this data so they're way more lightweight)

0 reposts2 likes

No replies yet.