Main menu layer bug [after 1.3.2/1.3.3 update]

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
513
Reaction score
229
First Language
Spanish
Primarily Uses
RMMV
NOTE: I asked Yanfly before about this error, but it seems that it's a new error related to the WindowLayer changes with the 1.3.2 update. I don't know the details, but Yanfly said to me:

This seems to be a new bug introduced by 1.3.2's changes to the WindowLayer.


For this one, it's better if you reported it to the devs. There's nothing to really replicate with it by default, but the window mask layer is extending past where it should be.
So, I suppose I need to report this here in the Support forums.

  • Are you using plugins? Yes, I'm using YEP.1 Core Engine & YEP.14 Main Menu Manager.
  • Did you disable them first? Yes.
  • Does the bug still happen? No, but I suppose if someone try to use a custom menu plugin, the error could appear again.
  • Bug Explanation: The error appeared after updating to 1.3.2. When I put a resolution bigger than 816x624 (1104x624 for example), part of the command window in the main menu seems cut (and the gold window too). I don't know what of the two plugins have the bug, but only appears with the combination of those two. I adressed an image of it:

  • Error Report: No error messages.
  • Exact Steps on How to Replicate Bug: Open the game using the two plugins listed above with a resolution bigger that 816x624, then open the main menu and see the command window.
  • Sample Project (REQUIRED): Main Menu Window Error
 
Last edited by a moderator:

Yanfly

Veteran
Joined
Mar 15, 2012
Messages
1,742
Reaction score
2,635
This is just a post to supplement it the report.


I did some research into this and loaded up a version of my project with 1.3.1 and compared it to 1.3.2.


The following is an image to show the difference:





1. Save the following as a plugin and install it into an empty project: http://yanfly.moe/beta/WindowTest.js


2. Test play


3. Open up the main menu


You'll notice the gap.


This is pretty much all what the code is:


SceneManager._screenWidth = 1280;
SceneManager._screenHeight = 720;
SceneManager._boxWidth = 1280;
SceneManager._boxHeight = 720;

var _create_ = Scene_Menu.prototype.create;
Scene_Menu.prototype.create = function() {
_create_.call(this);
this.rearrange();
};

Scene_Menu.prototype.rearrange = function() {
this._statusWindow.x = 0;
this._commandWindow.x = this._statusWindow.width;
this._goldWindow.x = this._statusWindow.width;
};


As you can see, no funny code business. It's just rearranging windows. The bug occurs when the screen resolution is larger than 816x624.


So I did a bit of research, I altered WindowLayer.prototype._maskWindow to include a console.log to see what's the values being returned.


// 1.3.1 Version:
WindowLayer.prototype._maskWindow = function(window) {
this._windowMask._currentBounds = null;
this._windowMask.boundsDirty = true;
var rect = this._windowRect;
console.log(rect);
rect.x = window.x;
rect.y = window.y + window.height / 2 * (1 - window._openness / 255);
rect.width = window.width;
rect.height = window.height * window._openness / 255;
};

// 1.3.2 Version:
WindowLayer.prototype._maskWindow = function(window, shift) {
this._windowMask._currentBounds = null;
this._windowMask.boundsDirty = true;
var rect = this._windowRect;
console.log(rect);
rect.x = shift.x + window.x;
rect.y = shift.y + window.y + window.height / 2 * (1 - window._openness / 255);
rect.width = window.width;
rect.height = window.height * window._openness / 255;
};


What you see is the console log on the right side of the above image I've posted above. The results are greatly different between one another.
 

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
513
Reaction score
229
First Language
Spanish
Primarily Uses
RMMV
I have found another issue, this one related to the fullscreen and the Core Engine (maybe it's related with Main Window bug). @Yanfly I reported this new bug in your topic, just in case.


Bug Explanation: If you try to put the game in fullscreen with the YEP Core Engine enabled, the resolution of the game will be the same as in windowed mode, and the F3 key (to toggle stretch mode) don't work too.


Error Report: No error message.


Exact Steps on How to Replicate Bug: Open the game, and then try to put it in fullscreen mode with the F4 key.


Sample Project (REQUIRED): You can use the same demo of above, it contains the same issue.


Already fixed with the last version of the plugin.
 
Last edited by a moderator:

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,305
Reaction score
1,575
First Language
English
Primarily Uses
RMMZ
I had similar issue in 1.3.0 and 1.3.1 with the menus related to resolution change (but also additional code I had working prior to that).


I believe this to be related and thought I would add this here in hope it may help the devs pinpoint the issue and not because I require a solution to my issue.
 

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
513
Reaction score
229
First Language
Spanish
Primarily Uses
RMMV
Nothing about a solution to this bug yet?


If this a bug caused by the engine programming, I think this needs to be fixed or, at least, investigated.
 

kovak

Silverguard
Veteran
Joined
Apr 3, 2016
Messages
1,263
Reaction score
1,565
First Language
PT - EN
Primarily Uses
RMMV
As far as i know it was solved with 1.3.3 and Yep Core update
 

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
513
Reaction score
229
First Language
Spanish
Primarily Uses
RMMV
As far as i know it was solved with 1.3.3 and Yep Core update


Nope, even with the new Core Engine update, the bug is still there. The latest update from the YEP Core Engine solves the fullscreen and some memory leaks problems.
 

kovak

Silverguard
Veteran
Joined
Apr 3, 2016
Messages
1,263
Reaction score
1,565
First Language
PT - EN
Primarily Uses
RMMV
hmm...maybe i haven't noticed cuz my window is customized
 

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
513
Reaction score
229
First Language
Spanish
Primarily Uses
RMMV
hmm...maybe i haven't noticed cuz my window is customized


Yanfly posted above a full report of this bug, and the conclusion was that this is a problem from engine and not from the plugins.


The devs need to see this and find a solution.
 
Last edited by a moderator:

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
172
Reaction score
180
First Language
Korean
Primarily Uses
RMMV
It was no problem in canvas mode. In the renderWebGL function of WindowLayer class, there are two rendering code. If you use the second rendering code, It will properly be drawn on the screen.

Code:
  var alias_Scene_MenuBase_addWindow = Scene_MenuBase.prototype.addWindow;
  Scene_MenuBase.prototype.addWindow = function (window) {
    window._isWindow = false;
    alias_Scene_MenuBase_addWindow.call(this, window);
  };
 

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
513
Reaction score
229
First Language
Spanish
Primarily Uses
RMMV
It was no problem in canvas mode. In the renderWebGL function of WindowLayer class, there are two rendering code. If you use the second rendering code, It will properly be drawn on the screen.



var alias_Scene_MenuBase_addWindow = Scene_MenuBase.prototype.addWindow;
Scene_MenuBase.prototype.addWindow = function (window) {
window._isWindow = false;
alias_Scene_MenuBase_addWindow.call(this, window);
};


Where I need to change this? Because I have no idea of programming so, I don't know how could affect this to a project, using the canvas mode instead of WebGL...
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
172
Reaction score
180
First Language
Korean
Primarily Uses
RMMV
Where I need to change this? Because I have no idea of programming so, I don't know how could affect this to a project, using the canvas mode instead of WebGL...


You can paste the content into the text editor and save as a JavaScript file, And then you can set up the JavaScript file via the plugin manager. But it is a temporary solution. So if it's not urgent, I think that it is better to listen to someone else's opinion. And this code also works fine in WebGL mode. And even if you don't apply the code, it works properly in the canvas mode. However, if you apply this code to your game, the windows will overlap each other.
 

Oscar92player

Veteran
Veteran
Joined
Jul 26, 2012
Messages
513
Reaction score
229
First Language
Spanish
Primarily Uses
RMMV
You can paste the content into the text editor and save as a JavaScript file, And then you can set up the JavaScript file via the plugin manager. But it is a temporary solution. So if it's not urgent, I think that it is better to listen to someone else's opinion. And this code also works fine in WebGL mode. And even if you don't apply the code, it works properly in the canvas mode. However, if you apply this code to your game, the windows will overlap each other.


Oh, I see. Thank you very much, I'll try this code in a minute.


UPDATE: Thank you, biud436, the code works, and the main menu looks perfectly now (in fact, this is the standar mode that RPG Maker VX/VX Ace draws the menus, so it's perfect). It's the best solution at the moment.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top