RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[XP] Trying for Better Fog / Cloud Scrolling

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 70
RMRK Junior
So I was trying to accomplish something, either by Event or Script, doesnt matter much to me, but I wanted to change the way that a Fog Scrolls.

What I'd like to do is that when the character is moving AND the screen is scrolling, adjust the Fog so it looks like it is above the player.  Like the way Phantasy Star 2 (Sega Genesis, very old) had its overhead wiring stuff.

The way I came up with didnt work.  I got to the edge of a map and the fog speed did adjust, but when the screen wasnt scrolling, it didnt look right, so I decided to scrap that method.  I was kind of hoping there was a really simple solution to this, either by an existing script, slap together a new one that doesnt burden anyone with tons of effort, or a parallel event.  My scripting skills are lousy at best, but I did figure out how to use     $game_player.moving? to get a variation (that needs a tweak) of the fog scroll speed with an event and switches.  Just looking to make it look less crappy.

Any advice?
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

***
Rep:
Level 70
RMRK Junior
Bump.  (after 24 hours, and my only bump...)

Does anyone think that I might have better luck if I made this a Script Request?
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
I'm not really sure what you're asking for? Do you just want the fog to be fixed to the screen instead of the map? If so, why not just use a picture?

***
Rep:
Level 70
RMRK Junior
I'll see if I can explain better.

Fog can move.  Normal part of RMXP. 

What I am hoping to accomplish is that when the player is moving, the Fog scrolls at a different speed, relative to the players speed and direction.  The problem I ran into is that when the Player reaches a part of a map that is close to the literal edge and the map no longer scrolls and the player can still move, changing the Fog Speed seems to look screwy.  Thus, the only thing that I could come up with is that when the player moves is when the screen scrolls.  But that just makes it too complex so throw out player movement part completely. 

When the screen scrolls, adjust Fog Scroll speed relative to the direction and speed that the screen is scrolling.

My uploaded file is a scene for an "Infinite Void" that kind of has the effect I am looking for, but it doesnt look right if there are objects or other sprites in the scene.

http://www.775.net/~heretic/downloads/rmvx/FogScroll.exe

I think the example might help it to make more sense than I can verbally...
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

***
Rep:
Level 70
RMRK Junior
Bump.

would "need_update" from scene_map work to detect when the screen is going to scroll or not?  If not, how about distance from edge that the map would normally scroll?

Anyone?
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

***
Rep:
Level 70
RMRK Junior
Bump.  Anyone?  (Trying not to bump too much, but still hoping for a little help on this, maybe I need a better explanation...)
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

**
Rep: +0/-0Level 63
RMRK Junior
Is your goal to have the fog move at a constant speed regardless of the direction of travel, or if not even traveling at all?

For example:

Would you like the fog to scroll at a speed of 1 when the character is traveling up/down/left/right?

or would you like the fog to scroll at a speed of 1 when the character is traveling up/down but a speed of 5 when the character is traveling left/right?

***
Rep:
Level 70
RMRK Junior
Is your goal to have the fog move at a constant speed regardless of the direction of travel, or if not even traveling at all?

For example:

Would you like the fog to scroll at a speed of 1 when the character is traveling up/down/left/right?

or would you like the fog to scroll at a speed of 1 when the character is traveling up/down but a speed of 5 when the character is traveling left/right?

I think what I am asking for is the exact opposite of your first sentence.  The fog moves at different speeds relative to the speed and direction that the screen is scrolling.

Im not dead set on specific speeds, but kind of close to the way your mentioning.  Essentially, I'm hoping to create more of an "Illusion" that the Fog layer is behaving more like clouds much higher than the character, if that makes a lick of sense, it is so hard to explain.  And Im trying really hard to think of a way to explain it that isnt confusing.  Let me try this way.

Say there is a "Light Breeze", so when the character is standing still, the Fog scrolls Down Right (direction doesnt really matter) at a speed of 1.  But when the Screen is Scrolling, the Fog scrolls in addition to the way the screen is moving, so like if the character were moving straight up, and say their speed was set to 4 (I think that is default character move speed, usually), the Fog would move Right still at 1, but Down at 1 + 4 so 5.  What I think will happen is that it will appear to the player as if the Fog Layer is much higher up than the character and the "Camera" is higher than the clouds, giving a birds eye perspective, of sorts.

I'll try again, same idea and math.  Character is moving right AND Screen is Scrolling, the Fog would scroll down at its default speed of 1, But since the character is moving Right at a speed of 4, the Fog would move at 1 - 4 so it would actually go the other direction at a speed of -3.  If the character moved Left, the fog would scroll Right at 1 + 4 so its Right Speed would be 5, and Down Speed would still be 1.  So character moving Down (Screen Scrolls Down), same speed, the Fog would scroll UP at a speed of 3, because 1 - 4 = -3, and the Negative just means the opposite direction.

But fog speed is completely dependant on the speed and direction the screen is scrolling, this usually assumes that the Player is moving, or could be a cutscene as well I guess, but basically only to take effect when the screen is scrolling, so if the player is close to the edge of a map and the screen is NOT scrolling, the fog speeds return to default.  I tried to show that in the Demo / Example Download above (game jumps straight into it).

Does that make any sense?  It barely makes sense to me.

Ok, I thought of something.  Take a look at this YouTube video of how the Map (not the Combat) makes it look like there is a set of Pipes above the Player.  (Clouds didnt show up too well in the Video, so I went for the Pipes version.)  Just think of replacing the Pipes with Fog that is moving slowly.  That is kind of the effect I'm hoping for...

http://www.youtube.com/watch?v=rFJUVdAzFb8

(totally off topic, but is there a way to embed YouTube videos on this forum?)
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

***
Rep:
Level 70
RMRK Junior
Bump (just once...)

Im hoping this would be a simple script, just need to know how to check of the screen is moving, not the character...
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!

***
Rep:
Level 70
RMRK Junior
Ok.  Made my own with some help.


(custom fog with an Alpha Channel, looks way better than default ones that came with RMXP IMHO)

Demo:  http://www.775.net/~heretic/downloads/rmxp/CloudAltitude.exe

Needs the Script and a Parallel Process in the Demo to work.  Im sure it could be done better by doing it all in the script, beyond my ability right now, but this will suffice.

I should note that screenshot only shows off the Alpha Channel Fog, but not the effect the script was trying to create.  I called it Cloud Altitude.
Heretic's Vehicles XP (Boat and Magic Carpet)

Heretic's Collection XP Ver 2.3 - Updated to include Dynamic Lighting, Moving Platforms, Vehicles, and much much more!