Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have resource manager handling as usual resource loading, unloading etc. With resources such an images, mesh no problem. But what to do when I have resource containing other resource (for example spriteFont contains reference to sprite and letters description). Should that sprite be added to resource manager? Or my spriteFont must be the only owner of that resource? Any thoughts on this. Have you faced with such problem? Thanks in advance.

share|improve this question
What can be the problem if you add SpriteFont too? "my spriteFont must be the only owner of that resource" what do you mean by owner? – Shashwat Sep 20 '12 at 6:30
Owner means nobody references to that sprite even resource manager, nobody knows about it's existence. It' helps reduce reference between classes, SpriteFont does not require resource manager – bobenko Sep 20 '12 at 8:42
up vote 2 down vote accepted

My fonts own the images that represent their fonts. I see no reason to add the image to the general pool of resources. The resource manager doesn't even need to know about it. I use the same routines for loading the image, but it's loaded into the font object. Nothing other than the fonts will use that image.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.