Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Random freezes (with solution)

A topic by RShields created Apr 01, 2021 Views: 4,443 Replies: 2
Viewing posts 1 to 3
(+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