I don't know how you coded your game but I guess that you didn't use a game loop pattern. The pattern look like this: While the game is running -Capture/Process the inputs. -Update the entities on the game(HP, store the next position on the map, etc) -Render the game WEND