RPG Maker Forums

What is the "game screen" and what is the "window display area"? They are both set to the same values:


// rpg_managers.js
SceneManager._screenWidth = 816;
SceneManager._screenHeight = 624;
SceneManager._boxWidth = 816;
SceneManager._boxHeight = 624;






The code (and documentation) is as follows:


// rpg_core.js
/**
* The width of the game screen.
*
* @static
* @property width
* @type Number
*/
Object.defineProperty(Graphics, 'width', {
get: function() {
return this._width;
},
set: function(value) {
if (this._width !== value) {
this._width = value;
this._updateAllElements();
}
},
configurable: true
});

/**
* The height of the game screen.
*
* @static
* @property height
* @type Number
*/
Object.defineProperty(Graphics, 'height', {
get: function() {
return this._height;
},
set: function(value) {
if (this._height !== value) {
this._height = value;
this._updateAllElements();
}
},
configurable: true
});

/**
* The width of the window display area.
*
* @static
* @property boxWidth
* @type Number
*/
Object.defineProperty(Graphics, 'boxWidth', {
get: function() {
return this._boxWidth;
},
set: function(value) {
this._boxWidth = value;
},
configurable: true
});

/**
* The height of the window display area.
*
* @static
* @property boxHeight
* @type Number
*/
Object.defineProperty(Graphics, 'boxHeight', {
get: function() {
return this._boxHeight;
},
set: function(value) {
this._boxHeight = value;
},
configurable: true
});




"Window" is an overloaded term. Neither appear to be a reference to the web browser viewport window nor the size of the canvas element that everything gets rendered to.


An example of both being used:


// rpg_scenes.js
Scene_Base.prototype.createWindowLayer = function() {
var width = Graphics.boxWidth;
var height = Graphics.boxHeight;
var x = (Graphics.width - width) / 2;
var y = (Graphics.height - height) / 2;
this._windowLayer = new WindowLayer();
this._windowLayer.move(x, y, width, height);
this.addChild(this._windowLayer);
};


Can anyone provide more information and details on all 4 properties? What could cause them to have different values?

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top