TGC Codebase Backup



Screen Recording Code Snippet by Anonymous Coder

13th Oct 2003 18:29
Summary

To save a particular set of screen shots into a specified folder as bmp's to convert to an avi via a 3rd party program.



Description

This will save bitmaps in a specified folder of screenshots of your program. Currently it has variables for the interval in which it will take shots, and how many it will. Upon colmpletion, which usually does not take long, you will find the files in sequential order in the specified folder. Simply take a 3rd party program, such as Adobe Premier and make an AVI out of the files. Good for, I don't know, making AVI's to play in the begining of your game, or making animations of wierd things happening that you program. Hey man, you're the one using the code not me, think of your own application.



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    rem *************************************************************************
rem **********************Screen Recording Code******************************
rem *************************Casimir Sowinski********************************
rem **************************Dental Republic********************************
rem *************************************************************************
rem Replace a value for max that tells the program how many frames to record.
max=100
rem Rplace a value for frame that tells the program how often to save a bmp.
frame=1
rem You can replace the returnkey condition with any you like.
if returnkey()=1 and record=0 then record=1
if record=1
   frame=frame+interval
   rem Make a folder named "animation" or whatever you like that will hold the bmp's in sequential order
   save bitmap "animation\file"+Str$(frame)+".bmp"
   if frame>=max then record=0
endif