6
$\begingroup$

I'm wondering whether it is possible to run the game engine in a "cycle - by - cycle" fashion.

I.e. a sort of debugging mode where one could associate the mainloop cycles to keyboard events (for example) rather than a time interval.

$\endgroup$
  • $\begingroup$ An older script that would need some editing: blenderartists.org/forum/… $\endgroup$ – stacker Sep 24 '13 at 8:39
  • $\begingroup$ Yeah the idea is clear and was also the one I had .... I was just missing the overlay scene trick .... thanks $\endgroup$ – user1333 Sep 26 '13 at 11:17
  • 1
    $\begingroup$ And if you want to execute your Python line by line, you can drop into the Python debugger via pdb.set_trace() $\endgroup$ – Mike Pan Oct 3 '13 at 19:28
  • 1
    $\begingroup$ Debugging the game engine makes not much sense - unless you want to develop the framework. This is some abstraction layers to low. I developed a library that allows to stop and resume a scene a while ago. You can run the game in slow motion or frame by frame -> so I called it frame-by-frame debugger. You can navigate inside the debugged scene, so you can see what is going on. It helps on any sort of timing problem.This is very hand with physics. But it will not help on logic issues. $\endgroup$ – Monster Mar 27 '15 at 11:23
2
$\begingroup$

A simple way to go would be enable the console and to add a Always actuator somewhere with pulse mode enabled, linked to a Python controller using the following "script" :

input("Next step ")

Then at each step the python script will be blocking the whole execution until you press enter for the input to return.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.