Movies are complicated things in windows. You can't just take any old movie file and throw it in a game and expect it to work on other people's systems. Besides that, it is rude to put a big movie file in a game. Most people will reflexively hit ESC anyway because thats what they are accustomed to doing when assaulted with an FMV. However, movie functionality is provided for those who have some legitimate need for it. BUT YOU MUST FOLLOW THESE RULES:
DO NOT USE DIVX OR XVID OR MPEG2. These codecs do not come with windows, and the player might not have installed them manually. Use cinepak, indeo, video-1, or even RLE. The compression might be cruddy, but at least it will work.
If you are thinking about making a video an integral part of your game, you MUST CONTACT ME to discuss it so I can help you make sure you're doing it right. If you are including a video for some lame purpose like an intro screen are something then I suggest that you not do it, and if you must indeed do it then I suggest that you contact me to get advice on doing it right.
Even the basic codecs (including cinepack) might not be installed on Windows server platforms. I know for a fact they dont work on my Windows 2003 at the office.
There are basically two modes to movie playback--simple and advanced. Simple mode consists of PlayMovie, which will just play a movie fullscreen through to completion and is suitable for intro movies and such. Advanced mode uses MovieLoad to load the movie and MovieClose to close it and is split into two use cases:
- MoviePlay/MovieGetImage which will play a movie through to completion but allow you to control the rendering of the movie via MovieGetImage and your own calls to blit(), etc. --and
- MovieSetFrame/MovieNextFrame/MovieSetFrame which will let you zip around in a movie and pick the frames you want. MovieRender will have to be used to decode the movie after youve skipped around (..i think.)
There are a few other functions which you may find useful
There are likely horrible synchronization bugs in the movie code. If youre using it and run into problems, we'll see what we can do to straighten it out.