Record Video Script. For your smooth video capture needs.
Add Logic Sensor, choose puls mode, 1 for 60FPS, 2 for 30FPS
Add Game Property “counter”, 0.
Add Python Controller, choose the script. (Create also a text block and paste the code)
The frames will be saved in PNG in the same directory as your blend file.
from bge import render,logic cont = logic.getCurrentController() obj = cont.owner sep = "" try: num = str(obj['counter']) except : obj['counter'] = 0; num = str(obj['counter']) filename = sep.join(["//",num,".PNG"]) render.makeScreenshot(filename) obj['counter'] += 1
For a Game Logic setup, with activation and deactivation with a keypress. Please see @Mobioussetup (do not forget about the “counter” game property):