1
vote
1answer
95 views

Is there a robust way to get a pointer to a resource when I have a handle to its base type that doesn't rely on dynamic_cast?

I'm building my own pet engine and after struggling with how to handle resource ownership for a while, I came across this question and specifically Josh and Sean's responses (as well as Sean's blog on ...
3
votes
2answers
1k views

Managing resources

I have a resource manager that loads and returns resources. Currently I just return shared_ptrs for the resources I create, but I'm thinking about going over to using something like simple handles, ...
0
votes
0answers
129 views

Resource/Asset Manager [duplicate]

I'm creating a ResourceManager. At the beginning i'm creating a groups of resources which contain a map of resources. The role of groups is to quick load/unload resources, to find some constant, never ...
1
vote
0answers
123 views

OpenWorld SceneGraph management and optimization

I have a SceneGraph class which for now is just a simple list implementation, and the only optimization I've planned so far is a check is something like this: //GetDistance returns the distance ...
3
votes
3answers
2k views

Object pools for efficient resource management

How can I avoid using default new() to create each object? My previous demo had very unpleasant framerate hiccups during dynamic memory allocations (usually, when arrays are resized), and creating ...
4
votes
1answer
2k views

How to manage the lifetime of Ogre3D objects?

I haven't found tutorials that are concerned about deleting scenenodes and entities. I assume that the scenemanager will take ownership of them when they are attached (am I right?). However, I can ...
0
votes
2answers
899 views

C++ and SDL resource management for 2D game

My first question is about stateManagers. I do not use the singleton pattern (read many random posts with various reasons not to use it), I have gameStateManager which runs the pointer ...
12
votes
1answer
4k views

Designing a ResourceManager class

I've decided I want to write a central ResourceManager/ResourceCache class for my hobby game engine, but am having trouble designing a caching scheme. The idea is that the ResourceManager has a soft ...