Main Menu
  • Welcome to The RPG Maker Resource Kit.

[VXA] Title screen stretch

Started by apoclaydon, April 02, 2012, 07:23:21 PM

0 Members and 1 Guest are viewing this topic.

apoclaydon

hi all im using yanflys core engine and i can get all battle backgrounds and menus to stretch to fit the screen but i can not get the title screen to auto stretch can some one help here

DoctorTodd

I'll check for one but you can just export the file and then set the dimensions to 640 X 480 with PS or GIMP.

apoclaydon

yh i know you can do that just trying to save copying files and making the project bigger

modern algebra

Well, you could paste the following into its own slot in the Script Editor:

class Scene_Title
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Create Background
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias apoclaydon_stretchtitle_createbg_2hj9 create_background
  def create_background(*args, &block)
    apoclaydon_stretchtitle_createbg_2hj9(*args, &block) # Call Original Method
    [@sprite1, @sprite2].each { |sprite|
      bmp = sprite.bitmap
      sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
      sprite.bitmap.stretch_blt(sprite.bitmap.rect, bmp, bmp.rect)
      bmp.dispose
      center_sprite(sprite)
    }
  end
end


Untested, but it ought to work as long as the screen is resized before the title screen is created.

apoclaydon

that worked great thank you i know this is a cheeky req but how hard would it be to stretch video files to fit the screen resolution?

modern algebra

I haven't investigated, but I think it would be hard. I think you'd need to entirely rewrite the way that video files are played.

LoganF

The help file says this:

"Movies are displayed over the center of the game screen. Movies larger than the screen size (544×416) will have their edges cut off to fit within the screen."

Have you tried using a video that has the resolution of the new screen size? It may not be cut due to the game resolution being larger now. If it does work, you can probably use other software tools to scale up the video as desired.

Note: I can't say I have too much knowledge about this subject, so I'm going by what sounds intuitively logical.
(Why do I always feel like it's the end of the world and I'm the last man standing?)

modern algebra

@Logan - yeah, but I got the impression he was looking to give the player a configurable option to determine resolution and didn't want to include two copies of every resource. I am inferring that from this exchange:

Quote from: DoctorTodd on April 02, 2012, 07:26:27 PM
I'll check for one but you can just export the file and then set the dimensions to 640 X 480 with PS or GIMP.
Quote from: apoclaydon on April 03, 2012, 06:17:19 PM
yh i know you can do that just trying to save copying files and making the project bigger

apoclaydon

yh modern algebra is correct but if its not possible then i'll have 2 rethink

LoganF

It was more of a suggestion of a way to try solve the issue, since the more obvious way of scripting it would appear to be a little difficult. It wouldn't be too bad if you could see inside Graphics and see what that normally does to try to add something to it.

It's obvious from the description in the help file that videos especially aren't scaled down if they are bigger, thus implying that no algorithm exists in the coding for down or upscaling. You'd have to do this yourself.

The thing about scaling is that if you stretch it too much you end up with artefacts, unless you do some kind of upscaling before you apply the image. The same would be true of videos.

It may be possible using video processing ideas, but how much work it would take I have no idea. It may also limit the platforms that can play the game. Considering that videos are only cut when larger than the resolution and are played centrally in the window, as long as the resolution that a player chooses isn't less than the video resolution, and was maybe proportional to the video, it wouldn't look awful. A lot of old games used to have a set video resolution but had scaled images, probably because it was easier to render images in different resolutions than videos.
(Why do I always feel like it's the end of the world and I'm the last man standing?)