Code Monkey home page Code Monkey logo

Comments (3)

krs013 avatar krs013 commented on May 18, 2024

As long as the scenario object can read older versions and fill in the gaps, I think it would be ok, right?

Provided the file is not too tightly coupled with the object itself, it shouldn't have to be changed often in destructive ways. Internal changes to the game can be handled at the object layer.

In the case where there are enough changes that we need a generalized updating, perhaps we could devise some mechanism by which a new class can inherit or extend its old version... but that sounds complicated enough that it would only be fun, but not useful. 😬

from imperialism-remake.

Trilarion avatar Trilarion commented on May 18, 2024

About the scenario file version number, one question is if it should be the same as the game version number or if it needs to be more fine-grained. It would mean that we could introduce a new file version only if the version number is also increased.

Regarding the updates of older versions, I would chain them. Kind of writing a updater from last version to this version, and then upon loading of an old version apply the incremental updates in a chain. This should be least effort but can lead to some losses, if e.g. we remove a feature and then add it again in the course.

Overall, I think, it highlights the importance of thinking carefully and designing the scenario data structure (the file is mostly just a yaml representation of the data structure) in such a way that it doesn't need to be changed often.

from imperialism-remake.

krs013 avatar krs013 commented on May 18, 2024

To your first point, I think that is one of the stipulations of semantic versioning, so it seems appropriate.

from imperialism-remake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.