Skip to content
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

Default Content #68

Open
3 tasks
Syncaidius opened this issue Aug 8, 2022 · 2 comments
Open
3 tasks

Default Content #68

Syncaidius opened this issue Aug 8, 2022 · 2 comments
Labels
content Content load/save/management issue qol Quality-of-life improvement
Milestone

Comments

@Syncaidius
Copy link
Owner

Syncaidius commented Aug 8, 2022

Content handles should be populated with default assets (if available) upon instantiation. This allows for a usable asset to be provided, while the requested one is loaded/retrieved asynchronously. Allow allow default assets to be retrieved or set directly.

Implement the following on ContentManager:

  • T asset = ContentManager.Default() for retrieving the default asset of a specific type. E.g. Font or texture
  • ContentManager.Default(T value) for setting default asset of a specific type

Implement the following on IContentProccessor:

  • IContentProccessor.LoadDefault() - Virtual which can optionally provide a default asset, which should only be loaded on the first request of default or if a Load() request fails to find the requested file
@Syncaidius Syncaidius added content Content load/save/management issue qol Quality-of-life improvement labels Aug 8, 2022
@Syncaidius Syncaidius added this to the Alpha 0.2 - Nov22 milestone Aug 8, 2022
@IceReaper
Copy link

Would a default content also allow the engine to do some lazy loading? Like requesting the asset, and using a dummy asset while is not loaded yet? While there are required assets to be able to display a scene and play, like the map geometry, some games actually allow you to play before the whole game is downloaded yet. In that case placeholder assets could be used till the real asset has been made available and processed.

@Syncaidius
Copy link
Owner Author

Yes, that is the intention behind new content handle system. You receive a handle to the content asset you requested and can track its status. A placeholder will be stored in it while the asset loads.

This will be next on the list once I'm done refining the font/text rendering 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Content load/save/management issue qol Quality-of-life improvement
Projects
Status: No status
Development

No branches or pull requests

2 participants