game loop abstraction with support for deterministic behavior written in c++ language