Hello , I am creating a very basic game engine using SDL and opengl as my basis for graphics. I thought of a general Game core class, that is split into five sections of routines. These were setting up the window, a input class that handle SDL events, a main loop attribute, a state machine Game class, and the clean up. For the input class, I thought of struct which had a hash table to all the key events and the mouse information for the class to interpret. I did not fully know how to construct the input class to handle the data or even set the key states that it should watch. The Game class would be a state machine with the attributes for render and logic . while the main loop monitors the frame rate, I thought about the loop just running both the game and input class. Any suggestions ?