- Aug 7, 2017
- 247
- 193
Then it should be left to on. If you are still having FPS issues with it then try this.And what if we do ? I have a 300Hz screen (laptop), and lagging as hell everytime an action is made. And if I turn off this option, the overall game's speed triples... I use CC mod by the way, but if somebody has a tip, i'll take it.
1. Make a file in your game dir\www\js\plugins\ folder called FPSLimit.js
2. Copy the following code into it
JavaScript:
//=============================================================================
// FPSLimit.js
//=============================================================================
/*:
* @plugindesc Limits game refresh rate
* @author ocean pollen
*
* @param FPS Limit
* @desc For a 20FPS limit, set this to 20, etc.
* Default: 60
* @default 60
*
* @help This plugin does not provide plugin commands.
*/
;(function() {
var desiredFPS = Number(PluginManager.parameters('FPSLimit')['FPS Limit']),
frameLimit = 1000/desiredFPS,
nextUpdate = 0,
timeout = null
SceneManager.requestUpdate = function() {
if (!this._stopped) {
var now = Date.now()
if (now >= nextUpdate) {
if (timeout) { clearTimeout(timeout); timeout = null }
nextUpdate = now + frameLimit
requestAnimationFrame(this.update.bind(this))
} else {
var that = this
timeout = setTimeout(function() {
nextUpdate = Date.now() + frameLimit;
requestAnimationFrame(that.update.bind(that))
}, nextUpdate - now)
}
}
}
})()
4.Insert this line of code just before the last plugin on the list
JavaScript:
{"name":"FPSLimit","status":true,"description":"Limits the game FPS to the specified value.","parameters":{ "FPS Limit": "60" }},
5. Reload the game.
Editted: Realized I forgot to populate for the variable in game in the plugins file
Last edited: