chrisknepper / Fractionauts

An educational game for the XOPC that teaches fraction operations with rockets.
Other
8 stars 7 forks source link

Load levels from text #25

Closed valeatory closed 10 years ago

valeatory commented 11 years ago

Store level parameters in an easily editable text file that the game can read and generate multiple levels from, to keep hardcoded numbers separate from the abstract game functionality.

Nolski commented 11 years ago

We should also write up some documentation on the format of these files.

Nolski commented 10 years ago

I was thinking something like this (in json)

{
    current_game: true,
    current_level: 0,
    levels: [
        {   
            options: [
                "1/4",
                "-1/2",
                "-1/3",
                "2/3",
                "5/6"
            ],  
            answer: "8/9"
        }   
    ]   
}

Any additions to the information we should be storing?

Nolski commented 10 years ago

@chrisknepper @valeatory @ExplosiveHippo @Waterseas

Nolski commented 10 years ago
valeatory commented 10 years ago

Documentation on the format of the files is already a separate issue: https://github.com/chrisknepper/xo-fractions-game/issues/29 If player data such as score, levels completed, etc is to be stored at the moment, it should be in a separate text file, because one should be edited by people, and the other is edited by the game. Since storing play-time variables is a separate issue from loading levels, and is used in a fundamentally different way, I would go so far as to suggest that it be added as another issue in the issue tracker instead of adding it here.

valeatory commented 10 years ago

For now, that level format looks good as it will give us the ability to create a lot of testable levels quickly. Randomization can come later.