Original Post
Hi there, I am in the process of making a basic graphics and sound engine (in DirectX) that I can use as the basis for a game I want to program. I am wondering what the best way is of designing my code to keep things simple, clean, and easy to use. Is it best to keep it all in a big class and instance things when needed? At the moment I have put the window and DX initialisation code into its own .h & .cpp files and have a camera class and have a pre-requisite file that includes these files, libs, and other required stuff. So, currently I can initialise a render window and setup a camera by doing the following The only thing wrapped up in a class at the moment is the camera system. Should everything be in a class or do you think I am on the right track? Any opinions on design approach would be greatly appreciated.
#include "Engine.h"
int WINAPI wWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPWSTR lpCmdLine,int nCmdShow)
{
initGraphics(hInstance);
// Create Camera
Camera *mCamera1=new Camera();
mCamera1->CameraPosition(30,50,-50);
mCamera1->CameraTarget(0,0,0);