Handling cutscene files

Hi,

in my game there are a number of cutscenes that are used for loading screens and so on, and for now i have them saved as .mp4. However, in my final game i would like if these could be in some way converted to something that cannot be accessed so easily. Recently, user Wolf suggested in an unrelated post that video files can be converted to .egg files using this method, but i find unclear how to exactly use it. Does someone have a code snippet that does this?

Thanks, Tom.

I fear that a relevant code-snippet would be pretty much as those given on the page.

In short, the process for each video-file should be something like this, if I’m not much mistaken:

  1. Outside of your program, you run the “egg-texture-cards” command-line utility, providing it your file as input (i.e. in place of “explosion*.jpg”).
  2. In your code, you:
    1. Load the resulting egg-file as a model
    2. Use the “find” method to locate the “SequenceNode”-object in the loaded model
    3. Use that “SequenceNode” to control the animation

That said, I don’t think that I’ve used this process for movie-files, so I don’t know offhand whether there might be pitfalls or processes specific to such.

Let me note, however, that there may be another way: Multifiles.

These can be a little more technical to set up in code, but shouldn’t require processing your videos into a new format.

In short: Your videos would be stored in a “container file”–the “multifile”. In your code, you would then “mount” this file, which causes Panda to treat its contents (in this case your videos) as though they were present individually in the file-system. They should then be usable much as they normally are.

There is an easier way.

I found that this is useless advice, since the read() method of the Texture object does not accept an argument in the form of a StringStream object. What is inconsistent, for example, the read() method of the EggData object takes an argument that allows you to encrypt egg files.