Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

computer_guy

playing AVI's in a game

This topic is 5523 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How would I go about playing AVIs in my 2d game. It is written in C++ and uses directX 8.1 and DirectDraw7 for the graphics. Could someone show me where I could find a tutorial or some code or something? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Use DirectShow to play avi file on directdraw7 surface, render avi to offscreen surface then blt it to backbuffer, then flip screen/ bacbbuffor, exaples are in msdn, i don''t have my source code right now in work sorry

Share this post


Link to post
Share on other sites
Would any one happen to know If there is like a DirectShow engine that will do all the hard coding for me. I know It probably sounds like I''m really lazzy but I really need to play an AVI in my game i''m currently writting. And I''m pretty new to programming graphics.

Thankyou for your time.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The direct draw example using direct show is pretty simple to use, everything is all wrapped up for you. It would take a matter of a half hour at most to comment out the text drawing, and overlay functionality and then copy & paste into your game. Not that difficult at all.

If you want something even simpler look at the direct show "cut scene" sample.

Share this post


Link to post
Share on other sites
Look for the cutscene source code in the SDK. I think it will provide all you need.

Share this post


Link to post
Share on other sites
There''s some tutorial on gamedev.net about playing AVIs in DirectDraw or something similar. It''s a simple AVI loader that keeps copying frames from the avi to the backbuffer/whatever_you_use.

Maybe you can use that?

Share this post


Link to post
Share on other sites
Well in case you want a fast solution, in which you don''t want to programm much and its just an intro avi. You could just use MCI which will only take you about 4-10 lines of code.
Offcourse its not the best solution just wanted to mention it.

-CProgrammer

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!