Skip to content

Conversation

@NeylMahfouf2608
Copy link
Contributor

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

return this._cachedGameResolutionHeight / 2;
}

getIsLoadingRequest() {
Copy link
Contributor

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
Contributor

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
Comment on lines -89 to -94
if (oldObjectData.width !== newObjectData.width) {
this.setWidth(newObjectData.width);
}
if (oldObjectData.height !== newObjectData.height) {
this.setHeight(newObjectData.height);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why removing this from the hot-reload?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like a mistake. It should not be removed, it's different from the network sync

Comment on lines +251 to +253
if (networkSyncData.d !== undefined) {
this.setDepth(networkSyncData.d);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this already done by RuntimeObject3D?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Indeed it should, I don't think we need that, the super() call should handle it.

@4ian 4ian force-pushed the master branch 3 times, most recently from 8a32fc5 to 846afd9 Compare August 30, 2025 12:16
@ClementPasteau
Copy link
Collaborator

Closing in favor of #7811 for a clean start

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.

6 participants