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.

Widescreen

Vent

Member

I've been trying to get the application to run in widescreen to get the most out of my monitor. I didn't even come close to achieving it. It seems like nobody really thought of this, but I think it is a pretty good idea. Does anybody want to try it?
 

Mac

Member

Simple, all you need to do is change the viewports in Spriteset_Map, just replace your old one with this.
Code:
#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
#  This class brings together map screen sprites, tilemaps, etc.
#  It's used within the Scene_Map class.
#==============================================================================

class Spriteset_Map
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Make viewports
    @viewport1 = Viewport.new(0, 40, 640, 400)
    @viewport2 = Viewport.new(0, 40, 640, 400)
    @viewport3 = Viewport.new(0, 40, 640, 400)
    @viewport2.z = 200
    @viewport3.z = 5000
    # Make tilemap
    @tilemap = Tilemap.new(@viewport1)
    @tilemap.tileset = RPG::Cache.tileset($game_map.tileset_name)
    for i in 0..6
      autotile_name = $game_map.autotile_names[i]
      @tilemap.autotiles[i] = RPG::Cache.autotile(autotile_name)
    end
    @tilemap.map_data = $game_map.data
    @tilemap.priorities = $game_map.priorities
    # Make panorama plane
    @panorama = Plane.new(@viewport1)
    @panorama.z = -1000
    # Make fog plane
    @fog = Plane.new(@viewport1)
    @fog.z = 3000
    # Make character sprites
    @character_sprites = []
    for i in $game_map.events.keys.sort
      sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
      @character_sprites.push(sprite)
    end
    @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
    # Make weather
    @weather = RPG::Weather.new(@viewport1)
    # Make picture sprites
    @picture_sprites = []
    for i in 1..50
      @picture_sprites.push(Sprite_Picture.new(@viewport2,
        $game_screen.pictures[i]))
    end
    # Make timer sprite
    @timer_sprite = Sprite_Timer.new
    # Frame update
    update
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    # Dispose of tilemap
    @tilemap.tileset.dispose
    for i in 0..6
      @tilemap.autotiles[i].dispose
    end
    @tilemap.dispose
    # Dispose of panorama plane
    @panorama.dispose
    # Dispose of fog plane
    @fog.dispose
    # Dispose of character sprites
    for sprite in @character_sprites
      sprite.dispose
    end
    # Dispose of weather
    @weather.dispose
    # Dispose of picture sprites
    for sprite in @picture_sprites
      sprite.dispose
    end
    # Dispose of timer sprite
    @timer_sprite.dispose
    # Dispose of viewports
    @viewport1.dispose
    @viewport2.dispose
    @viewport3.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # If panorama is different from current one
    if @panorama_name != $game_map.panorama_name or
       @panorama_hue != $game_map.panorama_hue
      @panorama_name = $game_map.panorama_name
      @panorama_hue = $game_map.panorama_hue
      if @panorama.bitmap != nil
        @panorama.bitmap.dispose
        @panorama.bitmap = nil
      end
      if @panorama_name != ""
        @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
      end
      Graphics.frame_reset
    end
    # If fog is different than current fog
    if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
      @fog_name = $game_map.fog_name
      @fog_hue = $game_map.fog_hue
      if @fog.bitmap != nil
        @fog.bitmap.dispose
        @fog.bitmap = nil
      end
      if @fog_name != ""
        @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
      end
      Graphics.frame_reset
    end
    # Update tilemap
    @tilemap.ox = $game_map.display_x / 4
    @tilemap.oy = $game_map.display_y / 4
    @tilemap.update
    # Update panorama plane
    @panorama.ox = $game_map.display_x / 8
    @panorama.oy = $game_map.display_y / 8
    # Update fog plane
    @fog.zoom_x = $game_map.fog_zoom / 100.0
    @fog.zoom_y = $game_map.fog_zoom / 100.0
    @fog.opacity = $game_map.fog_opacity
    @fog.blend_type = $game_map.fog_blend_type
    @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
    @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
    @fog.tone = $game_map.fog_tone
    # Update character sprites
    for sprite in @character_sprites
      sprite.update
    end
    # Update weather graphic
    @weather.type = $game_screen.weather_type
    @weather.max = $game_screen.weather_max
    @weather.ox = $game_map.display_x / 4
    @weather.oy = $game_map.display_y / 4
    @weather.update
    # Update picture sprites
    for sprite in @picture_sprites
      sprite.update
    end
    # Update timer sprite
    @timer_sprite.update
    # Set screen color tone and shake position
    @viewport1.tone = $game_screen.tone
    @viewport1.ox = $game_screen.shake
    # Set screen flash color
    @viewport3.color = $game_screen.flash_color
    # Update viewports
    @viewport1.update
    @viewport3.update
  end
end
 
it's not that simple Mac, you'd have to change a few values in Game_Map and Game_Player too.
But I don't think that's what Vent actually wants.

You want the game to play in a higher resolution than 640*480 right?
If yes, I created a script that allows you to do that.
But let me warn you, it will just resize the window. The defaults scripts (which some of are hard coded in RMXP) were made for a window resolution of 640*480. There are a few rewrites of those scripts lying around here and there but they don't work as efficiently as the default ones do.
 

Vent

Member

Yes, I was trying to change the resolution to a 16:9 ratio. So with your script (Selwyn) would it make full screen mode fit to the display? If it doesn't, it's cool anyway, I still want to see it. Thank you two for helping me out.
 
my script allows to change the fullscreen mode resolution too.

But let me warn you, implimenting my script is easy, but you'll have to have an incredible RGSS knowledge to make all the changes for the map, menus and battle systems...

A lot of the people who tried to do it abandonned because of RMXP's limitations...
 

Vent

Member

Oh, I'm not an expert with RGSS but I have some knowledge. If it involves changing menu layouts and other things that are similar, then I have it down, but if not, I guess I can say that I wouldn't be able to fully fit my game to the script, right?
 
That's weird, I was sure that someone already made a 16:9 resolution script here. :-/ I guess I was wrong.':| Anyway, you're right Selwyn. I have tried to make this script once but it was way to hard!

Don't you think that it's possible to enlarge the resolution and then stretch the viewport or something like that?
 
You don't need a script to make the game run in widescreen. If you want it outside of 640 x 480 size then yes. If not go into an art program like paint or whatever. Make the size 640 x 480 and draw 2 black lines at the top and bottom about 50 pixels wide and the full 640 long. Then save as png and when importing make the white the transparent. Now do show picture and your done! instant widescreen!
 

KAIRE

Member

true wide screen should not have any black blank part on top or buttom. unless you're viewing it on a 4:3 TV set. but if you view it on a 16:9 tv/monitor set(wide screen monitor/tv) it should full up the whole screen without any blank black spot on top and buttom. i would like a 16:9 aspect ratio script myself so i can play it on my brother's wide screen HDTV with full view.
 
There is one way to do it without scripts.
You could just take every single graphic in your game, and smash the picture (making it all 'skinny'). Then, when you play the game on your wide screen TV just set the TV's option to full screen and the RPG's image will be stretched back into looking normal. Downside would be that you could only play the game on a wide screen TV or it will look distorted, unless you wanted to do something crazy like make two of every graphic (one designed for 4:3 the other for 16:9). The upside would be that you would get to use the entire 16x9 area, no black bars or distorted looks. Who cares about those poor suckers without HD sets anyways? They need to get with the 21st century, right? (j/k)
 

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