Skip to content

Snapshot Save Single Action #7500

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

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

NeylMahfouf2608
Copy link
Collaborator

Save and/or load the whole game using the updateFromNetworkSyncData/getNetworkSyncData methods to write/read a complete JSON. Done in one action for each (at the moment, might change). Right now it writes both on a localFile and localStorage of the browser.

@NeylMahfouf2608 NeylMahfouf2608 requested a review from 4ian as a code owner March 24, 2025 16:28
this._loadStorageName = storageName;
}
if (sceneVar) {
this._loadVariable = sceneVar;
Copy link
Collaborator

Choose a reason for hiding this comment

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

are those values cleared the next time we use the function without the sceneVar and storageName?

If not, I think we should always set the value from what's coming from the props of the function.
This will allow setting undefined or whatever string/variable is passed

@@ -650,6 +662,10 @@ namespace gdjs {
return this._cachedGameResolutionHeight / 2;
}

getIsLoadingRequest() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be named getIsLoadingRequested for consistency purposes

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or just isLoadingRequested

@AlexandreSi AlexandreSi force-pushed the snapshot-save-single-action branch from f65e7ec to 31d9ff4 Compare April 29, 2025 16:27
@AlexandreSi AlexandreSi force-pushed the snapshot-save-single-action branch from 32fdbd2 to 03dec17 Compare April 30, 2025 09:50
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.

4 participants