How can you implement a movie playing in the background, let's say a loopable animation in the main menu, without interferring with any buttons or functions in general? Additionally, how would you implement a movie as a background for any menu or screen for that matter (for example character stats screen)? The opacity would also need to be changeable.
Loopable webm as a background for the main menu (or other menus/maps)
RPG Maker MZ SupportTechnologically it is easy, just create a sprite using the video.
Just someone needs to write a plugin for the specific UI, which video to use, where to place the background, etc.
Just someone needs to write a plugin for the specific UI, which video to use, where to place the background, etc.
I don't know if it will help, but the “Ritter_TitleMovie” plugin is very good. I use it to play video in the main menu, and once I asked him if it was possible to add an image or video to a loading screen (it doesn't really work, but I thought it would be nice to have an image as soon as the player clicks on “New game” or “Load”), and then in 1 day or so he created a separate plugin for that function(^^♪
I don't know how easy it is, nor if he would create something like that, but I think it's worth a try
I don't know how easy it is, nor if he would create something like that, but I think it's worth a try
You can test this. Just replace flower.mp4 with your webm file.
But video play always has some delay so I guess it needs some more work.
I can't seem to find a video background plugin for MZ, but there should be some for MV already.
But video play always has some delay so I guess it needs some more work.
JavaScript:
Scene_MenuBase.prototype.createBackground = function() {console.log('createBackground');
this._backgroundFilter = new PIXI.filters.BlurFilter();
this._backgroundSprite = new PIXI.Sprite();
var videoTexture = PIXI.Texture.from('movies/flower.mp4?n='+Math.random());//workaround
videoTexture.baseTexture.resource.source.loop=true;
this._videoTexture = videoTexture;
videoTexture.baseTexture.resource.source.onloadstart=(function(){
this._backgroundSprite.texture = this._videoTexture;
}).bind(this);
this.addChild(this._backgroundSprite);
this._backgroundSprite.width = Graphics.width;
this._backgroundSprite.height = Graphics.height;
this._backgroundSprite.filters = [this._backgroundFilter];
this.setBackgroundOpacity(192);
};
I'm trying this plugin, which is exactly what I'm looking for (more or less)
https://dk-plugins.ru/video-player/
However, after going into options or character screen and then leaving, I get the error:
This happens both in menu and in game.
Here's what I got from the console:
https://dk-plugins.ru/video-player/
However, after going into options or character screen and then leaving, I get the error:
This happens both in menu and in game.
Here's what I got from the console:
Original thread: https://forums.rpgmakerweb.com/threads/loopable-webm-as-a-background-for-the-main-menu-or-other-menus-maps.174741/