Jump to content
Porsche

Videos

Recommended Posts

Lets say I wanted to play a video file for a cut-scene in my game. Where would I begin?

 

Mhh i think you have to play the video with thirdparty libs before you init the leadwerks engine.

That's a feature I'm really missing...

Share this post


Link to post

You could put each frame as a jpg file in a pak file, and then load each pictures into memory. Then you can "playback" the images from memory at any speed you want, along with playing an ogg sound for the soundtrack.

Share this post


Link to post

You could put each frame as a jpg file in a pak file, and then load each pictures into memory. Then you can "playback" the images from memory at any speed you want, along with playing an ogg sound for the soundtrack.

 

This doesn't sound very efficient.

Share this post


Link to post

You could put each frame as a jpg file in a pak file, and then load each pictures into memory. Then you can "playback" the images from memory at any speed you want, along with playing an ogg sound for the soundtrack.

 

Eh... there are plans for multiple cut-scenes of varied lengths. I don't think this solution would be optimal. I found a few guides online that show C++ handling AVIs.

Share this post


Link to post

its basically what we have for water at the moment...

 

True, but I would imagine the water doesn't have near the amount of frames that a movie would require.

Share this post


Link to post

@ Lumooja, never use jpg. If you want to write something yourself, use uncompressed avi files.

I recommend using mciSendString for windows...

Share this post


Link to post

Is there any way to get a pointer to a texture's data? If so it shouldn't be too complicated to integrate one of the free decoder libraries to decode the video data and write it to the texture memory. Then you could render that texture to a 2D overlay or play it back on an in game 3D object. Same would need to be done w/ the audio data unless you separated it and created a sound from that.

 

Are the texture data and sound data buffers available in LWE? If so I wouldn't mind taking a shot at integrating it, would be nice to be able to add another check mark on the feature comparison charts.

Share this post


Link to post

I needed better sound support in the projects I am working on, it was piss easy to integrate FMOD, and it even boosted my FPS 3-4 in situations where I was using lots of sounds compared to Leadwerks with OpenAL.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...