Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Random freezes (with solution)

A topic by RShields created Apr 01, 2021 Views: 6,795 Replies: 3
Viewing posts 1 to 4
(+3)

Unsure if anyone has already posted about this, but here goes.

Certain (older) versions of RPGMaker have a bug where rarely, the game will randomly freeze. This happens because the engine skips frames to maintain a stable framerate (or something like that). The code to do this asks JS for the clock times before and after rendering a frame, and skips frames depending on how long rendering took. JS asks the OS for clock times. However, if the OS syncs its clocks in the middle of rendering a frame, the clock time can go backwards. Therefore, RPGMaker gets confused and thinks it needs to skip negative frames, which it can't handle.

The solution is to open www/js/rpg_core.js, go to line 1872, and change

if (this._skipCount === 0) {

to

if (this._skipCount <= 0) {

The bug also appears in some other (usually old) RPGMaker games, but is fixed in newer versions. And it's really annoying because there's like no information about it anywhere.

Bro thank you, I was having an issue with another game and this stopped it from freezing. 

classic rpg maker

(1 edit)

wanted to thank you for posting this, it helped me with several games i've been having this issue with!

also wanted to add that it appears Windows 11 users need to open the rpg_core file with Notepad or with a similar program, right-click and Open With, then select notepad. just double-clicking the javascript file seems to confuse Windows as to what it is lol

use the Find or Search feature to quickly search for: if (this._skipCount === 0) {

then replace it entirely with: if (this._skipCount <= 0) {

MAKE SURE YOU SAVE THE FILE IN-PLACE!

then open the game and see if it freezes. this worked for me but some other people also having this issue have mentioned needing to go to their Graphics Card settings and manually limit frame-rate for individual RPGmaker games to 60fps, which seems to work for some people but not others

i did both and now dont have the freezing issue on the games i wanna play 👍👍