move a bunch of gameloop stuff to player