Sign in to follow this  

whats the purpose for a resource manager?

This topic is 4859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, sorry if seems like a stupid question, but searching "resource manager" into google didnt help me much. anyway, could someone explain to me exactly what is a resource manager and its purpose? i realize its purpose is to "manage resources", but what is meant by this exactly? the other thing i dont get is, why would you need to manage your resources? why not just load in your images/sounds/whatever when they are needed, and un-load them when they are not needed? why is a manager needed to , well, manage all of this? thanks for any help!

Share this post


Link to post
Share on other sites
Basically, that's all it does. And I'm not sure if resource manager is the best term, but that's what I call my code that does just that.

Though what my resource manager focuses on is only loading one copy of a resource into memory. Say you have 500 little soldiers; you don't want to load 500 copies of the same texture into memory, just 1 copy and 500 pointers. And that's pretty much all mine does.

Share this post


Link to post
Share on other sites
Quote:
Original post by graveyard filla
the other thing i dont get is, why would you need to manage your resources? why not just load in your images/sounds/whatever when they are needed, and un-load them when they are not needed? why is a manager needed to , well, manage all of this?

Good resource managers make sure that you're not loading/unloading anything when you shouldn't be (eg. during a frame - generally you'd want everything already loaded to keep performance up).

Also, a resource manager could handle resource streaming, for huge levels.

Share this post


Link to post
Share on other sites
I think this article from the Code on the Cob series will help you understand the concepts of resource management. As others have said, they act as a cache for loading/unloading resources. Generally, your game would request a resource and the manager would handle loading, caching and freeing it appropriately.

EDIT: You might want to look at this post for ideas.

Share this post


Link to post
Share on other sites

This topic is 4859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this