Syncaidius / MoltenEngine

A spare-time C# .NET 8 game engine project. Cross-platform, multi-threaded.
MIT License
299 stars 20 forks source link

Default Content #68

Open Syncaidius opened 2 years ago

Syncaidius commented 2 years ago

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:

Implement the following on IContentProccessor:

IceReaper commented 2 years ago

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 commented 2 years ago

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 🙂