Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualmetsfan

Posted 02 March 2013 - 08:34 PM

Thank you for the responses.  I think you may be right that some of my objects may have too much responsibility.  However, as I think about it, this one example is just one of many problems.  For instance, my GameSound objects rely on my AudioManager class, which maintains a pointer to my FMOD system (another detail users of my engine should not have to deal with).  I think what I'm going to have to do is prefer factory methods for creating certain types of objects, and encourage users of my engine to prefer composition to inheritance for these types, and for types which can be inherited to also be made clear, but also encourage composition all the same.  Thanks guys.

 

I am of course open to more suggestions from the community, though.


#1metsfan

Posted 02 March 2013 - 08:30 PM

Thank you for the responses.  I think you may be right that some of my objects may have too much responsibility.  However, as I think about it, this one example is just one of many problems.  For instance, my GameSound objects rely on my AudioManager class, which maintains a pointer to my FMOD system (another detail users of my engine should not have to deal with).  I think what I'm going to have to do is prefer factory methods for creating certain types of objects, and encourage users of my engine to prefer composition to inheritance for these types, and for types which can be inherited to also be made clear, but also encourage composition all the same.  Thanks guys.


PARTNERS