Here is something else you should know about movies: You're looking at 24-30fps dependent on the movie.
The RenderMovieFrame() takes this into account. Without the movie, you will be running at about 60fps, but when you play the movie, it plays at normal speed, even though you are telling it to render every frame. So, to keep the movie playing normally, RenderMovieFrame() pauses the execution.
To prove it, take a previous section of code:
Code: Select all
For x = 1024 To -tw Step -2
RenderMovieFrame(0, MovieSprite)
StartDrawing(ScreenOutput())
and do this to it:
Code: Select all
For x = 1024 To -tw Step -2
If x%4 = 0
RenderMovieFrame(0, MovieSprite)
EndIf
StartDrawing(ScreenOutput())
What this does is it will only call RenderMovieFrame() every other frame. So if the movie is at a set 30fps, and you are running at 60, you want to move the text forward twice in between every RenderMovieFrame(). To do this, it takes the X, which is being stepped 2, so to get every other frame, you do some modulus arithmatic, and say, on every x divisable by 4, then RenderMovieFrame(), i.e.
Code: Select all
1024 - RenderMovieFrame()
1022 - Ignore RenderMovieFrame()
1020 - RenderMovieFrame()
1018 - Ignore RenderMovieFrame()
etc
This get's the speed up, but doesn't solve problems like 27.5fps movies - but it's close enough - you will only have to wait a minor amount of time. Instead of waiting 32.5 frames every second, it would only be 5.
Now there is a further problem that when rendering the movie, it doesn't play all of it. The problem (I've found) if the fact that Black is classified as transparent. To change this, choose a snorking colour that you wouldn't normally see, such as $FF00FF (hot pink!):
Code: Select all
TransparentSpriteColor(MovieSprite, $FF00FF)
This should render the frames without any trouble.
I've furthered my example to reflect this:
http://www.shadowtavern.com/source/Scro ... 0movie.zip