Understanding GameTime and RealTime

When starting GeometryFriends and passing different arguments you can influence how fast the game updates and runs. The game time is the amount of time that is simulated and it can be different from the amount of realtime by either accelerating or decelerating the speed of the game. Several command line arguments can influence how the game is run and therefore in this article we will explain how each affects the game:

--no-rendering : disables rendering launching a basic form with the option to cancel the game simulation that is undergoing.
Effect : basically this frees all the CPU / memory resources from rendering the game visually that might then be used to speed up the game but, by itself does not speed up the game in any manner.

--disable-fixed-time-step : makes the game update as fast as possible without any target timestep between game updates.
Effect : triggering this will affect the amount of game updates for each timestep (10 miliseconds by default). In this mode the game updates (i.e. update physics simulation, agent decision, etc) are performed as fast as possible since there is no attempt to match a given timestep. This means that if you have a really fast update (i.e. agent decision) with a real execution time much lower than the target timestep the game will update more times during a given timestep. Notice that if your update takes very long you can actually take (much) more time performing a game update. Additionally, with this the game can be updated more often but the realtime the game takes is still unaffected. In the end the number of game updates are affected but not the realtime that the game takes to execute nor the gametime are affected. The game is just more often updated (with a lower elapsed time each time) or less often (with a higher elapsed time each time).

--speed speed_value : enables you to make the game run faster/slower. The speed_value must be greater than 0.
Effect : changing this value will directly affect how long the game takes to execute in realtime. For example, if you simulate a level that has a time limit of 40 seconds with a speed of 2 then in real time it will now take approximately 20 seconds. In fact if you run the game with either -st or -stn the results file will give you both the gametime and the realtime for that particular simulation. You can also try this flag with rendering on so you can see it in action. Keep in mind that when you speed the game, the game update (i.e. your agent decision) should also perform equally fast. Or at least not delaying the update too much since this would equate to being very slow in agent deciding at normal game speed.