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

Platform info in serialized SB3 files #205

Merged
merged 5 commits into from
May 9, 2024

Conversation

JeremyGamer13
Copy link

@JeremyGamer13 JeremyGamer13 commented Apr 21, 2024

Proposed Changes

Adds a platform object to the SB3 save files.
The object can contain arbitrary info about the platform (in this case TurboWarp) if the project is loaded in other Scratch-like editors.

Reason for Changes

The goal of this addition is to allow TurboWarp and other forks of it to use this information in the case that the user is loading an unsupported project from another platform. The purposes of each parameter is as follows:

  • platform.name: Used as a user-friendly way of stating where the project came from.
  • platform.url: Can be used in the case the user needs a link to the original source of the project.
  • platform.version: Can be used in the case a TurboWarp project is loaded from an experimental site (ex: staging.turbowarp.org) into the main site. (although, may be removed in favor of meta.vm if breaking changes require vm updates)

The hope is that other TurboWarp forks will update this information when they rebrand other parts of the editor.
It would also be hopefully possible to implement a warning message when the user is loading a project from an unknown platform, similar to Custom Unsandboxed Extensions. This would be useful to prevent invalid SB3 files from causing errors since the user will know the file is from another platform (and which exact one) and may contain unrecognized/invalid blocks or missing data.

Test Coverage

None seem to be required, but can be requested if necessary

@GarboMuffin
Copy link
Member

ok, I think i'll do it next weekend

immediate feedback is that having a stable/staging version field is kinda useless as those are both moving targets. put whatever in meta.vm instead if you want, but I do like having very minimal fingerprinting potential in the json

@JeremyGamer13
Copy link
Author

removed the version field, sounds good

@GarboMuffin GarboMuffin merged commit 31c9eba into TurboWarp:develop May 9, 2024
1 check passed
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.

2 participants