|
A Simple Fast Resource Manager using C++ and STL
IntroductionResource management is a vital aspect of game development. Every game has resources of various types and an efficient resource management system can improve the overall performance of a game. In this article, we look at an implementation of a resource manager that can be set up with minimal effort, yet which provides noticeably better performance than more generic approaches. The Role of a Resource ManagerA resource manager manages various resources of a game. Meshes, sounds, scripts, shaders, textures can all be considered as resources, yet they have one thing in common: they are loaded from files before use. A resource manager can handle the mundane tasks associated with loading and accessing the resources. Ideally, the resource manager should be fast, efficient, should use minimum memory and also be easy to use at the same time. Design GoalsOur resource manager should satisfy the following goals:
ApproachTo achieve the goals above, we are using the following:
|