Neo_Kum0rius_6000

Not Your Ordinary Guy!
Veteran
Joined
Nov 8, 2017
Messages
196
Reaction score
349
First Language
english
Primarily Uses
RMVXA
So I played Shovel Knight the other day and I love the games
fading. It mimics old NES games. I wan't a fading to show
4 frames of shading to look like an NES game same can be applied to
fading in. Which default script holds the code for the fading in and fading out?
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Scene_Map:
Code:
  #--------------------------------------------------------------------------
  # * Fadein Screen
  #--------------------------------------------------------------------------
  def fadein(duration)
    fade_loop(duration) {|v| Graphics.brightness = v }
  end
  #--------------------------------------------------------------------------
  # * Fadeout Screen
  #--------------------------------------------------------------------------
  def fadeout(duration)
    fade_loop(duration) {|v| Graphics.brightness = 255 - v }
  end
  #--------------------------------------------------------------------------
  # * Screen Fade In (White)
  #--------------------------------------------------------------------------
  def white_fadein(duration)
    fade_loop(duration) {|v| @viewport.color.set(255, 255, 255, 255 - v) }
  end
  #--------------------------------------------------------------------------
  # * Screen Fade Out (White)
  #--------------------------------------------------------------------------
  def white_fadeout(duration)
    fade_loop(duration) {|v| @viewport.color.set(255, 255, 255, v) }
  end
 

Neo_Kum0rius_6000

Not Your Ordinary Guy!
Veteran
Joined
Nov 8, 2017
Messages
196
Reaction score
349
First Language
english
Primarily Uses
RMVXA
Scene_Map:
Code:
  #--------------------------------------------------------------------------
  # * Fadein Screen
  #--------------------------------------------------------------------------
  def fadein(duration)
    fade_loop(duration) {|v| Graphics.brightness = v }
  end
  #--------------------------------------------------------------------------
  # * Fadeout Screen
  #--------------------------------------------------------------------------
  def fadeout(duration)
    fade_loop(duration) {|v| Graphics.brightness = 255 - v }
  end
  #--------------------------------------------------------------------------
  # * Screen Fade In (White)
  #--------------------------------------------------------------------------
  def white_fadein(duration)
    fade_loop(duration) {|v| @viewport.color.set(255, 255, 255, 255 - v) }
  end
  #--------------------------------------------------------------------------
  # * Screen Fade Out (White)
  #--------------------------------------------------------------------------
  def white_fadeout(duration)
    fade_loop(duration) {|v| @viewport.color.set(255, 255, 255, v) }
  end
Thanks so much!!!
By the way could you make me an edit for the fadeout I'am looking for?
And this doesn't work for the transfer command. I wan't something that
works on maps...
 
Last edited:

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Thanks so much!!!
By the way could you make me an edit for the fadeout I'am looking for?
What an annoying way to try and segue into a script request.
The script snippet above is with default RPG Maker projects. Find it in your project and adjust the values there; this isn't something that needs to be added to your game. There's also code below that I think to adjust fadeout/in speed.

In your case you could adjust the fadeout/in speed to 0 frames, and then make 2 common events with tint screens (adjusting darkness and hue) to emulate the screen going darker (fadeouts) and lighter (fadeins) and place them before/after transfers.
The NES fades are color-palette based, so an accurate recreation of it wouldn't work with a simple solution like this.
https://forums.nesdev.com/viewtopic.php?f=2&t=8927
 

Romanticist

Veteran
Veteran
Joined
Oct 8, 2015
Messages
215
Reaction score
83
First Language
English
Primarily Uses
RMMV
What an annoying way to try and segue into a script request.

Ouch. That was kind of rude. This IS the script request forum.

this isn't something that needs to be added to your game.

I'm sorry but this is such a BS excuse, I'm sick of seeing it on this forum >_>
Minor aesthetic changes can greatly make a game seem more authentic, especially when trying to emulate retro games. I appreciate the request of a more authentic retro screen fade; every little thing counts. Honestly I dislike when retro games try to "look" retro but there are so many technical things that breaks immersion and says, "oh, this is actually just a modern impersonation of a retro game". Smooth fade transitioning would definitely break the immersion for an NES-like game.
Personally, I would use common events, but in OP's new thread he specifies that he's already using a lot of common events and therefore doesn't want to lag the game anymore. Perfectly understandable.

OP, if no one is willing to make a script (which is also understandable; people are doing this out of charity, so they are not obligated) then I do recommend finding out a light-weight way to make a common event; perhaps you can only activate it with a Common Event Call, instead of running it all the time with parallel process. This should make it so that your game won't lag or crash.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,211
Reaction score
7,484
First Language
Indonesian
Primarily Uses
RMVXA
retrofade2.gif
Something like this? The best thing I can do.
 

ZirconStorms

Veteran
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
111
First Language
English
Primarily Uses
RMVXA
Ouch. That was kind of rude. This IS the script request forum.



I'm sorry but this is such a BS excuse, I'm sick of seeing it on this forum >_>
Minor aesthetic changes can greatly make a game seem more authentic, especially when trying to emulate retro games. I appreciate the request of a more authentic retro screen fade; every little thing counts. Honestly I dislike when retro games try to "look" retro but there are so many technical things that breaks immersion and says, "oh, this is actually just a modern impersonation of a retro game". Smooth fade transitioning would definitely break the immersion for an NES-like game.
Personally, I would use common events, but in OP's new thread he specifies that he's already using a lot of common events and therefore doesn't want to lag the game anymore. Perfectly understandable.

OP, if no one is willing to make a script (which is also understandable; people are doing this out of charity, so they are not obligated) then I do recommend finding out a light-weight way to make a common event; perhaps you can only activate it with a Common Event Call, instead of running it all the time with parallel process. This should make it so that your game won't lag or crash.
When I said "this isn't something that needs to be added to the game", I meant the script snippet I posted doesn't literally need to be pasted into the editor; it could have looked like a script snippet/add-on so I wanted to clarify that it was just default code (in reference to his original request/post)
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,211
Reaction score
7,484
First Language
Indonesian
Primarily Uses
RMVXA
Code:
class Scene_Map
  Duration = 40*2
  #--------------------------------------------------------------------------
  # * Fadein Screen
  #--------------------------------------------------------------------------
  def white_fadeout(duration)
    duration = Duration
    @tone = $game_map.screen.tone.clone
    fade_loop(duration) do |v|
      if v <= Duration*0.5
        $game_map.screen.tone.blue = -255
      elsif v <= Duration*0.75
        $game_map.screen.tone.red = -255
      else
        $game_map.screen.tone.green = -255
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Fadeout Screen
  #--------------------------------------------------------------------------
  def white_fadein(duration)
    duration = Duration
    fade_loop(duration) do |v|
      if v <= Duration*0.25
        $game_map.screen.tone.blue = @tone.blue
      elsif v <= Duration*0.50
        $game_map.screen.tone.red = @tone.red
      elsif v <= Duration*0.75
        $game_map.screen.tone.green = @tone.green
      else 
        break
      end
    end
  end
end
I overwrite the white fadeout so you have to use that.
 

Neo_Kum0rius_6000

Not Your Ordinary Guy!
Veteran
Joined
Nov 8, 2017
Messages
196
Reaction score
349
First Language
english
Primarily Uses
RMVXA
Code:
class Scene_Map
  Duration = 40*2
  #--------------------------------------------------------------------------
  # * Fadein Screen
  #--------------------------------------------------------------------------
  def white_fadeout(duration)
    duration = Duration
    @tone = $game_map.screen.tone.clone
    fade_loop(duration) do |v|
      if v <= Duration*0.5
        $game_map.screen.tone.blue = -255
      elsif v <= Duration*0.75
        $game_map.screen.tone.red = -255
      else
        $game_map.screen.tone.green = -255
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Fadeout Screen
  #--------------------------------------------------------------------------
  def white_fadein(duration)
    duration = Duration
    fade_loop(duration) do |v|
      if v <= Duration*0.25
        $game_map.screen.tone.blue = @tone.blue
      elsif v <= Duration*0.50
        $game_map.screen.tone.red = @tone.red
      elsif v <= Duration*0.75
        $game_map.screen.tone.green = @tone.green
      else
        break
      end
    end
  end
end
I overwrite the white fadeout so you have to use that.
Dude thank you so much!!!
It looks like I owe you one Theo!
 

Latest Posts

Latest Profile Posts

Quite the versatile cast so far :p

chars.PNG

Edit: Sprites are made by Alexdraws and TheMightyPalm. I just edited them.
Degica Games Turn Komodo | RPG Maker News #77

Well, rats. Was really looking forward to trying out FPS Creator, but trying to install and set it up was pretty much impossible for my tiny brain to comprehend. So much for that, then.
Ah, home once more! I think I can safely work on my games now.
Let's hope power remains on for the day

Forum statistics

Threads
112,412
Messages
1,068,115
Members
146,062
Latest member
BuckyBattleBorn
Top