TurboWarp / scratch-vm

Scratch VM with a JIT compiler and more features
https://turbowarp.org/
Mozilla Public License 2.0
75 stars 72 forks source link

Platform info in serialized SB3 files #205

Closed JeremyGamer13 closed 5 months ago

JeremyGamer13 commented 5 months ago

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:

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 commented 5 months ago

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 commented 5 months ago

removed the version field, sounds good