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

Game over block: made saveAllScores take the scoring method #1480

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

srietkerk
Copy link
Contributor

Needed for: microsoft/pxt#10041

This is a small change to the game over block to include the scoring method in the event that game over sends to the simulator. The event that was modified only gets used by the kiosk.

@srietkerk srietkerk requested a review from a team July 15, 2024 23:24
"scoringType": allScores.length ? scoringType : "None"
}

settings.writeJSON(allScoresKey, scoresObj);
Copy link
Contributor

@thsparks thsparks Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not totally familiar with how setting/reading these settings works, but will we hit compatibility issues with games that are shared before the update which someone then tries to play or import into kiosk after the update, since we're changing the structure of the data here?

If it's just an issue with importing into kiosk, that may be fine. But if it somehow breaks the game loading at all, that'd probably be an issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it does cause issues, a potential fix could be to save this with a different key and change the loading logic to account for both (giving this one priority)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be misunderstanding your question, but I made sure to have backwards compatibility on the kiosk side. If the JSON that is received by the kiosk doesn't have an entry for "allScores" we just parse the JSON and use the entry like we did before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, and it's important to note that this key is not being used anywhere else, only for kiosk.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we release arcade, both kiosk page and simulator are released together. I don't see a compat issue even if the formats of communication change. I don't know of any other host using these at this moment other than kiosk

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abchatra I was more concerned with games shared before the update being imported after the update (like games on the home page, for example).

But from Sarah's comments, seems like it'll be fine regardless. Thanks for the info!

@srietkerk srietkerk merged commit 425a790 into master Jul 19, 2024
4 checks passed
@srietkerk srietkerk deleted the srietkerk/game-over-score-type branch July 19, 2024 17:23
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.

3 participants