You probably want to look at the UEngine class, which you can subclass and take control of the inner gameloop. You have to be careful because the editor also subclasses this class and your subclass won’t be avaiable. Also take a look at the FEngineLoop class and the GuardedMain function.