Code: Select all
image eileen movie = Movie(channel="eileen", play="eileen.webm", mask="eileen_mask.webm")
Code: Select all
show eileen movie
This starts both movies playing, and uses the red channel of the mask movie as the alpha channel of the other movie. The result is an animated sprite that can have far more frames than would be possible with ATL, Animation, or other methods that have to load all images into ram at once.
For now, this only works on desktop (Window, Mac, Linux) platforms. There isn't a fundamental limit to the number of movie sprites Ren'Py can display at once, but it is limited by how fast the player's computer is. Memory consumption should be about 24 bytes per pixel, so a 400x720 animated sprite will take about 7 megabytes, although garbage collection may make it be a little more.
This provides a far-superior alternative to animated gifs (it's pretty easy to use ffmpeg to convert an animate gif into two webms, and the example I used is 15% the size of the gif equivalent), and provides a uniquely flexible animation format.
Right now, the new audio/video code is living on a git branch. Once I fix a slow memory leak, I'll add it to the nightlies, and I play to get a release with this out soon.
Thanks to renoa-heartily for the animated gif I converted, which can be found in this thread: http://lemmasoft.renai.us/forums/viewto ... 79#p364740