So my game is done for now but every time it flashes on the screen and my game loop is awful. So crowded with logic.
I need to learn more about games and how they are running. My idea now is that at the heart of the game you have a while loop. Inside that you are checking for events to happen. Each time an event happens, you spawn a thread that accomplishes a task.
You then have a layer that draws on the screen the "map". Also a layer that says where objects collide. And finally the logic of how objects interact.
I am using C++ and SDL and I need a complete tutorial that takes me through a complex example to get started. I am a good programmer but have no experience with games. Any suggested tutorials would help.
All tutorials I have found so far are too easy and don't do anything worth while.