Advertisement Jump to content
Sign in to follow this  


This topic is 4853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Two related things. Im learning about component design (if I have that right) and the idea of one class for one common group of functions. At the moment I am having some difficulties with inheritance and derived, not that they are unworkable. However the code is getting ugly. Things such as casts needing to be used in more and more places. Either that or having to put seldom used parts in the base class, or other workarounds. So I will be experimenting with that to see how it works. Maybe it will. Maybe it wont. And will introduce its own difficulties. But in general would these difficulties be less of a problem? Things really are starting to look like Greek... which is something I wanted to get away from in the first place. But more importantly and if I understand correctly... for the later an example of the general pattern would seem to be a single small class for a window, another for the door, and one for the car. Each is embedded in the next (window->door->car). Sort of a tree effect? However, wouldnt the number of classes start building up very quickly? Is this actually a good thing? The alternative being the usual single large class that would comprise all three. Thx

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!