Hi All
First post here, and I want to make it meaningful. Bit of a background I have been programming in scripting languages for about 10+ years professionally and although I am new to C++ and game programming as a whole I have had some experiences in the past, but I am stuck on one of the fundamentals of the initial project structure layout.
I have purchased several books, of which talk about different practices (some of which I am already familiar) however there doesn't seem to be a clear indication of what structure layout to use. (I'm using Visual studio's 2013 professional, which creates virtual folders, but means files can't have the same name) - is this good or bad?
So far I have worked out a sort of abstraction:
/Core/
/Engine/
Main
========== This broken down into ==========
/Core/
this includes the main
Game.hpp
Game.cpp
It also has class's like timer etc.
/Engine/
This folder has all the components in. (bit like the Entity component model)
/Engine/Entity/
/Engine/Entity/Player
/Engine/Entity/NPC
As well as other things like:
/Engine/Scene/
/Engine/Render/
Now some books recommend having this as a separate project, and saving it as a DLL file.
I also have virtual folders like
/Engine/Graphics/
Inside that we have
/Engine/Graphics/Drivers
and inside drivers, we have
Direct3D.cpp
Direct3D.hpp
and
OpenGL.cpp*
OpenGL.hpp*
* even though I am not using these for a while.
Then in the root of the application i have:
Main.hpp
Main.cpp
Now my question is rather, what is a good structured layout?
im planning on creating a really basic game, with a world, that is drawn up into zones and each zone consisting of many chunks. starting off making it a 2D top down game, then in a few years turning it into a 3D game.
So assuming this I would have a
/Engine/World/
and inside that files like
zone.cpp
zone.hpp
chunk.hpp
chunk.cpp
Now really the question is after hours of searching on the net, I can't seem to find anywhere pointing in the right direction. Some of this feels dirty, even how things are abstracted - where things go, should i be decoupling the engine as a DLL file.
How and where do things like the GUI module go, inside the engine? with a GUIManager and having virtual folders with things like InputBox and a button class?
This leads me to think about a whole host of other things, ie Input does this go in the /engine/ as /Engine/Input/ and a class for keyboard.cpp etc.?
Anyone shed some light on this for me please, I will be eternally grateful.
On a side note, I have been looking to pay for tutoring as well, I have been working with someone previously integrating things like CEGUI and OGRE3D however I think I need to go back to the basics and start small.
Any help is appreciated!
Slyvampy.