Archived

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

Movies in games

This topic is 6359 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

I''m working on a game and I''d really like to incorperate a nice full screen animated logo for when you first start the game... Like when you start up Diablo 2, there''s a nice full screen movie with the blizzard logo... where can I get information on doing something like this? Could I use AVIs? If so, where could I get info on playing them with directX? Jerec

Share this post


Link to post
Share on other sites
There was a tutorial on Playing AVI''s here on GameDev.net but I didn''t like it. It seemed vague and not very too the point. But maybe that''s because I''m not a C programmer... :-)

So take a look, otherwise look for a reference on the Multimedia API and Video for Windows, I''m pretty sure there''s an include file vfw32.h and vfw32.lib that deals with video for windows, which is AVI''s. And an AVI can have Video, Audio, Text, and MIDI in some cases. Take look!

Oh yah, if you get a video playing properly with sound, POST IT HERE ON GAMEDEV FOR US TO SEE!!! I''d love that, and I think you''d earn a respect from other game programmers... I haven''t seen many.. wait.. *any* games here with AVI''s in them...
- Ben

Share this post


Link to post
Share on other sites
Dude, rad tools cost 10 grand!

AVIs are relatively fast, but they are huge. It would be better to use mpegs, they are slower, but if all you''re doing is displaying a movie, and the speed of the proccessor is fast enough, you''ll be fine. I would suggest to use DirectShow, it will also take advantage of hardware acceleration if it exists(yes, some cards can decode mpegs).

Share this post


Link to post
Share on other sites
Hi!

You could take a look at the DirectMedia SDK (Microsoft). It contains the libraries to use the MediaPlayer2 functionality (DirectShow). You can just give it a window handle and it will play any file (with sound and all) that your MediaPlayer supports (AVI, MPG, etc...) You could even play an MP3 file with it, although their decoder is kinda slow. Nonetheless it''s free and IMHO much easier to use than the VideoForWindows stuff. BTW, the vfw-libraries don''t support all AVI-codecs ... only the old Microsoft codecs, which makes them kinda useless.

MK42

Share this post


Link to post
Share on other sites
Hi,

I coded a AVI-player (using Directshow) a while ago.
Not the actual encoder, but I actually made a Camera-class that was quite easy to use.

So if anyone is interested I can post it or something.

It''s made in VC6. Hope I haven''t deleted it.

/Mankind gave birth to God.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:


Oh yah, if you get a video playing properly with sound, POST IT HERE ON GAMEDEV
FOR US TO SEE!!! I''d love that, and I think you''d earn a respect from other game
programmers... I haven''t seen many.. wait.. *any* games here with AVI''s in them...
- Ben




Who in their right mind is going to spend the time (hours) downloading some sucky
movie file created by a newbie warez kiddie that is probably 10+ megabytes for a
couple of brief seconds? I won''t even download *the* game if it''s over a couple
of MBs.

Share this post


Link to post
Share on other sites
[ sarcasm ]
Well thanks anonymous poster for contributing to the positive learning atmosphere here on gamedev, that just made him feel a lot better and incouraged to learn to program better.
[/ sarcasm ]

Yah right! If you don''t want to help someone with there problems don''t even post. It''s a waste of space on the server and of precious bandwidth as you seem to value so much.
-Ben

P.S. This is why we want to ban anonymous posting... it''s a shield so you can''t earn a bad reputation. Notice all the good posts in this post were by registered users? Hmm... I see a pattern...

Share this post


Link to post
Share on other sites
I''ve serched around and I found some information on using DirectShow, but I can''t find an SDK or anything... I need the dshow.h and dshow.lib files... has anyone seen a DirectShow SDK out there?

Jerec
CM Software

Share this post


Link to post
Share on other sites
Hey Anonymous bitch, I think he meant someone should post the code to play a video with sound up on gamedev, not an actual video dumbass.

DDDUUURRRRR



ByteMe95::~ByteMe95()

Share this post


Link to post
Share on other sites
DDNewbie - hell yeah! If you've got an AVI player then I for one would be interested in seeing it (Although it probably wont run under NT right? - DirectX stuff tends not to)

Also, Julio, I cant seem to find the freeware library you're talking about, you dont have the url do you?

Edited by - Dr_Evil on July 19, 2000 10:51:34 AM

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hrm, is DirectShow part of the DirectX SDK, or the DirectMedia SDK? I''m inclined to think DirectMedia. If that''s the case, you can get it by ordering the DirectX SDK CD, (10$ or something) or you can see if you can find the SDK Installer on Microsoft''s Site - it lets you choose which SDKs you want to download from a selection. It''s sorta an SDK download tool. Anyhow, I''ve heard the DirectMedia SDK is on there (the Installer) but I KNOW it''s not available for download at msdn.microsoft.com/directx

Clay

Share this post


Link to post
Share on other sites
OK, here goes ... DirectShow is a part of the DirectMedia SDK, which used to be distributed with the DirectX 7 SDK. But, (unfortunately) this isn''t the case anymore. You have to order the CD from Microsoft to get the DirectMedia SDK.

Dr_Evil: If the AVI-player is coded with DirectShow (without DDraw) and you have MediaPlayer2 or higher, it should work . DirectShow is just an interface to the video codecs installed on your machine, so if MPlayer can play it, DirectShow will also do it (even under NT).

MK42

Share this post


Link to post
Share on other sites
Hi,

Dr_Evil:
I'm sorry to say that I don't think it will run on winNT as it uses DX > 3. But you might fix it quite easily. I think you only have to change all DX>3 specific functions to DX3 ones.

I can't possibly fix it before weekend, as I'm working (as a gameprogrammer).
Shall I post it here or email you?

Btw, how long posts are you allowed to post here?

PS. I noticed that MK42 just posted. He may have right, the AVI-player uses Dshow-stuff but I drew the images to a ddraw-surface and therefore I don't think the AVI-player can be used under NT without some minor changes.

/Mankind gave birth to God.

Edited by - DDnewbie on July 20, 2000 4:00:19 AM

Share this post


Link to post
Share on other sites
Direct show didnt come around till dx5 or dx6 I belive, I havent tried it with NT but it works with 2K, although the two use differnt dx versions

Im Always Bored
--Bordem
ICQ: 76947930

Share this post


Link to post
Share on other sites
Thanks for replying guys, yes, from a few investigations, it seems that you cant download the latest version of directmedia (God knows why), but I actually found exactly what I wanted in the MSVC++ help file believe it or not. There is source in there to load and play an avi/mpg file using dx3. All of the files that it uses are installed by default with MSVC++ anyway, so all you have to do is copy and paste a bit of code, include some libs and you''re away. Just search for "Play a Movie in a Window Using DirectDrawEx and Multimedia Streaming" in the help. Its actually dead easy really, theres also code for doing it in MFC, VB and various other methods too.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You can display your AVI movie with DirectShow, but what is that going
to accomplish? The computer than your program runs on needs to have
DirectShow media components installed in the first place, and since
most people don''t have it anyway, it will fail horribly.

Matt

Share this post


Link to post
Share on other sites