You may think something like that is simple, but it actually involves a bunch of instructions, each with their own function. First of all, you should know about what a main loop is. It is a loop, such as a WHILE loop, that continues as long as the game is running. Inside the loop, you will have most of your program logic. For each iteration of the loop you will also render an individual frame.