Game loop, basic mechanism