Implemented game loop framework