<p dir="ltr">The easier method would be to have a multiplier for the current timestep. A greater than one multiplier would cause an acceleration, and less than one would slow things down. Suspending would have to be handled separately.</p>

<p dir="ltr">--Mitchell Stokes</p>
<div class="gmail_quote">On Nov 22, 2013 12:46 AM, &quot;Arnaud Degroote&quot; &lt;<a href="mailto:arnaud.degroote@laas.fr">arnaud.degroote@laas.fr</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, I want to propose some mechanisms to allow better clock management<br>
at the Game Engine Level.<br>
<br>
At the moment, there is globally two tick models, one &#39;real-time&#39; with<br>
possibly frame drop, and another one which basically &#39;render all frame&#39;.<br>
<br>
What I would like to do is to be able to &#39;accelerate&#39; game engine, (i.e.<br>
make the world move faster than &#39;real-time&#39;), or &#39;slow-down&#39; the world<br>
(bullet effect-like) or even &#39;pause&#39; the world.<br>
<br>
To &#39;pause&#39; the world, I can just use suspend(). For &#39;slow-down&#39;, you can<br>
do it in some complex method, using suspend() at different intervals for<br>
different scenes to get more or less the desired behaviour, but it seems<br>
quite complex and costly. To accelerate the world, as far as I know,<br>
there is no easy way to do it.<br>
<br>
What I propose in these patches is to allow a &#39;user-settable&#39; clock,<br>
i.e. the possibility for the developer to finely control how the time<br>
elapse in its game.<br>
<br>
The next issue is how to call it. Calling it from a &#39;normal&#39; logic block<br>
is a bit dangerous as, if for any reason, you don&#39;t make the time<br>
progress enough, there is good change that your logic brick won&#39;t be<br>
called anymore.<br>
<br>
So, one safer possibility is to use the &#39;main python controller&#39; (see<br>
KX_GetPythonMain) but it may a bit overkill in lot of situation. Maybe<br>
we can add another special property (such as __main__) (I think at a<br>
__clock__ property), and call it automatically, if it exists in<br>
BL_KetsjiNextFrame.<br>
<br>
I would like to have your opinions on my goal (maybe I miss some easier<br>
way to achieve it), current attached patches, and proposal to continue.<br>
<br>
Thanks in advance. Best regards,<br>
<br>
--<br>
Arnaud Degroote<br>
Postdoc<br>
RIA LAAS - CNRS<br>
<br>_______________________________________________<br>
Bf-gamedev mailing list<br>
<a href="mailto:Bf-gamedev@blender.org">Bf-gamedev@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-gamedev" target="_blank">http://lists.blender.org/mailman/listinfo/bf-gamedev</a><br>
<br></blockquote></div>