Posted: 19th Jun 2007 3:24
does anyone know how to make a program that records your screen and saves it as an avi file? I wish to use it in my game to have the option to let players to record their game.
Posted: 19th Jun 2007 4:05
That's pretty tricky stuff, you would would have to know alot about how avi files work and everything. Also, it would ridiculously slow down your game to be taking screenshots every frame. You would probalby be best finding a DLL that does this or a 3rd party program. I'm not sure how these would affect the speed of the game.
Posted: 19th Jun 2007 4:09
thats is true, but remember this is an option in my game, so it can be used if wanted to be used and i would like to reduce the frames per second to make it faster. I thinking of taking pictures every 12 or so pictures per second and somehow compiling it to an avi file or something. But i don't have the slightest idea on how to do this, lol .

Does anyone know how to do this, or does anyone know of a dll that might help with my video recorder.

thanks
Posted: 19th Jun 2007 5:03
Actually there is a plugin for dbpro that can be used to create avi's. You can get it here. So what you'd need to do is get an image of the screen and then save it into the avi file. Just keep in mind, you'll want to set limits on how much they can record, so you don't get HUGE files . Hope this helped!
-H4ck1d
Posted: 19th Jun 2007 5:31
@03apples - I am certain that they exist for C/C++, but I don't know about DBPro specific plug-ins. Windows has VIDCAP capablilities, and exposes them in a few ways.

This works like any other resource in Windows, there are a few ways Windows exposes it. The .NET and newer ways all require that you are able to provide a few things that DBPro does not do out of the box, most notably...provide callback function addresses, and process a message queue. Beneath that is the more ancient API, in this case there are two, Video For Windows, or vfw32.dll, and also the ancient but not to be overlooked by the wise MCI interface exposed by Windows in the dll, winmm.dll. The MCI interface can be use from DBPro at a somewhat lesser functionality in terms of how you use it. (You will have to poll it if you are not going to create the plug-in necessary to do it the more advanced way.)

DirectX also has video capture capabliities, but...I have not examined using DX alongside DBPro, it is likely a pretty delicate process.

Naturally, I would love it if someone posted a link to a useable plug-in, but...if such a plug-in does not yet exist, we should get right on fixing that ASAP.

EDIT: Sorry H4ck1d, I sat on this too long, great!
Posted: 19th Jun 2007 10:03
There is the one in the link above, and FPSC X10 also has recording capabilities, so they must have created a viable option.
Posted: 20th Jun 2007 2:36
thanks everyone i will check them out.

EDIT:
Ya i got the dbproavi plugin working, but it makes the game wayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy slow.
Posted: 20th Jun 2007 15:22
You could just "record" it by storing all important variables (positions, angles, animation-frames etc.) into a file. That would be smaller and faster, and then you could add a "render"-option, which restores the scenes and saves a screenshot of every frame to an avi file...