Basic game loop implementation