Working separate gameloops for update and rendering frames