Goldaryn Multiple Resolution Kit
#1
Goldaryn Multiple Resolution Kit
Versions: 1.10, 1.10-SDK, 2.1, 2.1-SDK

Introduction

Over the years, People have wanted to build their RMXP games in resolutions other than the default 640x480. At first, it was impossible, then, with the help of a dll he wrote himself, Selwyn created a script that allowed you to change the resolution. It was then discovered, that the hidden classes severely limited the playability of a resized RMXP. Rewrites of these hidden scripts began to crop up. Eventually, it was made possible to play a RMXP game at different resolutions, but Transitions would not work properly, unless you used a smaller resolution. Also, most people would have to hunt for the individual script rewrites and piece them all together. Not to mention there was still a couple of bugs left in the original Resolution script. Not to mention the fact, that if not done properly, when a player pressed Alt+Enter, the game would switch into fullscreen/windowed mode and be back at the 640x480 resolution.

This was my quest for the last 4 years:
Build a system that allows for resolutions both less than and greater than 640x480 that works completely as the original, if not better. Well, a few weeks ago, my computer went to the crapper, and all my work on all my rmxp projects was gone. I had to start all over again. I scoured the web and hbgames.org (formerly rmxp.org) for my original scripts. I found a few new methods that didn't exist before, and one or two that got lost or buried. I pieced this all together and I finally realized my goal. Here it is, my Multiple Resolution Kit. It is too good to keep to myself. So I have decided to share it with all of you. Just one thing to note: When I had put a system together before, higher resolutions would lag and the fps would drop from 40 to 20. However, for some reason, now, my fps seems to stay between 30 - 40. I thought it was because I have a better computer now (from pentium4 512mb winxp to pentium dual core 2 1gb ram windows 7) but when I tried it on my son's computer, I got the same results. just a tad bit of lag during transitions.

Let me know how it works for you.

Features
  • Support for Resolutions both less than and greater than 640x480
  • Disabling of the built-in Alt-Enter to Fullscreen function.
  • Maps fill the screen at higher resolutions
  • Fogs and panoramas fill the screen at higher resolutions
  • Transitions fill the screen at higher resolutions
  • The default transitions, both the fade and transition graphics, work at all resolutions.
  • 2.0 and 2.0-SDK and above support dynamically changing the resolution during the game!
  • maybe more, just can't remember

Screenshots

Coming Soon...

Demos

Requires Aleworks Input and Keys Module (included)

Requires Glitchfinders Key Input Module (Included)

Script

Required Scripts:
SDK 2.4 (SDK versions)
1.9 and 2.0 Require Aleworks Input Module and Keys Module
1.10 and 2.1 Require Glitchfinder's Key Input Module

Due to the number of script versions and the fact that this page keeps hanging whenever I try to include them, the scripts will have to be extracted from the demos. I apologize for any inconvenience this may cause.

Instructions

Place my script below the SDK (if required) and Aleworks Input modules or Glitchfinder's Key Input module.
Change the following variables to set the desired default Resolution:

Version 1.9 and 1.9-SDK:
in Game_Window: WIDTH and HEIGHT

Version 2.0 and 2.0-SDK:
in Game_Settings: @resolution (note, this can be and is overwritten when a player changes the resolution in Scene_Settings)

FAQ

Q: Does it have to depend on the SDK? Can't you make it non-SDK?
A: I prefer using the SDK and adapt all scripts I use for it, however, I feel nice, and so I have made a non SDK version as well. Especially seeing how much the SDK has fallen out of favor lately.

Q: Now go for a VX version
A: Unfortunately, I don't know how to bypass VX's habit of scaling the graphics to the new resolution, not to mention I haven't bought it, won't buy it, and don't want to pirate it, and my trial has expired.... VX users can suffer with the built in multi resolution functions it already has. lol

Q: Which script should I call in order to change the resolution in game?
A: using version 2.0 or 2.0-sdk you call
Code:
Game_Window.change_resolution(width, height)
to change the resolution in game. Just replace width and height with your desired width and height in pixels.


Q: My menu didn't get resized!
A: Actually, it is resized. Every scene has been resized. The only thing that really needs to be done is for the windows/graphics used in the scene to either be resized and/or rearranged to fit the new resolution(s). As such, I recommend using custom menus.

Compatibility

Should be compatible with most scripts that don't change the resolution or overwrite the methods overwritten in this kit. For the non-SDK versions, anything that overwrites the update methods in any Scene class needs to be placed above this.

Known Issues:

Most scenes are not rewritten for multiple resolutions.
Message Windows are off screen at the lowest resolution provided.
Can't seem to change the y of message windows, at any resolution...
Scene_Settings doesn't display well in lowest resolution.

Most of these can be fixed with custom scripts.
As a special service and part of my support for this kit, If you would like a specific scene adapted to the new resolution, I will create a patch for you. These patches will be made only by request. I do have other projects to work on as well. The information I need from you is: the script of the scene you want adapted, which version of my kit you are using, and possibly the desired resolution(s).

Update:
Aleworks Input dll (and possibly Glitchfinder's transition.dll) requires a C++ library. If you receive and error related to a missing dll: MSVCR100.dll, you must download and install the Microsoft Visual C++ 2010 Redistributable Package, the download is just 4.8MB in size and can be found here.

Credits and Thanks

The following people need credit if you use this script:
  • vgvgf - Aleworks Input (if used)
  • Selwyn - Plane rewrite, and display.dll
  • Cremno - NoF1, NoF12, and No Alt-Enter dll
  • Glitchfinder - Transition.dll and Key Input Module (if used instead of Aleworks)
  • HBGames.org - screenshot.dll (I don't know the original person who wrote it, but I got it from here.)
  • poccil - Tilemap rewrite
  • SDK team - SDK
    and last but not least:
  • Draycos Goldaryn - the whole Kit and Kaboodle ;)

I would like to thank the following people, without whom this script would not be possible:
Cremno
Selwyn
Glitchfinder
Me™ (I tried to use his tilemap, but decided against it)
vgvgf
poccil (I originally used his tilemap and switched back to it)
Trebor777

Author's Notes

Wow, it took three years to get this script perfect except for transitions, then my computer wiped it all out and in about two weeks i had the script redone, and better than before. Sometimes it pays to go "Back to the drawing board."

Post any requests here. As a special service and part of my support for this kit, If you would like a specific scene adapted to the new resolution, I will create a patch for you. These patches will be made only by request. I do have other projects to work on as well. The information I need from you is: the script of the scene you want adapted, which version of my kit you are using, and possibly the desired resolution(s).

Also, as stated, I did not notice any drop in frame-rate on my computer, but let me know what you experience. If you try this out, let me know what fps you experience as well as your os and basic computer specs, Thank you.

Terms and Conditions

free to use in any project, even commercial. If used, please give me a link to the game as I want to see it implemented. if it is a commercial game, I want a free copy :haha:. Also make sure I (and everyone listed above) get proper credit.
Reply }
#2
Sounds like a great improvement over the classic resolution script everybody has been using these years, I'm surprised nobody has replied on this! I've contemplated on a higher resolution for awhile myself (bigger, more detailed sprites or more screen real estate) but never liked the drawbacks of whats been out, this seems like a refreshing step ahead.

I've already downloaded and started tinkering with the demo (SDK + Glitchfinder's Keys). Aside from the already expected and accepted fact that menus and such will need to be redone to fit the resolution, pretty much everything works perfect thus far.

I did find one bug in the demo, not sure how to replicate it or the cause. Anyways, when hitting the F keys to toggle through the different resolutions, everything worked fine until, as far as I remember, I hit the F9 key and got a hangup error. I'm going to test it again tomorrow after work, both through test play and Game.exe and, if the investigation leads closer to what might be causing it, I'll leave you a PM (and maybe a fix).

More of a confusing visual issue than a script issue itself, the panorama in use for the demo project makes it appear as if fogs aren't properly fixed when moving down. A better backdrop to test this system with would be one that loops vertical as well as horizontal (ie, 001-Sky01).

Anyways, this is a great script, try it out folks!
[Image: Button-BOTB.png]
[Image: Save-Point.gif][Image: Button-You-Tube2.png][Image: Button-Sound-Cloud2.png][Image: Button-Audio-Mack2.png]
[Image: LS-Banner.gif]
NEW ALBUM OUT NOW!

Reply }
#3
Thank you for trying the script and for your review. As for that error, I'm not sure why my script would be giving you an error with f9, as that key is used to bring up the debug menu in playtest mode, I did not assign it to a resolution, only using F5-F8. Also, keep on the lookout, I will be adding a new feature soon that will offer the player a choice of resolutions based on what his/her monitor/video card will support.

Thank you for the advice on the panorama. I believe I will be changing the plane class anyway, I found someone who wrote a better working one, and will be incorporating it in future versions.
Reply }
#4
Wink 
This script would be perfect for my project, and I was wondering if you'd reload the script. The links you've posted no longer work, and I would really like to test out your handiwork. Very cheery
Reply }
#5
Demo version 2 is 3Meg in size and still works.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#6
Thank you so much!
Reply }
#7
This is an excellent setup, however I've had continuous frustrations with it. I've only now worked out the cause for the main thing, the two others I don't really know what to do about...

Fogs. Fogs and planes are imperfect in comparison to the original Plane system. If you use a fog that isn't 200% zoom, it does not pan correctly. You can test this by using a still fog at 300% and moving around. I've already also pointed out before that in comparison to the default, movement is not as smooth and is too quick without changing script settings. When this is done, tiling fails: the script resets the duplicate sprites to their initial position (to emulate the plane loop) too early, resulting in a visible jump at inconsistent intervals.

The tilemap has lag spikes if there is more animating auto-tiles on-screen, at least with my altered update rate (Animated_Autotiles_Frames = 60).

I cannot get fullscreen mode to work at all, and telling the system to auto-fullscreen in Main gives me the built-in "your system doesn't support this resolution" error. I have a setup of 734x416, and my screen is 1280x800 so... whut?

There is one thing I managed to get to work on my own however: the screen centring appears to be faulty in your setup, but pulling one from an alternate resolution script I have fixes this.
Code:
class Game_Player
CENTER_X, CENTER_Y = (Game_Window.width/2-16)*4, (Game_Window.height/2-16)*4
def center(x, y); $game_map.display_x, $game_map.display_y = x*128-CENTER_X, y*128-CENTER_Y; end
end
On a similar note, I can get the full-screen mode to work with that script, but it is sometimes faulty. Sometimes it changes the resolution without going full-screen, or even leaves the resolution as is after the game closes. Ehhhgh.
Reply }
#8
I cannot get fullscreen mode to work at all, and telling the system to auto-fullscreen in Main gives me the built-in "your system doesn't support this resolution" error. I have a setup of 734x416, and my screen is 1280x800 so... whut?
(04-09-2012, 05:41 AM)Taylor Wrote: There is one thing I managed to get to work on my own however: the screen centring appears to be faulty in your setup, but pulling one from an alternate resolution script I have fixes this.
Code:
class Game_Player
CENTER_X, CENTER_Y = (Game_Window.width/2-16)*4, (Game_Window.height/2-16)*4
def center(x, y); $game_map.display_x, $game_map.display_y = x*128-CENTER_X, y*128-CENTER_Y; end
end
On a similar note, I can get the full-screen mode to work with that script, but it is sometimes faulty. Sometimes it changes the resolution without going full-screen, or even leaves the resolution as is after the game closes. Ehhhgh.


I'm having the same problem with fullscreen. Can you let me know exactly where you entered this code? I tried entering it into the "Game Play #Edit" part of this script under the 'invariables' section but I got an error about syntax I think about line 28, (I'm using the 2.0 non-SDK version...) which is the last 'end' line at the part of the script. I'm still trying to figure this out, because I'd really like to get a custom resolution running in my game. I'm also using Universal Message System by CCOA and I guess you were trying to address the problem of the messages being off center now with the different resolution? Let me know if you figure anything out, please. Private message me or something. Thanks.
Reply }
#9
I've changed around a lot of this script in the version in my project, so the only real recommendation I can give is to find CENTER_X and replace the block of code there. I'm using the SDK version, but it's between the changes to Spriteset_Map and Game_Map in one of the scripts.

... aha, I think this is the original block of code:
PHP Code:
<?php 
#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
# This class handles the player. Its functions include event starting
# determinants and map scrolling. Refer to "$game_player" for the one
# instance of this class.
#------------------------------------------------------------------------------
# This has been edited define the actual center of the screen
#==============================================================================
class Game_Player
#--------------------------------------------------------------------------
# * Invariables
#--------------------------------------------------------------------------
def CENTER_X
(Game_Window.width/2 - 16) * 4 # Center screen x-coordinate * 4
end

def CENTER_Y
(Game_Window.height/2 - 16) * 4 # Center screen y-coordinate * 4
end

#--------------------------------------------------------------------------
# * Set Map Display Position to Center of Screen
#--------------------------------------------------------------------------
def center(x, y)
max_x = ($game_map.width - Game_Window.width/32) * 128
max_y
= ($game_map.height - Game_Window.height/32) * 128
$game_map
.display_x = [0, [x * 128 - CENTER_X, max_x].min].max
$game_map
.display_y = [0, [y * 128 - CENTER_Y, max_y].min].max
end
end

However I've also noticed recently that I've been getting an overflow - I assume with my edit - the screen overestimates the right edge of the map, causing it to scroll one column of tiles too far. I haven't been worrying about this so far because I don't want to have the player ever near the edge of the screen, but... you might, so yeah.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Resolution Selwyn 20 39,803 04-14-2017, 12:32 AM
Last Post: xiaohuangdi001
   Multiple Parties Dargor 0 4,748 03-07-2008, 04:17 AM
Last Post: Dargor
   Seperate Item Lists for Multiple Parties RPG Advocate 0 5,211 03-03-2008, 06:02 AM
Last Post: RPG Advocate



Users browsing this thread: 1 Guest(s)