Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Resource Manager  (Read 5621 times)

0 Members and 1 Guest are viewing this topic.

CSchnitzerling

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Resource Manager
« on: October 24, 2014, 07:08:42 am »
Myself and other students from University are creating a publicly available Resource manager. We wish to get suggestions from the public of what they would like to see in this manager.

Base aspects of the Manager:
Handle the loading of Textures, fonts and Audio.
Robust error feedback with error textures and audio.
Handle asset bundles from a file location.
Handle the clean up of unused assets.

Additional aspects:
Get started guide.
Lua will be used to manage file structures.
Non-blocking loading.
Safe start up


future Goals:
To be platform and engine independent.

What would you like to see in your resource manager?

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Resource Manager
« Reply #1 on: October 24, 2014, 07:44:41 am »
Don't forget file systems: real, archive, net. Interface for custom FS. Streams. Points to store state (before single level loading) and then releasing resources from this store point.
« Last Edit: October 24, 2014, 07:48:53 am by ChronicRat »

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Resource Manager
« Reply #2 on: October 24, 2014, 08:02:48 am »
I feel obligated to mention that Thor has a ResourceManager: http://www.bromeon.ch/libraries/thor/v2.0/tutorial-resources.html  Might be a useful reference for tricky stuff like cleanup strategies.

I think the only features on your list that it doesn't cover in some form are:
- Lua will be used to manage file structures.
- Non-blocking loading.
- Handle asset bundles from a file location.
- Safe start up

Out of curiosity, what do the last two points actually *mean*?  "Safe" is pretty vague and "asset bundle" could mean a lot of things.

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Resource Manager
« Reply #3 on: October 24, 2014, 08:10:42 am »
Maybe you'll find PhysicsFs useful for that project...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10835
    • View Profile
    • development blog
    • Email
AW: Resource Manager
« Reply #4 on: October 24, 2014, 08:50:07 am »
There's little Thor's resource cache can't do or can't be expanded to do and yet for all of my projects so far, the system was too complex. I In most cases I either load things directly in the given state or I use a variation of the ResourceHolder from the book.

This doesn't mean nobody wants something else, I just stated my needs, since you asked. :D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: AW: Resource Manager
« Reply #5 on: October 24, 2014, 10:27:54 am »
There's little Thor's resource cache can't do or can't be expanded to do and yet for all of my projects so far, the system was too complex.
I agree. Thor's resource caches were designed around a specific requirement: resources should be loaded on-the-fly, and the user shouldn't care about whether it has been loaded already.

In many games, it is enough to load all that's needed in the beginning without caring about shared ownership, duplicate resolving or loading on demand. In such situations, a simpler solution like ResourceHolder from our book is worthwhile. I plan to integrate a compromise in a future Thor version.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

CSchnitzerling

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Resource Manager
« Reply #6 on: October 24, 2014, 10:45:47 am »
Out of curiosity, what do the last two points actually *mean*?  "Safe" is pretty vague and "asset bundle" could mean a lot of things.

Yes Sorry. Safe as in it should not crash even if the information you are trying to use is not there.
The idea of the asset bundle is to allow users to load multiple files from a single location and ensure textures ect are not duplicated. Should enable users to load a new scene/level for a game.

Thank you for the information on Thor. Our objective is to make this extremely versatile and universal. 

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Resource Manager
« Reply #7 on: October 24, 2014, 10:52:48 am »
Our objective is to make this extremely versatile and universal.
Be careful with that. As eXpl0it3r mentioned, with genericity comes complexity. If you begin to support different ownership models, your class can quickly become very unintuitive and tricky to use. thor::ResourceCache is not particularly difficult to use, since its semantics are quite clear (there's only the shared ownership model), but you need already a lot of code to use it in standard scenarios.

If I were you I'd start simple and add features only if they actually add value without complicating the API. Don't build a god class that attempts to solve everything :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: