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

Refractor the save.json and the code which come with him #11

Open
4 tasks
naulan-chrzaszcz opened this issue Dec 24, 2022 · 0 comments
Open
4 tasks

Refractor the save.json and the code which come with him #11

naulan-chrzaszcz opened this issue Dec 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@naulan-chrzaszcz
Copy link
Member

naulan-chrzaszcz commented Dec 24, 2022

before

{
    "PowerUpInventory": {
        "1": null,
        "2": null,
        "3": null
    },
    "Position": [
        16,
        128
    ],
    "GraphicsDriver": "AMD Radeon(TM) Vega 8 Graphics",
    "ResolutionsAvailable": [
        [
            1920,
            1080
        ], ...
    ],
    "ResolutionEdited": true,
    "Score": 0,
    "State": "little",
    "Coins": 0,
    "Life": 4,
    "Who": "MARIO",
    "ControllerCalibrate": false,
    "Resolution": [
        1280,
        720
    ]
}

After

After #14 done, we need to rewrite how to save the player data.
We need to store the file into %AppData% for Windows environment and ~/.SuperMarioBros.3 for Linux environment because before the save.json is stored into res of game code source and we don't have the possibility to had different save between computer or between user (It do to delete the save.json into res, not really user friendly)
As the MapsGenerator, maybe the json format is to heavy.

inventory=null,null,null
position=16,128
...

Had a text file is better to fast read.

Render save.json to oriented object

  • inventory.py
  • state.py
  • position.py
  • save.py
@naulan-chrzaszcz naulan-chrzaszcz linked a pull request Dec 24, 2022 that will close this issue
@naulan-chrzaszcz naulan-chrzaszcz self-assigned this Dec 24, 2022
@naulan-chrzaszcz naulan-chrzaszcz removed a link to a pull request Jan 29, 2023
@naulan-chrzaszcz naulan-chrzaszcz removed their assignment Jan 30, 2023
@naulan-chrzaszcz naulan-chrzaszcz changed the title Render save.json to oriented object Refractor the save.json and the code which come with him Feb 1, 2023
@naulan-chrzaszcz naulan-chrzaszcz added the enhancement New feature or request label Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant