Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Blurred Screenshot as Menu Background in RMXP?

I'm a noob making a game in RMXP, and I've trimmed the borders of my custom menu so that it doesn't take up the whole screen, and rather than leaving the background black, I'd like to fill the background with a blurred image of the area the player is in, a 640x480 screenshot, for instance, taken at the moment of pausing the game (going to the menu). Is this possible to achieve in RMXP? I think VX does it, but not sure about XP.

I'd like to get it blurred, even filtered in some way to desaturate it or something, but I'd settle for just having a screen of the background. Makes the menu seem less claustrophobic.

Oh, crap. Then I gotta make the menu slightly transparent. I bet that's easy though, right?
 
Making the menu windows transparent is easy indeed... you can use @window.opacity or @window.back_opacity (I suggest the latter) from within the scene, or simply opacity / back_opacity inside the window's class. Note that you have to set it to a value between 0 (completely invisible) and 255 (completely visible).

For the filtering, RMVX uses a method within Sprite, I think... either way, you can't just copy&paste it because it's a hidden script. So yeah, what you of course CAN do is writing the blurring algorythm yourself, which shouldn't be too hard after you're into coding a bit, while I suppose it'd be a bit laggy... I think there's already a custom blur script out there somewhere... I'd be surprised if there weren't really ^^"

For your filters, it depends... basically, you can write monster algorythms for bitmap processing, but keep in mind that whichever RPG Maker lacks the resources for complex algorythms, so yeah... as long as you keep it simple enough (pixel-wise color processing, ...), you could go for it - everything above (next-pixel color processing, ...) might punch your performance too much.
 
Cool. For now I'll go with just taking a snapshot of the screen to use as the background, without any filtering added. So the script to take the snapshot and store it is hidden?

I used this in Scene_Menu: @spriteset = Spriteset_Map.new and @spriteset.dispose at the end and it worked! I'd like to desaturate it at least if that's a simple algorithym. I'll take a look in Sprite to see if that function is there!

I'm making my own menu! THIS IS AWESOME! I've been trying to figure out ruby for years, but not I think i got it. It's just a matter of syntax now, which the Help file helps with!

Well, I think I figured out how to make MENUS using Ruby...nothing too much more complex than that. YET!
 
This is so lame. How do I make that background image change color or tone when the menu comes up? I think I'm creating a new tone object in def_initialize in Scene_Menu, but I don't know the wording to make it apply the tone to @spriteset = Spriteset_Map.new

I wish the Help file had more "conjugated" examples of how to put pieces of code together.
 
Actually, those examples are the RGSS scripts within every default project of RPG Maker ;) But I guess if you're a beginner, you want to check this out, especially the page about Built-In Classes and Methods, which is so utterly helpful I can't even describe it. Make sure to check it out!

Other than that, if you're not using an image, but the actual map as background (aka Spriteset_Map), you need to set the map tone spec to grayscaled. You should find the necessary methods within Game_Interpreter (the class that stores the event command script part) if you look for the method that handles the Change Screen Tone processing.
Remember to save the current screen tone values before you change the tone to grayscale, or else that could lead to some bugs you don't want.

For screenshots, you'd have to rely on non-default scripts if you're using RMXP - RMVX has it in it's basic functionalities. If you need one, keep a look out for Squall's/Selwyn's screenshot script.
 
Well to keep the map displayed when changing a scene, like without the black space, just put this is a new script section above main.

Code:
 

class Scene_Map

  def main

    @spriteset = Spriteset_Map.new

    @message_window = Window_Message.new

    Graphics.transition

    loop do

      Graphics.update

      Input.update

      update

      if $scene != self

        break

      end

    end

    Graphics.freeze

    @message_window.dispose

    if $scene.is_a?(Scene_Title)

      Graphics.transition

      Graphics.freeze

    end

  end

end

 

Then all you have to worry about is the blurring :)

Hope this helped!
 
It won't help, because you wouldn't be able to blur a running game on the fly other than with appropriate filters (which would be way harder to accomplish than a screenshot script), so - if you have to take screenshots, you might as well take them while you're still on the map.

Also, your method is highly unclean coding, since you're simply not disposing the spriteset. If anything, add a new @spriteset to Scene_Menu.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top