This question is too broad as originally written. However, it is an interesting topic and the heart of the questions posed are both relevant to game development and very common.

How could this question be edited or broken up to make it more appropriate for the site?


1 Answer 1


After thinking about it for a bit, a big reason the question is too broad is because there are three separable questions there. Each of those questions have a large variety of answers and still may be too broad on their own (without further tweaking of their scope), but certainly all three of them at once create too many variables for answers to reasonably address.

I think a good first step towards getting the topic addressed, therefor, is to break up the question into at least three separate questions:

  • How can I decouple asset types from the renderer?

    • This question should narrow it's focus by concretely defining an 'asset' (is it the file format itself, or is it the class that manages the loaded intermediate data and should thus should not be polluting the rendering API because it deals with things like filesystem change notifications which the renderer really doesn't need to care about, et cetera).
  • How do I manage the relationship between instances and assets?

    • As above, a specific definition for "instance" and "asset" should be supplied because the terms are very general and very widely used, which broadens the interpretation of the answers' scope.
    • The references to state sorting make me think that this question is possibly more about state sorting and less about actual decoupling in any form, however.
  • How do I decouple instances of things to render and the renderer itself?
    • This question seems like it could possibly be rolled into the second question, depending on the given definitions for 'instance' and 'asset' in the second question.
    • I have a strong suspicion that the answer here is "don't, this is not a an appropriate place to decouple two concepts," but again that depends on the definitions.

I still think that the ambiguity present in the questions terminology and in the overall goal of the question warrants some hashing out, either here or (preferably) in the chat, however.

  • \$\begingroup\$ Noted. I think I included all 3 as I didn't expect to be breaking all 3 at once - but wasn't sure which 1 or 2 of the 3 I should be breaking. I think defining "asset" more narrowly would depend upon the expected relationship with the renderer? No? I feel that if I could define "asset" and "renderer" specifically enough for you I would have implicitly defined their relationship as well. I admit I'm being much too vague with "instance". Read this as "an object containing just the data to be uploaded to the shader per individual renderable game object", i.e. transformation, animation frame etc. \$\endgroup\$ Commented Dec 23, 2014 at 19:42
  • \$\begingroup\$ With regards to state sorting - if I keep a bidirectional coupling then there is no actual sorting. Only if I decouple them do I actually need to sort. Your final bullet point, coming from a professional, is close to an answer (or part of one) by itself. I had a look at chat - it really didn't seem like the right place, mixed in with discussions of Ubuntu and iOS and advertising. Maybe you meant some other chat room or feature I missed? (p.s. as we are off the main site: Undead Labs? Big fan of State of Decay...) \$\endgroup\$ Commented Dec 23, 2014 at 19:51
  • \$\begingroup\$ This link should take you directly to the appropriate chat room. It's also occasionally off-topic, but if it says "Game development and other polite discussion" in the upper-right you are in the correct room. \$\endgroup\$
    – user1430
    Commented Dec 23, 2014 at 19:54

You must log in to answer this question.