Replies: 1 comment
-
#580 was merged into master |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
DataFileLoader
asset loader which looks something like this:The current
AppBuilder::add_asset_loader
function takes 0 arguments andFromResources
to create the loader instance to add. I'm proposing adding anAppBuilder::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
Beta Was this translation helpful? Give feedback.
All reactions