.avi like input
Blitz3D Forums/Blitz3D Beginners Area/.avi like input
| ||
I would like to add 100-300 frame avi files from 3DS Max into my Blitz Strategy game, inside one of my While/Wend loops. I just want to pop up a mini movie inbetween commands or actions. Can it be done or is it to much for Blitz? |
| ||
nah it is easy, render the frames out as a video avi or mpeg whatever. You will need to use drawmovie something like this Global file1$= "yourfilehere.mpg" movie1=OpenMovie( file1$ ) If movie1=0 RuntimeError "Unable to open movie file" Repeat DrawMovie movie1,0,0,400,300 ; (this is x position ,y position, width, height) Flip Until Not MoviePlaying(movie1) CloseMovie movie See, no probelmo! IPete2. (if you have trouble with the file format, try renaming the avi to mpg or vice versa - I can't remember why but...) |
| ||
Thanks IPete2. Again the Blitz community made my game designing a whole lot easier. It works flawless and alot easier to figure out then the dizzy help example in the program help desc. You are invaluable to this site Pete! P.S. (.avi) files work OK, renaming them to (.mpg) worked as well. All is good in Blitz land! |
| ||
Keep in mind that when you use the DrawMovie command the FPS of the program gets locked to the FPS of the video file that's playing... |
| ||
Thanks for the input Genexi2. Since this is a static strategy game that may not be an issue. I however am going to design the next section of the game that will be more time sensitive, so for that reason I have to ask: If I need to "unlock" the frame rate, how can I do that? |
| ||
Keep in mind that when you use the DrawMovie command the FPS of the program gets locked to the FPS of the video file that's playing... Ahh! hats really interesting. Thanks! |
| ||
renaming them to (.mpg) worked as well. You do know that when you rename an avi to .mpg, it's still an avi, right? |
| ||
In fact, providing the original is a blitz-recognised format, you can rename the extension to anything you like or remove it completely and Blitz will still load it, because it is a useable format and Blitz can read the header. |
| ||
Hey Malice that's useful to know, thanks! PCBGUY it's always a pleasure, thanks for your comments, and I'm glad it worked so well! IPete2. |
| ||
oh this works with any loadable files to my knowledge - graphics, meshes, images, sounds etc... |