Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Game Profile Metadata Configuration file for mutable global configurations #609

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

BenCheung0422
Copy link
Member

@BenCheung0422 BenCheung0422 commented Jan 9, 2024

This depends on #618
This will be done for 2.3 as this needs rewritten code from "class optimization" pull request
There are 2 places for the places of game version, in build.gradle and Game.java. This can lead to a chance of missing change when updating the game version. This adds a global profile config file for the whole project game_profile.conf. The in-game metadata file is generated by Gradle build directly. Eventually, only 1 place is needed to be updated. Also, furthermore profile meta data can be added into the config file in the future, in case needed.

TODO:

  • Incremental world version (purely numeric) mainly for save file version checking (Would depend on Separate HistoricLoad from LegacyLoad #618)
    • Mapping to build numbers with old versions (by JSON; key: version; value: world version)
    • Changing all usages of Version to world versions in Save/Load
    • Setting the first version with Minicraft+ Save/Load system as 100 as the world version
    • Configuring world version in game_profile.conf
    • For every change (even minor and patch) to the world save file content formats, the world version should be incremented once and maximally only once for each pull request (for ideal pull request).
  • stable check directly in game_profile.conf
    • isDev is no longer needed for Version
    • Controllability will be increased
  • Check for IDE can be used by use_editor in game_profile.conf
    • If the value is false, the code should not check for IDE; otherwise, IDE environment should always be considered.
  • Making version.json in jar on build
    • With id, world_version, stable, use_editor, build_time, series_id
  • A new class (with instance) saving the values in game_profile.conf in code on initialization.

(Edited on 2024/01/11)

Old summary

Currently, the auto build increments the version in 2 places, so this integrate this setting at this point. If there are more configurations can be added in the future, such can also be added. The in-game metadata file is generated by Gradle build directly.
For the change to the auto build, it now only increments the version within the config file, and it would handle for non-development build situations. When the version is detected as not "dev" (in version number), "dev1" is generated; when the build is not a development build by modifying the config file, neither a new nightly release nor version increment would be eventually pushed.

@BenCheung0422 BenCheung0422 marked this pull request as draft May 1, 2024 15:41
# Conflicts:
#	.github/workflows/autobuild.yml
#	build.gradle
#	src/client/java/minicraft/core/Game.java
# Conflicts:
#	src/client/java/minicraft/saveload/Load.java
#	src/client/resources/assets/localization/en-us.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants