kakaragame / Kakara

The Kakara base game consisting of the client, engine, common game and server modules.
MIT License
3 stars 0 forks source link

Serialization implementation version support #85

Open wyatt-herkamp opened 3 years ago

wyatt-herkamp commented 3 years ago

The serialization of objects needs to be have a versioning format.

What I mean by that is that basically all classes that deal with serialization of Game Objects(Chunks, Game Block, ETC) needs to be a version package format.

For example org.kakara.core.common.serializers.gson.v1.NameKeySerializer Instead of the current method. So in the future we can have a v2 if needed. This will also be applied to the ChunkWriters.

If we were to make a v2 of the chunk writer. The game would do an update that includes.

Inside a world folder and save folder will be a serializer-details.properties. That will contain the version. Or a custom path to a serializer if the user wants.

This will also apply to save.json, world.json, and any other config type system we have.

P.S Ryandw11. Until we our out of PreBeta we wont worry about making new versions we will override the old version. Due to no one should be using the game until we hit a beta stage of development.