A downloadable RPG Maker MV plugin

Download NowName your own price

This plugin fixes a common source of sporadic screen (graphics) freezes in RPG Maker MV games.

The Bug

RPG Maker MV uses DateTime.now() to check how long rendering takes, to skip frames accordingly if it takes too long. However, the skip count, Graphics._skipCount, can become negative when DateTime.now() runs backwards.

This can happen for example when the system time is updated while rendering, which can be caused manually, and also seems to happen sporadically.

(The timing is fairly precise, so you may need a few hundred tries when trying to cause a freeze manually. I was fortunate enough to run into the issue while playtesting, so I could debug it then and there.)

As the game only checks whether Graphics._skipCount === 0, and otherwise decrements this counter, any negative value will cause indefinite frame skips.

The Fix

This plugin overrides Graphics.render to ensure Graphics._skipCount >= 0 after the original function runs.

You could still write Graphics._skipCount = Infinity to cause a permanent freeze, but that can't happen randomly with the 1.6.2 engine code, as it clamps the calculated value to prevent too many skips in a row.

Logging

An info message is logged to the console whenever this plugin prevents a freeze.  This should happen very rarely, usually once every few hours.

Load Order

Load order usually doesn't matter for this plugin.
When in doubt, load TS_Freeze_Fix early/high in the plugin list.

Configuration and Use

This plugin does not have any configuration options or API/plugin commands.
As long as the plugin is ON when the game is started, the bug is patched.

Compatibility Notes

This plugin was tested on RPG Maker MV 1.6.2, uses only the public RPG Maker API as far as possible, and does not use any platform-specific APIs.

This plugin should be compatible with any deployment target available for RPG Maker MV, including web and most custom ones.*

Freeze Fix is compatible with any plugins that don't rely on negative or non-number values for Graphics._skipCount. (That is: There should be no incompatibilities, as it's unlikely any published plugin relies on those unusual values.)

* If you develop on Windows and deploy for Linux, you must first update the NW.js runtime in the nwjs-lnx folder to at least version 0.29.4 (to match other targets, but ideally use the newest stable version)! You can find more information and a tutorial for this here. It's fast, easy, and also fixes many other problems for your players.

Copy of License Grant

(as included in the plugin file, aside from line wrapping)

A license for this plugin can be acquired at https://tamschi.itch.io/freeze-fix .

Once you have acquired it, you may redistribute and sublicense this plugin file as part of a game.

You may modify this plugin when including it with your game, as long as the attribution above and this license grant stay intact. If you do so, you must add comments to indicate which changes you made from the original.

StatusReleased
CategoryAssets
Rating
Rated 5.0 out of 5 stars
(3 total ratings)
AuthorTamschi
Made withRPG Maker
Tagsbugfix, plugin, RPG Maker, RPG Maker MV
Average sessionA few seconds
LanguagesEnglish
LinksImprint / Impressum, Support

Download

Download NowName your own price

Click download now to get access to the following files:

TS_Freeze_Fix.js 2.7 kB
Version 1.0.0

Comments

Log in with itch.io to leave a comment.

I got a question, I use RPG Maker MV, and when I was making a game, which I actually posted here on itchio, I ran into a bug that pretty much broken ruined my game, which was a switch being active before it was activated. 

Essentially the game had glitched in a way that I just could not fix it, forcing the player into the second half of the game, before playing the first half of the game. 

 Will this plug in fix the issue? Or is there perhaps another plug-in that can fix that sort of issue?

(-1)

No, that is not a bug or glitch in RPG Maker. It’s functioning correctly in those regards.

This is most likely a mistake in your own Event scripts (or their activation condition, or the order of Pages in a Map Event), which by its nature can’t be fixed by generic plugins.

Deleted 35 days ago
(1 edit) (-1)

I just read the bug description on your game’s page. Have you used the Event Searcher to ensure the Switch is set only in that one Event?

Deleted 35 days ago