I got frustrated by the lack of working Resolution Scripts. Normal ones just stretch the screen to the desired size, this one actually changes the size of the screen allowing you to fit more or less tiles on. It probably could also be used with ordinary resolution scripts to achieve any size you want - not been tested though.
Features
Resize the Game Window
Currently the max is 640Ã480 (whether I can change this I'm unsure)
Screenshots
A screen that's bigger?
Script
Script
Code:
#==============================================================================
# ** Resolution Changer VX
#------------------------------------------------------------------------------
# by Syvkal
# Version 1.0
# 06-27-08
#==============================================================================
#
# - INTRODUCTION -
#
# This system allows you to resize the Game screen without stretching the
# graphics. It enables you to be able to fit more onto one screen
#
#------------------------------------------------------------------------------
#
# - USAGE -
#
# Simply use the one line:
#
# Resolution.resize(width,height)
#
# Place this in main just below 'begin'
#
#------------------------------------------------------------------------------
#
# - PROBLEMS -
#
# Certain problems may occur while using this script
# These include:
# - Windows not properly sized
# - Windows not in the proper position
# - Images such as the Title Graphic not fitting
#
# NONE OF THESE PROBLEMS ARE ERRORS
# -------------------------------
#
# Please do not report any of these problems, the resolution script will
# the screen size, it's up to you to make the scripts fit it
#
# However the script is quite new and only took me about 10 minutes, so if
# there are any errors please do report them
#
#------------------------------------------------------------------------------
#
# - IMPORTANT -
#
# When resizing the window try to make the width and height a multiple of 32
# This will reduce the amount of errors
#
# Also due to the Built in function, the current max screen size is 640 x 480
# In later versions this problem may be able to be over come, but I'm not sure
#
#==============================================================================
#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
# Edited to handle the resized screen size
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# * Scroll Setup
#--------------------------------------------------------------------------
def setup_scroll
@scroll_direction = 2
@scroll_rest = 0
@scroll_speed = 4
@margin_x = (width - $game_width_tiles) * 256 / 2
@margin_y = (height - $game_height_tiles) * 256 / 2
end
#--------------------------------------------------------------------------
# * Calculate X coordinate for parallax display
# bitmap : Parallax bitmap
#--------------------------------------------------------------------------
def calc_parallax_x(bitmap)
if bitmap == nil
return 0
elsif @parallax_loop_x
return @parallax_x / 16
elsif loop_horizontal?
return 0
else
w1 = bitmap.width - $game_screen_width
w2 = @map.width * 32 - $game_screen_width
if w1 <= 0 or w2 <= 0
return 0
else
return @parallax_x * w1 / w2 / 8
end
end
end
#--------------------------------------------------------------------------
# * Calculate Y coordinate for parallax display
# bitmap : Parallax bitmap
#--------------------------------------------------------------------------
def calc_parallax_y(bitmap)
if bitmap == nil
return 0
elsif @parallax_loop_y
return @parallax_y / 16
elsif loop_vertical?
return 0
else
h1 = bitmap.height - $game_screen_height
h2 = @map.height * 32 - $game_screen_height
if h1 <= 0 or h2 <= 0
return 0
else
return @parallax_y * h1 / h2 / 8
end
end
end
#--------------------------------------------------------------------------
# * Scroll Down
# distance : scroll distance
#--------------------------------------------------------------------------
def scroll_down(distance)
if loop_vertical?
@display_y += distance
@display_y %= @map.height * 256
@parallax_y += distance
else
last_y = @display_y
@display_y = [@display_y + distance, (height - $game_height_tiles) * 256].min
@parallax_y += @display_y - last_y
end
end
#--------------------------------------------------------------------------
# * Scroll Right
# distance : scroll distance
#--------------------------------------------------------------------------
def scroll_right(distance)
if loop_horizontal?
@display_x += distance
@display_x %= @map.width * 256
@parallax_x += distance
else
last_x = @display_x
@display_x = [@display_x + distance, (width - $game_width_tiles) * 256].min
@parallax_x += @display_x - last_x
end
end
end
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# Edited to handle the resized screen size
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Set Map Display Position to Center of Screen
# x : x-coordinate
# y : y-coordinate
#--------------------------------------------------------------------------
def center(x, y)
center_x = ($game_screen_width / 2 - 16) * 8
center_y = ($game_screen_height / 2 - 16) * 8
display_x = x * 256 - center_x # Calculate coordinates
unless $game_map.loop_horizontal? # No loop horizontally?
max_x = ($game_map.width - $game_width_tiles) * 256
display_x = [0, [display_x, max_x].min].max # Adjust coordinates
end
display_y = y * 256 - center_y # Calculate coordinates
unless $game_map.loop_vertical? # No loop vertically?
max_y = ($game_map.height - $game_height_tiles) * 256
display_y = [0, [display_y, max_y].min].max # Adjust coordinates
end
$game_map.set_display_pos(display_x, display_y) # Change map location
end
#--------------------------------------------------------------------------
# * Update Scroll
#--------------------------------------------------------------------------
def update_scroll(last_real_x, last_real_y)
center_x = ($game_screen_width / 2 - 16) * 8
center_y = ($game_screen_height / 2 - 16) * 8
ax1 = $game_map.adjust_x(last_real_x)
ay1 = $game_map.adjust_y(last_real_y)
ax2 = $game_map.adjust_x(@real_x)
ay2 = $game_map.adjust_y(@real_y)
if ay2 > ay1 and ay2 > center_y
$game_map.scroll_down(ay2 - ay1)
end
if ax2 < ax1 and ax2 < center_x
$game_map.scroll_left(ax1 - ax2)
end
if ax2 > ax1 and ax2 > center_x
$game_map.scroll_right(ax2 - ax1)
end
if ay2 < ay1 and ay2 < center_y
$game_map.scroll_up(ay1 - ay2)
end
end
end
Instructions
Put it under the Materials Section
Simply use the one line in main just below 'begin':
Resolution.resize(width,height)
It is advised that you use screen sizes that are divisible by 32
This will reduce the amount of any Screen and picture related errors
You should also try and use sizes that have an odd number of tiles, but you don't need to
IMPORTANT!
If you resize your screen bigger than the standard make sure you make all your maps atleast that size.
DO NOT make any smaller than your screensize or you will see errors
Compatibility
Should work with most things, but I'm not 100% sure
I hope it works with other resolution scripts xD
You will have to resize ALL of you Scenes and Windows (except Scene_Map, that's been done)
Credits and Thanks
Me please xD
Author's Notes
I'm not sure if I've left anything out so please do report any errors ^_^
Read the script header before reporting any though!