My suggestion:
Start with a simple loop. Something like:
while(running){
///holy game stuff batman
}
exit();
You say from scratch, but I do strongly suggest using libraries. For my C++ projects, I'm using:
Allegro - for all around cross platform help-y stuff (windows, input, basic sound, etc). It has drawing capabilities, but if you want 3d, they suck. learn opengl and roll your own. I suggest learning Allegro5, and using the addon modules for things like Fonts.
Audiere - if you need more advanced sound stuff.
Some kind of database - even if you end up just using your own flatfile format, you'll need a way to load/save/manipulate data. (For a project I'm on at the moment, I'm using SQLite.)
Anyway, once you have your loop and you're all "linked" up, you'll want to get a better workflow in place. The above example might come to resemble something like this:
class Main(){
running = true;
void run(){
createWindow();
setupGL();
initGameStuff(); //running = true happens in here :D
while(running){
input.update();
game.update(); //running = false would happen in here once its time to stop.
game.render();
}
unloadGLStuff();
destroyWindow();
}
}
Once you have that, you'll want to get state management in place. I use a parent class with subclasses, but there are countless ways to implement states. I'll offer one hint: states don't have to be a single variable. Google, and consider, a "state stack", as for some game types that makes certain things significantly easier.
Once you get state management, from there on its all about your engine. Improve or replace those functions, and continue to add and improve and replace and cull the crap until its nice and shiny.
And then, at long, long last, that awaited day, when
the actual work can begin.
Edit: the snippets arent real code. hell they aren't even good examples.
but they do summarize the concept I was trying to get across.