I discovered a way to do it using a pretty simple python script I found online. Attach this as a Controller (with an Always sensor) to an object with a ‘counter’ property. Turn on “Enable All Frames” in the Game menu options to ensure smooth animation.
#(c) Mike Pan [mpan3.homeip.net]
cont = GameLogic.getCurrentController()
obj = cont.owner
sep = ""
num = str(obj['counter'])
filename = sep.join([num,".BMP"])
#Un-comemnt the following line will save a bitmap every frame to disk. SLOW!
obj['counter'] += 1
When the game engine is run, this script will save a sequence of images in the same directory as the .blend file. The images will be the same size as the game viewport (and will include the header if it’s visible; remember to turn it off!). As far as I know, it can only write .BMP files, so you’ll need additional software to turn the image sequence into a video.