Functioning multi-threaded game loop