-
Notifications
You must be signed in to change notification settings - Fork 8
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
Prefabs Phase 1 #3218
Comments
Looking forward to this one. |
Hopefully this would be implemented before 2023 LTS |
At last, this is what I'm waiting for! |
I need it! |
Please add Nested prefab too |
Thats part of the design already ;) |
@stuckie A downside of this new format, that I hope y'all will consider if it isn't already too late: In the old format, all yy(p) files had a common key called This is particularly useful to deal with file formats changing over time, because it creates a discriminated union. Schema validation tools (like AJV for JSON or Zod for JavaScript) can use discriminated unions to infer which variant of a schema to use when validating a file. But only when there is a shared key with known values. If the format change just renamed keys for sorting purposes, rather than removing the common keys, I imagine that'd be about the same as far as GameMaker's parsing goes. But it would make it much easier to handle format changes for other tools. {
"$ResourceType": "GMProject",
"$ResourceVersion": "1.0",
"%Name": "..."
} Any chance that's something that could happen, or is the described change a done deal? |
Is there anything else that your tools would need/like that we could change just now? |
@stuckie I definitely understand not wanting to change it! I spent all day yesterday updating our tools for the new format, and I imagine y'all have to deal with a lot more consequences of project format changes than we do! Even though we've already updated our tools, having the known, constant keys is still preferable even if I have to redo a bit of that work, so I welcome the change. I don't think there's any other change I'd really be looking for. |
We have added resourceVersion and resourceType back in. The resourceType field will track the same as it always did - GMSprite, GMAudioGroup, etc.. So, because the versioning has changed, if you do need to rely on what version a resource is, you are best parsing the new top tag. |
Just to keep the chain updated, we've re-added the name field too, and I've added a Compatibility set at the bottom of the original ticket to explain this. |
Can't wait for this! |
Verified support added internally. |
Prefabs are the ability to reference one project from another, and only the assets used by the main project will be included in the game.
Any asset types will be allowed (though rooms may complicate this).
Prefabs may reference other prefabs (allowing for nested prefabs) but loops of dependencies are not allowed.
Phase 1 for prefabs will be the initial release with
Tools for adding prefab assets into your project within Room Editor / Sequence Editor.moved to Prefab Library #4681New format brief explanation
Example excerpt:
All records are in ALPHA SORTED order, which is a requirement.
Typed records are indicated with a leading TYPE TAG and space for a VERSION.
The version will be "" until we start using revisions, then it will be v1 v2 v3 etc
These will always be first in a JSON record (they must be!):
Objects with names will have a name field that is now called %Name to cause it to appear at the top
after the type tag:
The formatting is better, and should give a better Git Merge experience.
Git Merge MIGHT become a support issue because the fields DO NOW NEED TO REMAIN IN ORDER.
But actually that might help!
Compatibility
To keep some compatibility with previous IDEs, we have reinstated the following fields
resourceVersion - will be pinned to 2.0; please use the TypeTag if you are requiring to operate on a specific version.
resourceType - tracks the same as the TypeTag; GMSprite, GMProject, GMObject, etc..
name - tracks the same as the NameTag
This allows older IDEs to open the projects in read-only mode, but support will start to deteriorate as new resources and changes are made, so you should make use of ProjectTool ( Tools->Project Tool from the IDE ) to fully downgrade projects to an older version if required.
For the sake of clarity, this covers:
The text was updated successfully, but these errors were encountered: