• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Resolution and Window Size Demo

Would you actually use this in a game?

  • Definitely!

    Votes: 14 100.0%
  • Why? I don't want it...

    Votes: 0 0.0%

  • Total voters
    14

Glitchfinder

Let's all get along, please?
477
Posts
17
Years
  • Hi! I was looking around RMXP.org, and I found some interesting scripts. So, I decided to use them and manipulate them a little, resulting in this. I actually used several scripts, and even edited the Window_NameEdit and Window_NameInput scripts. Now, What I ended up with is a resolution demo that PERFECT for pokemon Games. Now, what it does is resized the tileset to 1/2 of its original size, as well as changing the window size so that it is actually 1/2 of its original size. The final result is a game demo with 16x16 tiles and a 320x240 window! Now, you still have to add in normal pokemon-sized overworld sprites, but that's easier than doubling their size to fit in a normal RPGXP game, right? Also, It won't resize the events, so you have to shring those images too, if you use them. (But, if you use images from the tileset, I'm pretty sure that they'll be the same size anyway) Anyway, on to the screenies!

    ResolutionDemo1.png
    ResolutionDemo2.png

    ResolutionDemo3.png
    ResolutionDemo4.png

    ResolutionDemo5.png
    ResolutionDemo6.png

    ResolutionDemo7.png
    ResolutionDemo8.png

    ResolutionDemo9.png
    ResolutionDemo10.png

    ResolutionDemo11.png
    ResolutionDemo12.png

    ResolutionDemo13.png
    ResolutionDemo14.png

    ResolutionDemo15.png


    EDIT: I just noticed a problem with the scripts in this project. To make it work properly, simply go to line 239 of the script named "Custom Resolution Script" and change it to this:

    Code:
      Resolution.fullscreen

    (Originally, it said "default", not "fullscreen")

    Credits:
    SephirothSpawn
    Selwyn
    Bluescope
    Squall
    Glitchfinder
     
    Last edited:

    Glitchfinder

    Let's all get along, please?
    477
    Posts
    17
    Years
  • Jesus Christ that's useful. The only quarry I have is with the text, it seems a bit small and blurry.

    Yeah, I don't really like the text either. It was part of the original resolution script. I think that anyone who is going to make a Pokemon game would actually have to be skilled enough with scripting to fix it though. (At least until someone finishes a starter kit...) Thanks for the great comment!
     

    Glitchfinder

    Let's all get along, please?
    477
    Posts
    17
    Years
  • Wow. I was looking for something like thsi! Good work! *downloads*

    I'm actually working on an update that fixes things like the menu (which you probably won't need) and the message window. (Which you probably will) I'm done with the message window, but I don't want to bother posting a new demo or new screenies at the moment, so here's the scripts you need to update:

    Code:
    #==============================================================================
    # ** Window_Message
    #------------------------------------------------------------------------------
    #  This message window is used to display text.
    #==============================================================================
    class Window_Message < Window_Selectable
      #--------------------------------------------------------------------------
      # * Object Initialization
      #--------------------------------------------------------------------------
      def initialize
        super(40, 152, 240, 80)
        self.contents = Bitmap.new(width - 16, height - 16)
        self.visible = false
        self.z = 9998
        @fade_in = false
        @fade_out = false
        @contents_showing = false
        @cursor_width = 0
        self.active = false
        self.index = -1
      end
      #--------------------------------------------------------------------------
      # * Dispose
      #--------------------------------------------------------------------------
      def dispose
        terminate_message
        $game_temp.message_window_showing = false
        if @input_number_window != nil
          @input_number_window.dispose
        end
        super
      end
      #--------------------------------------------------------------------------
      # * Terminate Message
      #--------------------------------------------------------------------------
      def terminate_message
        self.active = false
        self.pause = false
        self.index = -1
        self.contents.clear
        # Clear showing flag
        @contents_showing = false
        # Call message callback
        if $game_temp.message_proc != nil
          $game_temp.message_proc.call
        end
        # Clear variables related to text, choices, and number input
        $game_temp.message_text = nil
        $game_temp.message_proc = nil
        $game_temp.choice_start = 99
        $game_temp.choice_max = 0
        $game_temp.choice_cancel_type = 0
        $game_temp.choice_proc = nil
        $game_temp.num_input_start = 99
        $game_temp.num_input_variable_id = 0
        $game_temp.num_input_digits_max = 0
        # Open gold window
        if @gold_window != nil
          @gold_window.dispose
          @gold_window = nil
        end
      end
      #--------------------------------------------------------------------------
      # * Refresh
      #--------------------------------------------------------------------------
      def refresh
        self.contents.font.size = 12
        self.contents.clear
        self.contents.font.color = normal_color
        x = y = 0
        @cursor_width = 0
        # Indent if choice
        if $game_temp.choice_start == 0
          x = 8
        end
        # If waiting for a message to be displayed
        if $game_temp.message_text != nil
          text = $game_temp.message_text
          # Control text processing
          begin
            last_text = text.clone
            text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
          end until text == last_text
          text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
            $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
          end
          # Change "\\\\" to "\000" for convenience
          text.gsub!(/\\\\/) { "\000" }
          # Change "[URL="file://c/"]\\C[/URL]" to "\001" and "[URL="file://g/"]\\G[/URL]" to "\002"
          text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
          text.gsub!(/\\[Gg]/) { "\002" }
          # Get 1 text character in c (loop until unable to get text)
          while ((c = text.slice!(/./m)) != nil)
            # If \\
            if c == "\000"
              # Return to original text
              c = "\\"
            end
            # If \C[n]
            if c == "\001"
              # Change text color
              text.sub!(/\[([0-9]+)\]/, "")
              color = $1.to_i
              if color >= 0 and color <= 7
                self.contents.font.color = text_color(color)
              end
              # go to next text
              next
            end
            # If \G
            if c == "\002"
              # Make gold window
              if @gold_window == nil
                @gold_window = Window_Gold.new
                @gold_window.x = 280 - @gold_window.width
                if $game_temp.in_battle
                  @gold_window.y = 96
                else
                  @gold_window.y = self.y >= 64 ? 16 : 192
                end
                @gold_window.opacity = self.opacity
                @gold_window.back_opacity = self.back_opacity
              end
              # go to next text
              next
            end
            # If new line text
            if c == "\n"
              # Update cursor width if choice
              if y >= $game_temp.choice_start
                @cursor_width = [@cursor_width, x].max
              end
              # Add 1 to y
              y += 1
              x = 0
              # Indent if choice
              if y >= $game_temp.choice_start
                x = 8
              end
              # go to next text
              next
            end
            # Draw text
            self.contents.draw_text(4 + x, 16 * y, 20, 16, c)
            # Add x to drawn text width
            x += self.contents.text_size(c).width
          end
        end
        # If choice
        if $game_temp.choice_max > 0
          @item_max = $game_temp.choice_max
          self.active = true
          self.index = 0
        end
        # If number input
        if $game_temp.num_input_variable_id > 0
          digits_max = $game_temp.num_input_digits_max
          number = $game_variables[$game_temp.num_input_variable_id]
          @input_number_window = Window_InputNumber.new(digits_max)
          @input_number_window.number = number
          @input_number_window.x = self.x + 8
          @input_number_window.y = self.y + $game_temp.num_input_start * 16
        end
      end
      #--------------------------------------------------------------------------
      # * Set Window Position and Opacity Level
      #--------------------------------------------------------------------------
      def reset_window
        if $game_temp.in_battle
          self.y = 16
        else
          case $game_system.message_position
          when 0  # up
            self.y = 8
          when 1  # middle
            self.y = 80
          when 2  # down
            self.y = 152
          end
        end
        if $game_system.message_frame == 0
          self.opacity = 255
        else
          self.opacity = 0
        end
        self.back_opacity = 160
      end
      #--------------------------------------------------------------------------
      # * Frame Update
      #--------------------------------------------------------------------------
      def update
        super
        # If fade in
        if @fade_in
          self.contents_opacity += 24
          if @input_number_window != nil
            @input_number_window.contents_opacity += 24
          end
          if self.contents_opacity == 255
            @fade_in = false
          end
          return
        end
        # If inputting number
        if @input_number_window != nil
          @input_number_window.update
          # Confirm
          if Input.trigger?(Input::C)
            $game_system.se_play($data_system.decision_se)
            $game_variables[$game_temp.num_input_variable_id] =
              @input_number_window.number
            $game_map.need_refresh = true
            # Dispose of number input window
            @input_number_window.dispose
            @input_number_window = nil
            terminate_message
          end
          return
        end
        # If message is being displayed
        if @contents_showing
          # If choice isn't being displayed, show pause sign
          if $game_temp.choice_max == 0
            self.pause = true
          end
          # Cancel
          if Input.trigger?(Input::B)
            if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
              $game_system.se_play($data_system.cancel_se)
              $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
              terminate_message
            end
          end
          # Confirm
          if Input.trigger?(Input::C)
            if $game_temp.choice_max > 0
              $game_system.se_play($data_system.decision_se)
              $game_temp.choice_proc.call(self.index)
            end
            terminate_message
          end
          return
        end
        # If display wait message or choice exists when not fading out
        if @fade_out == false and $game_temp.message_text != nil
          @contents_showing = true
          $game_temp.message_window_showing = true
          reset_window
          refresh
          Graphics.frame_reset
          self.visible = true
          self.contents_opacity = 0
          if @input_number_window != nil
            @input_number_window.contents_opacity = 0
          end
          @fade_in = true
          return
        end
        # If message which should be displayed is not shown, but window is visible
        if self.visible
          @fade_out = true
          self.opacity -= 48
          if self.opacity == 0
            self.visible = false
            @fade_out = false
            $game_temp.message_window_showing = false
          end
          return
        end
      end
      #--------------------------------------------------------------------------
      # * Cursor Rectangle Update
      #--------------------------------------------------------------------------
      def update_cursor_rect
        if @index >= 0
          n = $game_temp.choice_start + @index
          self.cursor_rect.set(4, n * 16, @cursor_width, 16)
        else
          self.cursor_rect.empty
        end
      end
    end

    Code:
    #==============================================================================
    # Custom Resolution Script v0.82
    #------------------------------------------------------------------------------
    # Script by BlueScope
    #==============================================================================
    module Setup
      #--------------------------------------------------------------------------
      RESOLUTION = [(320).to_f, (240).to_f]
      #--------------------------------------------------------------------------
      def self.x_value
        return RESOLUTION[0] / 640
      end
      #--------------------------------------------------------------------------
      def self.y_value
        return RESOLUTION[1] / 480
      end
      #--------------------------------------------------------------------------
      def self.c_value
        return ((RESOLUTION[0] / 640) + (RESOLUTION[1] / 480)) / 2
      end
      #--------------------------------------------------------------------------
      def self.h_value
        return RESOLUTION[0]
      end
      #--------------------------------------------------------------------------
      def self.v_value
        return RESOLUTION[1]
      end
      #--------------------------------------------------------------------------
      def self.variance
        return (((RESOLUTION[0] / 640) + (RESOLUTION[1] / 480)) / 2) - 1
      end
      #--------------------------------------------------------------------------
    end
     
    module Resolution
      #--------------------------------------------------------------------------
      # The following method refers to the resolution changing script and has to
      # be placed below Selwyn's resolution script in order to work properly
      #--------------------------------------------------------------------------
      def self.default
        @default_size = size
        @set_window_long.call(@window, -16, 0x14000000)
        @set_window_pos.call(@window, -1, 0, 0, Setup.h_value, Setup.v_value, 64)
        @set_resolution.call(Setup.h_value, Setup.v_value, 4)
        @state = "default"
      end
      #--------------------------------------------------------------------------
    end
     
    class Game_Map
      #--------------------------------------------------------------------------
      # The following method refers to the Tilemap class and has to be placed
      # below SephirothSpawn's Tilemap class rewrite in order to work properly
      #--------------------------------------------------------------------------
      alias resolution_initialize initialize
      def initialize
        resolution_initialize
        @tilemap_tile_width = (32 * Setup.x_value)
        @tilemap_tile_height = (32 * Setup.y_value)
      end
      #--------------------------------------------------------------------------
      def scroll_down(distance)
        @display_y = [@display_y + distance, (self.height - 15) *
          (128 * Setup.y_value)].min
      end
      #--------------------------------------------------------------------------
      def scroll_right(distance)
        @display_x = [@display_x + distance, (self.width - 20) *
          (128 * Setup.x_value)].min
      end
      #--------------------------------------------------------------------------
      def start_scroll(direction, distance, speed)
        @scroll_direction = direction
        @scroll_rest = distance * (128 * Setup.c_value)
        @scroll_speed = speed
      end
      #--------------------------------------------------------------------------
    end
     
    class Game_Character
      #--------------------------------------------------------------------------
      alias resolution_initialize initialize
      def initialize
        resolution_initialize
        @move_speed = 4 + (Setup.variance * 2)
      end
      #--------------------------------------------------------------------------
      def moving?
        return (@real_x != @x * (128 * Setup.x_value) or
          @real_y != @y * (128 * Setup.y_value))
      end
      #--------------------------------------------------------------------------
      def moveto(x, y)
        @x = x % $game_map.width
        @y = y % $game_map.height
        @real_x = @x * (128 * Setup.x_value)
        @real_y = @y * (128 * Setup.y_value)
        @prelock_direction = 0
      end
      #--------------------------------------------------------------------------
      def screen_x
        return (@real_x - $game_map.display_x + 3) / 4 + (16 * Setup.x_value)
      end
      #--------------------------------------------------------------------------
      alias resolution_screen_y screen_y
      def screen_y
        y = (@real_y - $game_map.display_y + 3) / 4 + (32 * Setup.y_value)
        resolution_screen_y
      end
      #--------------------------------------------------------------------------
      def screen_z(height = 0)
        if @always_on_top
          return 999
        end
        z = (@real_y - $game_map.display_y + 3) / 4 + (32 * Setup.c_value)
        if @tile_id > 0
          return z + $game_map.priorities[@tile_id] * (32 * Setup.c_value)
        else
          return z + ((height > 32) ? 31 : 0)
        end
      end
      #--------------------------------------------------------------------------
      alias resolution_update update
      def update
        resolution_update
        if @anime_count > 18 - @move_speed * (2 - (Setup.variance * 2))
          if not @step_anime and @stop_count > 0
            @pattern = @original_pattern
          else
            @pattern = (@pattern + 1) % 4
          end
          @anime_count = 0
        end
      end
      #--------------------------------------------------------------------------
      def update_jump
        @jump_count -= 1
        @real_x = (@real_x * @jump_count + @x * (128 * Setup.x_value)) /
          (@jump_count + 1)
        @real_y = (@real_y * @jump_count + @y * (128 * Setup.y_value)) /
          (@jump_count + 1)
      end
      #--------------------------------------------------------------------------
      def update_move
        distance = 2 ** @move_speed
        if @y * (128 * Setup.y_value) > @real_y
          @real_y = [@real_y + distance, @y * (128 * Setup.y_value)].min
        end
        if @x * (128 * Setup.x_value) < @real_x
          @real_x = [@real_x - distance, @x * (128 * Setup.x_value)].max
        end
        if @x * (128 * Setup.x_value) > @real_x
          @real_x = [@real_x + distance, @x * (128 * Setup.x_value)].min
        end
        if @y * (128 * Setup.y_value) < @real_y
          @real_y = [@real_y - distance, @y * (128 * Setup.y_value)].max
        end
        if @walk_anime
          @anime_count += 1.5
        elsif @step_anime
          @anime_count += 1
        end
      end
      #--------------------------------------------------------------------------
    end
     
    class Game_Player < Game_Character
      #--------------------------------------------------------------------------
      CENTER_X = ((320 * Setup.x_value) - 8) * 4
      CENTER_Y = ((240 * Setup.y_value) - 8) * 4
      #--------------------------------------------------------------------------
      def center(x, y)
        max_x = ($game_map.width - 20) * (128 * Setup.x_value)
        max_y = ($game_map.height - 15) * (128 * Setup.y_value)
        $game_map.display_x = [0,
          [x * (128 * Setup.x_value) - CENTER_X, max_x].min].max
        $game_map.display_y = [0,
          [y * (128 * Setup.y_value) - CENTER_Y, max_y].min].max
      end
      #--------------------------------------------------------------------------
    end
     
    class Sprite_Character < RPG::Sprite
      #--------------------------------------------------------------------------
      attr_accessor :character
      #--------------------------------------------------------------------------
      alias resolution_update update
      def update
        super
        if @tile_id != @character.tile_id or
          @character_name != @character.character_name or
          @character_hue != @character.character_hue
          @tile_id = @character.tile_id
          @character_name = @character.character_name
          @character_hue = @character.character_hue
          if @tile_id >= 384
            self.bitmap = RPG::Cache.tile($game_map.tileset_name, @tile_id, 
              @character.character_hue)
            self.src_rect.set(0, 0, 32, 32)
            self.ox = 16
            self.oy = 32
          else
            self.bitmap = RPG::Cache.character(@character.character_name, 
              @character.character_hue)
            @cw = bitmap.width / 4
            @ch = bitmap.height / 4
            self.ox = @cw / 2
            self.oy = @ch - (32 * Setup.variance)
          end
        end
        resolution_update
      end
      #--------------------------------------------------------------------------
    end
     
    class Spriteset_Map
      #--------------------------------------------------------------------------
      alias resolution_initialize initialize
      def initialize
        @viewport1 = Viewport.new(0, 0, Setup.h_value, Setup.v_value)
        @viewport2 = Viewport.new(0, 0, Setup.h_value, Setup.v_value)
        @viewport3 = Viewport.new(0, 0, Setup.h_value, Setup.v_value)
        resolution_initialize
      end
      #--------------------------------------------------------------------------
    end
     
    begin
      Resolution.initialize
      Resolution.fullscreen
      $scene = nil
    end
     

    rm2kdude

    Advanced Pixel-Artist
    358
    Posts
    19
    Years
    • Age 34
    • usa
    • Seen Oct 30, 2022
    The text is perfect now, hopefully the menu will be added soon.. so we can FINALLY have a resolution script. Good work mate!
     

    Glitchfinder

    Let's all get along, please?
    477
    Posts
    17
    Years
  • The text is perfect now, hopefully the menu will be added soon.. so we can FINALLY have a resolution script. Good work mate!

    Actually, I assumed that since this is mainly for Pokemon games, that you'll probably come up with your own menu. (I mean, the default menu system is SO not Pokemon-like)
     
    209
    Posts
    17
    Years
  • Glitchfinder - so is it possible, to make it working on RGSS100J.dll? I need to use this version, because only it is in Polish.
     

    Glitchfinder

    Let's all get along, please?
    477
    Posts
    17
    Years
  • Glitchfinder - so is it possible, to make it working on RGSS100J.dll? I need to use this version, because only it is in Polish.

    Well, you can download it and see. Also, if it doesn't work when you open it, then all you have to do is copy the data, graphics, etc. folders (but not game.exe or the ini) into a new project, and it should work.

    OK guys, I've been working on a new release of this demo for the past few days, and thought I would give you a heads up. I inserted the basic scripts that resize the window and change the resolution into a new project, and started from scratch! (Not that you'll be able to tell, I used the same maps and events..heh) One of the bonuses of the next release will be that it won't change the monitor's resolution, so it will actually be the size you want. Also, since I'm working from the ground up, I had to rearrange some windows and insert some newer versions of default scripts. I actually combined the gold, step #, and playtime windows in the menu, and only have a few more windows and scenes to go. Anyway, I thought you'ld like the heads up, and I'll probably post the new, enhanced version in the next couple of days!

    Edit: OOPS! Sorry for the double post! I'm reporting this post, and requesting that it be merged with my last post.
     
    Last edited by a moderator:
    209
    Posts
    17
    Years
  • OMG - I've tried all but still not work - can you download Rpgmaker XP 100J.dll, and rewrite this scripts? I was trying all but nothing works - I willb very pleased if you do.
     

    Glitchfinder

    Let's all get along, please?
    477
    Posts
    17
    Years
  • OMG - I've tried all but still not work - can you download Rpgmaker XP 100J.dll, and rewrite this scripts? I was trying all but nothing works - I willb very pleased if you do.

    You're problem is that you're not thinking outside the box. Copy the data, graphics, and audio folders to a new project, and ignore the stuff in the main window. Oh, btw, the version you're trying to use is now obsolete. Wait a couple of minutes for me to upload the new version, and then I'll post it.
     
    Last edited:
    209
    Posts
    17
    Years
  • Ok - will wait. (I think that moderator will delete this post...).
    I just make this post to say that I'm really waiting for another version of this amazing script. I coppied all folders (nothing else) into new project, and game.exe asked for display.dll. When I coppied it, I had an error. So that's why I'm asking about the version in RGSS100J.dll - maybe illegal, but only it is Polish...
     
    Last edited:

    Glitchfinder

    Let's all get along, please?
    477
    Posts
    17
    Years
  • Ok - will wait. (I think that moderator will delete this post...).
    I just make this post to say that I'm really waiting for another version of this amazing script. I coppied all folders (nothing else) into new project, and game.exe asked for display.dll. When I coppied it, I had an error. So that's why I'm asking about the version in RGSS100J.dll - maybe illegal, but only it is Polish...

    I'm not sure what to say. The newest version should be compatable with the rgss100j.dll, but I'm not certain. I reworked it on vista, which cannot use the official version of RMXP.
     
    209
    Posts
    17
    Years
  • At least - still not works - before works just the game, now works just the project - I will download somewhere RGSS102E.dll - I know english very good.
     

    O.G. Duke

    a.k.a OmegaGroudon
    974
    Posts
    17
    Years
    • Seen May 18, 2016
    Haiz...The battler dissappear when enter battle. Anybody can fix this?
     

    Glitchfinder

    Let's all get along, please?
    477
    Posts
    17
    Years
  • Haiz...The battler dissappear when enter battle. Anybody can fix this?

    I included a test battle background tyhat would show you where to put the battlers. You have to put the monsters in the top left corner (as in, less than halfway to the right, and less than halfway down) for them to show. That is because battler position is not included in in-game scripts, but is actually decided by the game builder.
     
    441
    Posts
    18
    Years
    • Seen Oct 26, 2016
    So if we used the smaller pokemon text (for RM2K3), it would be clearer?

    Excellent job by the way, really handy especially for pokemon games :)
     
    Back
    Top