Implementation of avi [SOLVED]

Started by Ovod, Sat 01/01/2005 19:18:13

Previous topic - Next topic

Ovod

Excuse me?
How can I add .avi films to my game? :-[

Candle

PlayVideo
PlayVideo (string filename, int skip, int flags)

Plays an AVI or MPG file, or any other file type supported by Media Player.
FLAGS can be one of the following:

0: the video will be played at original size, with AVI audio
1: the video will be stretched to full screen, with appropriate
   black borders to maintain its aspect ratio and AVI audio.
10: original size, with game audio continuing (AVI audio muted)
11: stretched to full screen, with game audio continuing (AVI audio muted)

SKIP defines how the player can skip the video:
0  player can't skip video
1  player can press ESC to skip video
2  player can press any key to skip video
3  player can press any key or click mouse to skip

The game is paused while the animation plays.
IMPORTANT: Any video files you have for this cannot be compiled into the main game data file, so you will have to place them seperately in the Compiled folder for them to work.

IMPORTANT: The end player will have to have the correct codecs installed in order to play the video. Bear in mind that if you encode your intro with DivX, for instance, the player will need to have that codec installed in order to view the video.

NOTE: Since the video must play at your game's colour depth, you may notice that in a 256-colour game it is very difficult to get a video that looks good, due to the attempt to reduce the depth of the video on the fly. FLIC may be a better choice for 256-colour games.

Cross-Platform Support

Windows: Yes
MS-DOS: No
Linux: No

Example:

PlayVideo ("intro.mpg", 1, 1);

will play the video Intro.mpg, allowing the player to skip with ESC if they've seen it before.

Ovod

It is clear now, thank You)
Nice cockroach, btw))

Candle

Hey n/p . I learn something new here everyday .
Oh cockroach ,,,  Badmojo :)

Ovod

Yep!) I knew that)
There was a psychodelic game with such a name)

TerranRich

#5
Next time, please read the AGS manual (and the BFAQ, too, for future questions). If I had caught this before it was answered, I would have locked this up and told you exactly what I am telling you now. Just letting you know.
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk