MV How do I...make a fog-image loop over my game map?

So I have an area in my game where there will be a hazy fog that loops across the screen (on top of everything). What is the best way to go about implementing this? I have created a fog image, but I can't seem to find an efficient way to get the picture to loop across the screen. How can I make the fog continuously "loop" across the screen?
I think you'd need a plugin for this one. Victor Engine has one.


With Plugins, though, you don't have to worry about creating it from scratch as it can become a pain using Parallel Process. Especially on older games. I hope this help you. Or rather, that it's what you want.
On console you could just use a foreground image in the map settings. Then set the vertical and horizontal speed.
Moved to: Plugin Requests

@TidalwaveKnight we do not support the console versions here. The question is about MV on PC or Mac, which does not have a Foreground Image option in the map settings.
Moved to: Plugin Requests

@TidalwaveKnight we do not support the console versions here. The question is about MV on PC or Mac, which does not have a Foreground Image option in the map settings.
Maybe you should. Not like being on pc means anyone is actually doing something more worthwhile. Lots of stuff can carry over anyway. I learned by watching PC tutorials. I was curious if you all did have access to foregrounds like me but for some reason you don't. Pretty dumb. Anyway, if this place is elitist I'll probably just get out of here. Sounds like you all really like to pretend being on PC makes you better at this.
Maybe you should.

Anyway, if this place is elitist I'll probably just get out of here. Sounds like you all really like to pretend being on PC makes you better at this.

It's got nothing to do with it. These forums are owned by Degica, who are the distributors of the English PC/Mac versions of RPG Maker. If Degica distributed the console versions, we'd include them as well. But they do not.

Some of the other fan forums might include consoles.
Maybe you should. Not like being on pc means anyone is actually doing something more worthwhile. Lots of stuff can carry over anyway. I learned by watching PC tutorials. I was curious if you all did have access to foregrounds like me but for some reason you don't. Pretty dumb. Anyway, if this place is elitist I'll probably just get out of here. Sounds like you all really like to pretend being on PC makes you better at this.
Woah woah... Bit hasty there. As @Shaz explains it simply is a matter of distrubution nothing more, nothing less. No need to jump to (wrong) conclusions and go on the offensive here.
I think you'd need a plugin for this one. Victor Engine has one.


With Plugins, though, you don't have to worry about creating it from scratch as it can become a pain using Parallel Process. Especially on older games. I hope this help you. Or rather, that it's what you want.

Do you know if there's a way to do it without plugins? Maybe a parallel process trick?
I don't mind using a plugin on this particular project if needed, but if I were to try and do it myself...I'd prefer to be able to do it myself so that I can customize it as needed.
You could make your image at least twice the size of the game window. Use a parallel process that does a Show Picture (with anchor at centre) at 0,0, then a Move Picture with x and y set to the width and height of your screen, in however many seconds you want to take.

This should result in a repeating loop where the image scrolls across then jumps back to the original point and scrolls again. Experiment with the x and y. What you might have issues with is a visual glitch when the image jumps back, or if you change the x and y because you don't want it to scroll at that angle and the image doesn't "repeat" well. You might also have issues with the layering of the image and events.
Do you know if there's a way to do it without plugins? Maybe a parallel process trick?
I don't mind using a plugin on this particular project if needed, but if I were to try and do it myself...I'd prefer to be able to do it myself so that I can customize it as needed.
It is as @Shaz explains. I can still teach you if you want. Doing it through Parallel Process as I explained would be a bit harder than Plugins but still easy to make. Just that the repeat process is all it is. Nothing smooth as far as doing it through Common Event or Map Events. Also, can cause some lag factor that would be annoying.

Anyway, for fog style, I'd do this.

Picture #1: X: -100 Y: 0

Set the images size a slightly bit larger like say... 150%-200%.

You can control the Opacity however you want. If you didn't use a transparent image, I'd simply set those to 100 as if it's foggy.

Then I'd set the Looping command and use the Move Picture command. Make sure the size is the same as when you set the picture. Same with the Opacity. Then to move the picture set it to X: 1000 Y: 0

As for the wait frame, for me, I'd set it to 600 or 999. It doesn't matter as it's however you want it.

And then I'd add another move Picture the same exact way with the same frame. Only different is it needs to be X: -100 again. That way the fog goes back and forth.

I hope this helps.
The easiest way to emulate the fog effect of old RPGMakers is to have an image that would fit 4 game windows in it (double width, double height). In theory:
Startup:
  1. Show picture
  2. Initialize two variables (from here on fogX and fogY) to 0
Each frame:
  1. Increment fogX or fogY as you like (a flat amount for moving fog, or you can also add some based on the character movement to move it with the landscape)
  2. Assign the two variables to their modulo screen dimension result (ie. fogX = fogX modulo <screen width>)
  3. Move picture to the fogX and fogY coords.
I'll see if I can put together an example for you. This will work down to 1 pixel per frame. If you want slower than that, a little extra variable processing is required, but definitely still possible.

While technically possible using the above with events, it will cause additional lag compared to a plugin equivalent. Just worth keeping in mind.
Here's a method for using an image that isn't the same thing tiled 4 times, this instead loops the image for you.
This example uses a fog graphic the same size as the screen resolution. You can change the Graphics.width and Graphics.height references to the size of your source image if you're using an image bigger than the screen. Smaller than the screen won't work here.
Note: make sure "wait for move completion" for the "Move Picture" is unchecked.
If you need it to scroll even slower, increase the wait at the end of the loop.

Spoiler: screen-only
screen_only.png
Spoiler: screen-only preview


Here's one that also moves with the world:
Spoiler: moves with world
world.png
Spoiler: world preview
Here's a method for using an image that isn't the same thing tiled 4 times, this instead loops the image for you.
This example uses a fog graphic the same size as the screen resolution. You can change the Graphics.width and Graphics.height references to the size of your source image if you're using an image bigger than the screen. Smaller than the screen won't work here.
Note: make sure "wait for move completion" for the "Move Picture" is unchecked.
If you need it to scroll even slower, increase the wait at the end of the loop.

Spoiler: screen-only
View attachment 186104
Spoiler: screen-only preview


Here's one that also moves with the world:
Spoiler: moves with world
View attachment 186105
Spoiler: world preview


Thank you! When I get time I will go ahead and test it, and let you know how it turns out.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-a-fog-image-loop-over-my-game-map.135445/