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

Joined
Jul 12, 2020
Messages
134
Reaction score
25
First Language
English
Primarily Uses
RMMV
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?
 

JacSkulls

Veteran
Veteran
Joined
May 4, 2020
Messages
137
Reaction score
34
First Language
English
Primarily Uses
RMVXA
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.
 
Joined
Apr 11, 2021
Messages
7
Reaction score
16
First Language
English
Primarily Uses
RMMV
On console you could just use a foreground image in the map settings. Then set the vertical and horizontal speed.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,189
Reaction score
14,662
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.



@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.
 
Joined
Apr 11, 2021
Messages
7
Reaction score
16
First Language
English
Primarily Uses
RMMV
[move]Plugin Requests[/move]

@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.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,189
Reaction score
14,662
First Language
English
Primarily Uses
RMMV
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.
 

Finnuval

World (his)story builder and barrel of ideas
Veteran
Joined
Aug 1, 2018
Messages
2,196
Reaction score
7,524
First Language
Dutch
Primarily Uses
RMMV
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.
 
Joined
Jul 12, 2020
Messages
134
Reaction score
25
First Language
English
Primarily Uses
RMMV
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.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,189
Reaction score
14,662
First Language
English
Primarily Uses
RMMV
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.
 

JacSkulls

Veteran
Veteran
Joined
May 4, 2020
Messages
137
Reaction score
34
First Language
English
Primarily Uses
RMVXA
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.
 

ZenVirZan

Villager
Member
Joined
May 13, 2020
Messages
19
Reaction score
26
First Language
English
Primarily Uses
RMXP
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.
 

ZenVirZan

Villager
Member
Joined
May 13, 2020
Messages
19
Reaction score
26
First Language
English
Primarily Uses
RMXP
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.

screen_only.png

Here's one that also moves with the world:
world.png
 
Last edited:
Joined
Jul 12, 2020
Messages
134
Reaction score
25
First Language
English
Primarily Uses
RMMV
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.

View attachment 186104

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

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

Latest Threads

Latest Profile Posts

After gathering, sorting out & reconsidering hundreds of enemy battlers over the last two das, finally my favorite part begins: Inventing names and lore for them all :D
I'm running a sale for Learn RPG Maker MV on Itch.io, can I compete with NSFW games earning goals?
Another Friday and another Zoom call that could have been an email. Working from home is awesome.
Finished with the semester; finally have some time to play around with MV :kaopride:
Started work on the fishing Mini-Game

Forum statistics

Threads
111,371
Messages
1,060,536
Members
144,698
Latest member
punisama
Top