Skip to main content

Timeline for Resource Manager in C++ for Games

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
Jun 10, 2017 at 21:51 comment added zett42 You could pass the resource managers to the objects that need them. It would be more code to write but it expresses the dependencies clearer. You could just look at the interfaces and see which classes depend on which kind of resources. It also adds more flexibility in the long term as you could simply swap out a resource manager used by one class by a different one (even if you currently can't imagine a use for that).
Jun 10, 2017 at 14:55 comment added K.K. Slider @zett42 How else would you approach it? I can't imagine why there would be more than one resource manager, and it makes everything easy to access. Perhaps I could create a dedicated namespace for resource loading functions, but I think the singleton pattern makes more sense. A Core class in the game controls the starting up and shutting down of these Manager classes, and they're singletons so the instances can be accessed from anywhere else in the game.
Jun 10, 2017 at 12:54 comment added zett42 What is the reasoning behind forcing a singleton upon the user of ResourceManager?
Jun 10, 2017 at 6:18 vote accept K.K. Slider
Jun 10, 2017 at 5:09 answer added user2296177 timeline score: 8
Jun 10, 2017 at 1:51 history edited K.K. Slider
edited tags
Jun 9, 2017 at 22:39 review First posts
Jun 9, 2017 at 23:08
Jun 9, 2017 at 22:33 history asked K.K. Slider CC BY-SA 3.0