Max Resolution Breaker

The problem isn't the resolution. The problem is that they capped it on purpose (pretty sure at least). Imagine them getting many complaints/bad reviews/unhappy people regarding performance if they would allow an unlimited resolution. At least from the average user because the unlimited causes major fps problems on the most modern PC's. An unlimited resolution (even if supported by RPG Maker) should only be used by advanced users or by tiny scripts such as picture galleries. But I can't even do it for my picture gallery because they just disabled it for everyone...

Any game? Most games are just full HD. In my experience it's pretty must just RPG Maker and a few 2D adult games. Not counting flash games obviously. I'm still downsizing my 3000+ pixel artwork to something like 200. But I knew that when I chose RPG Maker as my engine. Can only blame myself...

And like I said before somewhere, the internal code could possibly be optimized. Someone improved the Bitmap.clear() and .blt() methods and scripts like Victors lighting script all of a sudden gain a 20 fps boost when stresstesting. Some lighting scripts like Khas's new lighting script even gained up to ~40 fps. Just by improving 2 basic methods through a dll file in c++... Absurd. At least, if I understood that properly.
This crashes every time I try and start up my game, but I was wondering can this be used in my commercial game? 
 

Be careful of using this in any game. I did notice that it causes weird bugs/crashes spread out across your project. 
Afaik there aren't any crash bugs left in this script, I've been using it for about a month and a half without any issues. It's probably something wrong with your project. Make sure you're using the latest version and you don't have anything else causing crashes in your game, like undisposed sprites.

 


Someone improved the Bitmap.clear() and .blt() methods and scripts like Victors lighting script all of a sudden gain a 20 fps boost when stresstesting. Some lighting scripts like Khas's new lighting script even gained up to ~40 fps. Just by improving 2 basic methods through a dll file in c++
Link? Or at least mention where it can be found?
When I used the script Victors fog script bugged just by having that script even on the default resolution. At least for me it did. There is an old topic about that somewhere.

On top of that it crashes so now and then (the entire client) but perhaps I used an old version or perhaps it didn't like another custom script. But the crashes were never instant. Sometimes after 5 minutes or sometimes somewhere in the menu or etc. I had no real way to debug it.

About the dll. There is no link. It's a commercial dll script that is currently still in development. I'm not allowed to share it. But I could ask him when he finishes his exams to explain it in more detail in this topic.
Shame about the DLL. Does he have a discussion thread about it somewhere?

perhaps I used an old version 
Well there's your problem. That's already been fixed: http://forums.rpgmakerweb.com/index.php?/topic/19336-max-resolution-breaker/page-4#entry251803 . The link I posted above includes the fix.
I'm interested in an explanation (maybe even a demo?), too.


Because writing RGSS's bit blit is not a simple task and I think improving the RGSS without (at least partially) rewriting it wouldn't result in such high numbers.


Are these only from stress tests? Are there any real world examples?
Shame about the DLL. Does he have a discussion thread about it somewhere?

Well there's your problem. That's already been fixed: http://forums.rpgmakerweb.com/index.php?/topic/19336-max-resolution-breaker/page-4#entry251803 . The link I posted above includes the fix.
Nope there are more problems. See topic below. When you try to draw a lot of text onto the screen at once then it will crash. Sure it can be fixed or worked around but there are so many details that seem to crash the client with no error message or anything. You still have to be careful. And a bigger resolution means that you can draw more text onto the screen making it more likely that this crash occurs.

http://forums.rpgmakerweb.com/index.php?/topic/27912-draw-text-crashes-the-client/

Or perhaps it's just me who keeps running into crashes so now and then...

Update: It was not caused by this script. RPG Maker simply crashes whenever you draw a long string onto a bitmap with one single bitmap.draw_text(..).
This script causes even an empty project with no other scripts to crash as soon as Graphics.resize_screen() is called, regardless of the resolution specified. This is on Windows 7 x64. Can anyone else confirm this works on a 64 bit OS? Perhaps the memory locations are mapped differently in x64 and thus cause a crash.

Edit: Disregard this, it works fine in x64. In order to get it to run I had to:

1. Set compatibility mode for Game.exe for "Windows XP (Service Pack 3)" (all modes from Windows 2000 to Windows Vista (Service Pack 2) work, just not Win 9X or Windows 7 for some reason).

2. Close anything that may be injecting into DirectX applications. In my case the culprit was MSI Afterburner. RivaTuner and EVGA Precision would likely do the same.

That said, this has to be the best script ever. Major props to everyone involved in it's creation.
I'm on Win7 x64 and I don't have any problems using it, even after calling resize_screen multiple times. Works on my main project, two different side projects and an empty project.

Does it provide any error information before crashing?

Edit: Glad you got it working!

On a separate note, it's been bugging me that this doesn't work correctly with parallaxes. FenixFyre's plane made parallaxes display again, but they don't tile correctly and they don't work correctly with Victor's Fog Overlay script (it ignores most of the settings you'd care about, like the depth - which pretty much breaks parallax mapping).

So I fixed all of that: http://pastebin.com/FyLyMzis

Spoiler
0b0312b3cf36e7f2966cd0209587a0c6.png
If you just want the edits, I modified most of the Plane class, Game_Map::scroll_down and Game_Map::scroll_right.
With Kaelan's latest fix this script is absolutely amazing. It's only final flaw is that in resolutions higher than 1024x768, the first row of tiles in the map seems to loop back and renders in the very bottom if when the map scrolls. If anyone can fix that one last nagging issue, we'll finally have full support for 720p+ games in RPG Maker. I've been testing out and with careful design considerations and a select few scripts you can keep the framerate very playable, I'm still getting 30+ fps even at 1080p. =D
The looping happens when you use a map that has smaller dimensions than your resolution (specifically, when Game_Map::screen_tile_x and Game_Map::screen_tile_y are less tiles than the amount your screen size allows). If you divide your resolution by 32, you get the minimum size map you should use. i.e.: My game is running on 1280x960, so all of my maps have to be at least 40x30 tiles.
Is it somehow possible to entirely disable this script during runtime when you don't need it? I noticed in the old version that even setting the resolution back to 544 still causes the potential bugs it had back then (I know they're fixed).

I only need it enabled at specific times. But it overwrites so much that I don't see an immediate solution for that.
The looping happens when you use a map that has smaller dimensions than your resolution (specifically, when Game_Map::screen_tile_x and Game_Map::screen_tile_y are less tiles than the amount your screen size allows). If you divide your resolution by 32, you get the minimum size map you should use. i.e.: My game is running on 1280x960, so all of my maps have to be at least 40x30 tiles.
Add this somewhere

http://www.rpgmakervxace.net/topic/100-any-chance-of-higher-resolution-or-larger-sprite-support/page-2#entry7997

Spoiler
#==============================================================================# ▼ Viewports/Map Fix for Modified RGSS300.dll File# Origin of Code: Yanfly Engine Ace - Ace Core Engine v1.06# -- Last Updated: 2011.12.26# -- Level: Easy, Normal# -- Requires: n/a# #==============================================================================Graphics.resize_screen(1024,768)#==============================================================================# ■ Game_Map#==============================================================================class Game_Map #-------------------------------------------------------------------------- # overwrite method: scroll_down #-------------------------------------------------------------------------- def scroll_down(distance) if loop_vertical? @display_y += distance @display_y %= @map.height * 256 @parallax_y += distance else last_y = @display_y dh = Graphics.height > height * 32 ? height : screen_tile_y @display_y = [@display_y + distance, height - dh].min @parallax_y += @display_y - last_y end end #-------------------------------------------------------------------------- # overwrite method: scroll_right #-------------------------------------------------------------------------- def scroll_right(distance) if loop_horizontal? @display_x += distance @display_x %= @map.width * 256 @parallax_x += distance else last_x = @display_x dw = Graphics.width > width * 32 ? width : screen_tile_x @display_x = [@display_x + distance, width - dw].min @parallax_x += @display_x - last_x end endend # Game_Map#==============================================================================# ■ Spriteset_Map#==============================================================================class Spriteset_Map #-------------------------------------------------------------------------- # overwrite method: create_viewports #-------------------------------------------------------------------------- def create_viewports if Graphics.width > $game_map.width * 32 && !$game_map.loop_horizontal? dx = (Graphics.width - $game_map.width * 32) / 2 else dx = 0 end dw = [Graphics.width, $game_map.width * 32].min dw = Graphics.width if $game_map.loop_horizontal? if Graphics.height > $game_map.height * 32 && !$game_map.loop_vertical? dy = (Graphics.height - $game_map.height * 32) / 2 else dy = 0 end dh = [Graphics.height, $game_map.height * 32].min dh = Graphics.height if $game_map.loop_vertical? @viewport1 = Viewport.new(dx, dy, dw, dh) @viewport2 = Viewport.new(dx, dy, dw, dh) @viewport3 = Viewport.new(dx, dy, dw, dh) @viewport2.z = 50 @viewport3.z = 100 end #-------------------------------------------------------------------------- # new method: update_viewport_sizes #-------------------------------------------------------------------------- def update_viewport_sizes if Graphics.width > $game_map.width * 32 && !$game_map.loop_horizontal? dx = (Graphics.width - $game_map.width * 32) / 2 else dx = 0 end dw = [Graphics.width, $game_map.width * 32].min dw = Graphics.width if $game_map.loop_horizontal? if Graphics.height > $game_map.height * 32 && !$game_map.loop_vertical? dy = (Graphics.height - $game_map.height * 32) / 2 else dy = 0 end dh = [Graphics.height, $game_map.height * 32].min dh = Graphics.height if $game_map.loop_vertical? rect = Rect.new(dx, dy, dw, dh) for viewport in [@viewport1, @viewport2, @viewport3] viewport.rect = rect end endend # Spriteset_Map#==============================================================================# ■ Scene_Map#==============================================================================class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # alias method: post_transfer #-------------------------------------------------------------------------- alias scene_map_post_transfer_ace post_transfer def post_transfer @spriteset.update_viewport_sizes scene_map_post_transfer_ace endend # Scene_Map
I use something similar for overlay map layers to address the looping issue as well.
Most of my maps are 50x50, so they should be large enough for higher resolutions. I had previously used a script called Map Scroll Glitch Fix with some success and just as Tsukihime's snippet, it does prevent tiles from looping and works well, unless you have a parallax image as background in the editor (whether it follows you or stays fixed doesn't seem to matter).

Then it appears the parallax jumps forward and renders through the tiles in the very last row of the map, quite a distracting effect. I tried editing the Ace's Overlay Mapping script to add another background layer with ZOrder at -1 to simulate static background parallaxes, but they too suffer from the same bug.

Tsukihime, you mentioned tinkering with that script (I assume it's the same) perhaps you've fixed this issue?
The overlay maps I'm referring to is my own map layers script. I'm assuming you're talking about Yami's or something.
Oh I see. I'm sorry. Anyway, I've noticed the issue I'm describing happens only when the game's resolution is not divisible by 32. This is something of a problem for common 16:9 resolutions such as 1280x720, 1600x900 and 1920x1080 all have heights that don't divide by 32 and thus experience this effect. Non standard resolutions like 1024x576 and 1536x864 work flawlessly though.

Also it looks like the script fails with large resolutions and unorthodox aspect ratios. Trying to set 2560x512 would throw an error but 2400x480 worked fine (same aspect ratio).

Edit - Here's a simple script for calculating valid resolutions for using with your VX Ace projects:

RATIO_X = 16.0; RATIO_Y = 9.0 #Aspect RatioSTART_X = 320; MAX_X = 2560 #Initial and final screen widths - Both must be divisible by TILE_SIZETILE_SIZE = 32 #Tile size to check againstputs "Valid " + RATIO_X.round().to_s + ":" + RATIO_Y.round().to_s + " resolutions: " x = START_X while x <= MAX_X do y = x / (RATIO_X/RATIO_Y) print x.to_s + "x" + y.round().to_s + "\t" if y % TILE_SIZE == 0 x+=TILE_SIZE endAnd here are the results for common aspect ratios:

Valid 4:3 resolutions:

384x288         512x384       640x480       768x576       896x672
1024x768       1152x864      1280x960      1408x1056     1536x1152
1664x1248     1792x1344     1920x1440     2048x1536     2176x1632
2304x1728      2432x1824     2560x1920

Valid 16:9 resolutions:

512x288       1024x576      1536x864      2048x1152     2560x1440

Valid 16:10 resolutions:

512x320         768x480       1024x640      1280x800      1536x960
1792x1120     2048x1280     2304x1440     2560x1600

Valid 21:9 resolutions:

448x192       672x288       896x384       1344x576       1568x672
1792x768      2016x864      2464x1056
As you can see there are very few true 16:9 resolutions that work well with the default code that handles scrolling and assumes the resolution is perfectly divisible by 32.

The solution I guess is sticking to these unless someone can patch that code to work with smaller tile sizes.
Well the script basically resizes the viewport, so you don't see too much (and in the case of small maps, things start to overflow).


I suspect this math causes issues:

dh = [Graphics.height, $game_map.height * 32].minThough I'm not entirely sure, since it's SUPPOSED to draw a rectangle the size of your screen.
If the parallax is being shown instead of the map tiles, then the viewport's simply not big enough and it isn't drawing anything near the bottom.
First, thank you to all involved; this is wonderful. I've noticed that transitions are a known issue. For me this means loss of transparency in BattleStart.png when combat initiates.

I would like to address this. Is there ongoing work concerning this that I might use as a starting point? Thank you again.
Wow, this script got some neat updates! o.o

I saw those undisposed things with Mithrian's script, and had no idea where they came from.

Good that I came across here, the new version deals with that problem. *.*

Thanks for everyone (and wow, so many o.o) who worked on this script!

OMGerm, you can just resize the BattleStart.png to your new resolution.

Use a program like Photoshop, or simply use Microsoft Office Picture Manager, and resize your pictures. 

These won't break the transparency effect at all. 

This is an easy fix for battle transitions, I did this too. 
I tried Kaelan's fix but when used with Yanfly's Core Engine, they seem to have a stack level error.

It seems to be this one:

Code:
  #--------------------------------------------------------------------------  # new method: update_viewport_sizes  #--------------------------------------------------------------------------  def update_viewport_sizes    if Graphics.width > $game_map.width * 32 && !$game_map.loop_horizontal?      dx = (Graphics.width - $game_map.width * 32) / 2    else      dx = 0    end    dw = [Graphics.width, $game_map.width * 32].min    dw = Graphics.width if $game_map.loop_horizontal?    if Graphics.height > $game_map.height * 32 && !$game_map.loop_vertical?      dy = (Graphics.height - $game_map.height * 32) / 2    else      dy = 0    end    dh = [Graphics.height, $game_map.height * 32].min    dh = Graphics.height if $game_map.loop_vertical?    rect = Rect.new(dx, dy, dw, dh)    for viewport in [@viewport1, @viewport2, @viewport3]      viewport.rect = rect    end  end
If you swap the positions, the max reso breaker doesn't work.
Worked for me when I tried it in a clean project with http://pastebin.com/JixNBpBy#. Are you using any other scripts?

Original thread: https://forums.rpgmakerweb.com/threads/max-resolution-breaker.19336/