Animated Battle Backgrounds?

Wrongful

$ sudo ./help_pls.sh
Veteran
Joined
Jan 31, 2017
Messages
62
Reaction score
7
First Language
English
Primarily Uses
RMMV
Hello!
I've been searching for something like this for a while now, but with no success. What I'm looking for is an MV plugin that allows backgrounds to look like a gif, similar to the fights from Earthbound. (Don't worry, no major spoilers in that link.)
Of course, I highly doubt that anyone could easily make a plugin that allows .gif files to be played as a background, but I was thinking that each individual frame could be separated into different images, using sites like this. Then, the plugin could just shuffle through them, basically mimicking the original gif.
After much searching, all I could find were two plugins for changing background in an event, and scrolling the background in SV mode. If someone could point me to or make a plugin like this, I would be very grateful!
 

Solis

Veteran
Veteran
Joined
Oct 24, 2015
Messages
376
Reaction score
84
First Language
English
I don't remember where I saw it, but I believe there is a plugin in for this already if you check the forum.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
591
First Language
English
Primarily Uses
RMMV
A while ago, I've started a WIP plugin that does GIF backgrounds for battlebacks and the title screen.

It isn't plug-and-play, meaning you'll have to edit much of it for your particular game.



PHP:
Graphics._createRenderer = function() {
    PIXI.dontSayHello = true;
    var width = this._width;
    var height = this._height;
    var options = {
       view: this._canvas,
       transparent: true
   };
    try {
        switch (this._rendererType) {
        case 'canvas':
            this._renderer = new PIXI.CanvasRenderer(width, height, options);
            break;
        case 'webgl':
            this._renderer = new PIXI.WebGLRenderer(width, height, options);
            break;
        default:
            this._renderer = PIXI.autoDetectRenderer(width, height, options);
            break;
        }
    } catch (e) {
        this._renderer = null;
    }
};
Spriteset_Base.prototype.createBaseSprite = function() {
    this._baseSprite = new Sprite();
    this._baseSprite.setFrame(0, 0, this.width, this.height);
    this._blackScreen = new ScreenSprite();
    this._blackScreen.opacity = 0;
    this.addChild(this._baseSprite);
    this._baseSprite.addChild(this._blackScreen);
};
ImageManager.gifBackground = function(gif){
   return 'url("' + gif + '") no-repeat scroll #000 top center/cover';
}
Spriteset_Battle.prototype.createBattleback = function() {
    document.getElementById('GameCanvas').style.background = ImageManager.gifBackground("img/battlebacks2/visgif.gif");
};
Spriteset_Battle.prototype.locateBattleback = function() {
};
Scene_Title.prototype.createBackground = function() {
    document.getElementById('GameCanvas').style.background = ImageManager.gifBackground("img/titles1/fan2-o.gif");
};
Scene_Title.prototype.centerSprite = function() {
};

I haven't tested it much, and I'm not sure, but there may be side effects to turning the GameCanvas transparent and giving it a background, and also disabling the default battleBack functions.

If you have all the GIFs in mind I can modify this to randomize it or perhaps use specific GIFs for specific troops or background settings.

Like I said, it's a work in progress.
 

Wrongful

$ sudo ./help_pls.sh
Veteran
Joined
Jan 31, 2017
Messages
62
Reaction score
7
First Language
English
Primarily Uses
RMMV
Wow, I wasn't expecting a response so quickly...
I tried out Galv's plugin with this gif, and...
...I don't think this is supposed to happen...
I think it's trying to use the gif as the bottom image, but the top image persists. To fix this, I simply copied the gif image, and pasted it in the battlebacks 2 folder. It mostly fixes the problem, but now I have this.
I know that the help file specified that:
Each frame should be the size of your game window dimensions.
But I'd rather not go through the process of scaling up the gif, and re-doing all of the work. Is there a way to solve this without editing the image, and if not, what's a good way to fix it? (If it's scaling up the image, what's MV's resolution by default?)
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
591
First Language
English
Primarily Uses
RMMV
Looking at his source, I think he used tiled PNGs instead of GIFs. You might be right.

I can customize my GIF plugin for you if you tell me how you want your backgrounds.
 

Wrongful

$ sudo ./help_pls.sh
Veteran
Joined
Jan 31, 2017
Messages
62
Reaction score
7
First Language
English
Primarily Uses
RMMV
I just tried out your plugin without editing anything, and as you said, it didn't exactly work.

What do you mean by how I want the backgrounds? As in, how long the GIF is, the resolution, or...? I don't know exactly what GIFs I'll be using in my game, but I plan on using quite a lot of different ones, so it'll probably vary quite a bit.
 

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
591
First Language
English
Primarily Uses
RMMV
Edit the gif file names and file paths. CTRL+F to the img/titles1/fan2-o.gif and img/battlebacks2/visgif.gif and make them your own.

I still probably have much to consider about it.
 

Wrongful

$ sudo ./help_pls.sh
Veteran
Joined
Jan 31, 2017
Messages
62
Reaction score
7
First Language
English
Primarily Uses
RMMV
I put the "extracted" version of the GIF under visgif.gif, and it didn't work. When I got the actual GIF itself, and named it visgif, it still had the same results. So...

I'm gonna try scaling up the extracted GIF, then try that with the other plugin.
 

Wrongful

$ sudo ./help_pls.sh
Veteran
Joined
Jan 31, 2017
Messages
62
Reaction score
7
First Language
English
Primarily Uses
RMMV
Argh... Scaling up the extracted GIF image has the same results. A bunch of smaller versions of the GIF moving across the screen.
Any ideas?
EDIT: For some reason, it was using the smaller version of the image... guess I'll try again.
EDIT EDIT: oh no... it's a solid black background...
EDIT EDIT EDIT: I'm going to just leave a download link to the image I'm using right here, just in case you think that's the root of the problem. (and it probably is.)
 
Last edited:

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
591
First Language
English
Primarily Uses
RMMV
EDIT: You have a static PNG; not an animated GIF.

EDIT/EDIT. I implore you to try mine again when you have a GIF. I just made a video to show it does work.
 
Last edited:

Wrongful

$ sudo ./help_pls.sh
Veteran
Joined
Jan 31, 2017
Messages
62
Reaction score
7
First Language
English
Primarily Uses
RMMV
Look! I'm not dead!
I know that this thread is a bit old, but I tried out @mogwai 's plugin again.
This time, I did it with this gif, and it seemed to work flawlessly for the title screen. However, when I tried to enter a battle, the gif did not initiate.
Any thoughts?
EDIT: After looking a bit closer, I think the reason is that battlebacks1 is covering the gif, which is working just fine. If I could figure out how to hide it, the gif would work. Right now, it looks like this. When the screen shakes because the player is attacked, one can see the gif background behind it for a split second.
 
Last edited:

mogwai

1984
Veteran
Joined
Jun 10, 2014
Messages
875
Reaction score
591
First Language
English
Primarily Uses
RMMV
My script (without doublecheck) is supposed to completely blank out the 2 functions that draw the battlebacks.

Did you clip that part out?

It only looks non-functional, but the empty function has the purpose of simply running nada and returning undefined, so I don't have to remove it in all the other functions that call it.

My only other guess is that, you have a background plugin? I'm not familiar with screen shaking.
 

Wrongful

$ sudo ./help_pls.sh
Veteran
Joined
Jan 31, 2017
Messages
62
Reaction score
7
First Language
English
Primarily Uses
RMMV
Might be necropost, but no, the script was added as is.

And no, I have no background plugins. Not sure why you've never seen the screen shake, but it happens for me.

Also, I have found that when the player enters a room where not every tile on the room was filled(meaning there are gaps of negative space), the gif appears in the background instead.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top