You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What it boils down to is I'd like a way to use the existing AssetLoader pipeline to load in game data files (e.g. character stats, random level data, whatever) stored in RON files. I could be wrong here, but I think this is distinct from using the scenes feature because its more likely to be static / resource type data than something you instantiate as game entities.
My idea was essentially to implement a generic DataFileLoader asset loader which looks something like this:
The current AppBuilder::add_asset_loader function takes 0 arguments and FromResources to create the loader instance to add. I'm proposing adding an AppBuilder::add_asset_loader_from_instance function that allows providing a concrete instance of an asset loader, and would be used something like this:
Internally the existing add_asset_loader could call this function i.e. self.add_asset_loader_from_instance(TLoader::from_resources()) to maintain backwards compatibility. I'm happy to submit a PR (I have a local branch which implements this) but I'm wondering if this is something others would find useful or if there is a different / better way to manage "static" game data?
EDIT: Draft PR here with example to aid discussion #580
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I asked on discord a while back about implementing custom asset loaders for game data files. There was a bit of discussion here https://discordapp.com/channels/691052431525675048/742884593551802431/758904560223518720
What it boils down to is I'd like a way to use the existing AssetLoader pipeline to load in game data files (e.g. character stats, random level data, whatever) stored in RON files. I could be wrong here, but I think this is distinct from using the scenes feature because its more likely to be static / resource type data than something you instantiate as game entities.
My idea was essentially to implement a generic
DataFileLoaderasset loader which looks something like this:The current
AppBuilder::add_asset_loaderfunction takes 0 arguments andFromResourcesto create the loader instance to add. I'm proposing adding anAppBuilder::add_asset_loader_from_instancefunction that allows providing a concrete instance of an asset loader, and would be used something like this:Internally the existing
add_asset_loadercould call this function i.e.self.add_asset_loader_from_instance(TLoader::from_resources())to maintain backwards compatibility. I'm happy to submit a PR (I have a local branch which implements this) but I'm wondering if this is something others would find useful or if there is a different / better way to manage "static" game data?EDIT: Draft PR here with example to aid discussion #580
All reactions