Advertisement

How to make a video of a game

Started by August 02, 2000 07:33 PM
4 comments, last by BitBlt 24 years, 4 months ago
Does anybody know how I could go about making an .avi (or any other type for that matter) file from a game. Like, I know for screen shots I can hit "Print Scrn" and it copies the screen to the clipboard, but say I wanted a short movie-type clip of my game in action to put on a website or something, how would I go about doing this. You know like on PlayStation demo disks they have videos of games that look like you''re watching somebody play it? I hope you understand what I''m trying to say. BTW, I''m using DirectX, any help would be much appreciated. Thanks. ----------------------------------------
I'm fat, you're ugly. I can lose weight.
------------------------------------
"We are the music makers, and the dreamers of the dreams." - Willy Wonka
I can''t get onto FlipCode right now (www.flipcode.com), but if you look in the Code Of The Day archives, there is code for writing an AVI file. Good luck.
Advertisement
For my game (okay, more of a tech demo at this stage) I have code for this built in. First I record a demo, which in my case is just writing a random seed and all the user keystrokes with timings to a file. Then I have a special playback feature which renders one frame, takes a screenshot, and advances by a user-defined timestep (ie 1/30th of a second for a 30hz movie). It can also write out sound data, but since I have minimal sounds so far I don't bother. Then when the demo's finished, everything gets assembled into one file (currently I only do avis, but I think you could easily find apps to convert to another format).

The whole process until the very end is going to depend on the structure of your engine, and assembling the avi is just a matter of looking up the format.

The whole point of this is to give your movie a constant framerate. You can probably find a program that'll just record the screen to an avi while you're playing, but I'd imagine doing those constant framebuffer reads would be a drag on the system.



Edited by - Ampere on August 3, 2000 9:57:51 PM
I haven''t done this, but i think you may also want to run you game in a low resolution (320x200 or something similar) b/c video files can become really big.

+AA_970+
Since this is a programming forum, I forgot the most obvious solution of sending to some external a/v equipment and then recording back into the computer.
In the game, save every relevant variable to disk.. the frame, and every objects position..

Then in another program loop through the frame data, renders the frame and save it as a bmp, then from there you can get all sorts of programs that import bitmaps as frames and saves it as AVI..

If you tried to save every frame to disk in the game it would be HORRIBLY slow and unplayable.

A better idea is just do what quake does, and render the frame data in-engine instead of an AVI.

Edited by - caffeine on August 3, 2000 11:52:11 AM

Edited by - Caffeine on August 3, 2000 11:53:13 AM

This topic is closed to new replies.

Advertisement