Agree with 31 and 32. And if you've only created an SDL window, I feel really sorry for you. I have a project on my computer that is yet to be completed or even released yet that is able to not only create SDL windows, but log to files, create a menu, draw text using OpenGL and shaders, fade in/out background music, create environmental effects with levels, perform various kinds of cryptographic operations, use signals to indicate completion in a callback-like system (creating asynchronous menus, for example), and some other things I'm forgetting. Oh, yeah, whenever the players position is retrieved it is checked against the levels size and if its wrong its logged too (for debugging mainly). A few months ago when I was actively working on it I even had it dumping stack traces when it crashed! Also, the game loop does lots of interesting things that are probably not exactly safe (but I couldn't think of any other way to do it at the time):
* Ticks at a solid 60 FPS
* Updates audio and graphics systems
* Uses game modes to determine game state:
- If game mode is "menu" and that game mode has user data associated with it (which is a pointer to the active menu), alters game mode to take control of that menu and calls that menus processEvents() function.
- If game mode is "Exit", game loop terminates.
- If game mode is "Playing, does some interesting things (which are a bit broken):
-- Gets pointer to active player.
--calls internal game loop processEvents() function to process gameplay.
-- Uses players coordinates to determine open pathways.
* Simultaneously, the game loop performs OpenGL error checking and intervenes if any errors do occur by logging them (and if the error is anything severe, like GL_OUT_OF_MEMORY, informs the user and terminates the application).
And all of this is written in C++ too. I need to try finishing that sometime (or open source it which was my original goal anyway so others can help).
I don't expect your game to do all of that, Jonikster, but does your game even approach anywhere of that complexity? And I haven't even gotten into what the ProcessEvents() functions do either.
I know, I'm probably coming off quite harsh but if your a teacher than this attitude should be normal after all you've done.
"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." — Charles Babbage.
My Github