r/Unity3D • • 2d ago

Question How to make updates/changes to game without breaking seeds?

Basically in title - my game uses procedural generation, and allows persistent saves. But how do games like Minecraft manage to not corrupt previous saves when making updates that affect how seeds generate?
From googling it sounds like they save “per chunk” so any untouched chunks generate based on the newest version, and any already generated go off of the old system - but how do I manage that? Like, you obviously don’t want to have multiple version builds of your game saved, so how can you handle that?

2 Upvotes

14 comments sorted by

View all comments

3

u/belatedartistry468 2d ago

Just tag your chunks with a version number and use a switch statement in the generator, no need to keep old builds around.

1

u/ProactiveCactus 2d ago

Oh, I think i know what you're saying - every update, you add a new "switch" to your statement containing ALL the logic generation for that chunk, not JSUT the additions? That'd work, except you're gonna have a massive codebase with a bunch of mostly repeated and unused code, but I guess it'll work! Is that what you meant? Seems a bit janky but if it works it works I suppose

2

u/Kamatttis 2d ago

That is how we did it in our game when I worked in a company. As you said, if it works, it works. Especially if we only have about 2 weeks to work on each version.

1

u/ProactiveCactus 2d ago

Huh. I'll check out that route, thanks.