Development mode: Resources are stored on disc in source control friendly formats (json instead of binary, etc) in individual files
Production mode: Resources are bundled into larger bundles with sidecar manifest files. Resource managers load entire bundles to speed up load times
Resource managers should be initialized with the proper loader at startup (ie in main).
Build out a bundling framework that does the following:
Ingests a set of directories to bundle
Bundles all resources and outputs bundle files and manifest files
Can be configured with file paths and patterns to ignore
File handler functionality: Default handler just copies file as-is into bundle. Custom handlers can convert json to binary etc.
Some mechanism to determine which bundles to put files in
Files that are likely to be needed together should be bundled together
Files should not exist in more than one bundle
Perhaps file handlers can return a set of dependency files (ie tileset -> image/anim set -> spritesheets) and the bundler can use the dependency tree to decide which bundles to create
Perhaps file handlers can do the bundling themselves. ie tilesets get their own bundles. maps get bundled with their deps minus the tileset bundles. Manual bundles for other resource types ie misc images, audio, etc.
Want to support 2 states:
Resource managers should be initialized with the proper loader at startup (ie in
main
).Build out a bundling framework that does the following: