preliminary gameloop setup