How to design <game project>?

Hi, programmers. Title says pretty much what I´m looking after in this topic. There might be similiar topics out there in the wild, but I decided to put this topic up so I can get (possibly) straight answers for my questions.

I have created two static libraries so far, one for collectibles (including base class of collectibles, health, ammo, arsenal etc.) and characters(including base class of characters, I´ll implement players and enemies later). I though it would be great idea to put everything into namespaces, to make things more easy to handle and maintain, so I did just that.

Now, I´m not sure how am I supposed to design the overall hierarchy of the game. Namespaces are useful as well derivation, but if I use characters and collectibles, should I put them into a namespace called GameEngine or GameLogic? To me it sounds pretty obvious that the overall functionality of the game´s gameplay structure should have been separated from rendering, input and all such things.

So, the ultimate question is how should I design my game project? What kind of hierarchy should I create, where and when use staticality and dynamicality (with libraries, rendering etc.)?

Oh, and by the way, I´m aiming this game to be cross-platform (I´m using DirectX & OpenGL to do this, I´m sure you get the idea how).

Did you understand what I mean?
Last edited on
closed account (S6k9GNh0)
Namespaces are you're biggest worry???
Yes, to put it bluntly. I´d like to create good namespace hierarchy.
closed account (S6k9GNh0)
:/ Namespace vary. In a project, there's generally a namespace that resembles the project name. The purpose of namespace themselves is to differentiate them from other functions. Your library can have an Engine class while another library can have an Engine class with no conflict. Just name the namespace after you or your project name.
Thanks for the info. I think I should change namespace GameLogic to just namespace Engine then.

By the way, can you store headers files into libraries as well in addition to source files? That would be neat, because it reduces the amount of linking-requiring files. That would also help me out.
Topic archived. No new replies allowed.