I have a menu plugin that refers to $gameSystem.playtimeText() and displays the game time for the player.
However, the game engine calculates time played based on frames in rpg_objects.js:
Code:
Game_System.prototype.playtime = function() {
return Math.floor(Graphics.frameCount / 60);
};
Game_System.prototype.playtimeText = function() {
var hour = Math.floor(this.playtime() / 60 / 60);
var min = Math.floor(this.playtime() / 60) % 60;
var sec = this.playtime() % 60;
return hour.padZero(2) + ':' + min.padZero(2) + ':' + sec.padZero(2);
};I've found that if the player has a monitor with a higher refresh rate than 60 hz, the playtime clock runs faster than it should. One of my playtesters always had this issue, but I couldn't replicate it until I upgraded my monitor with a >60 hz rate and now my game time clock also runs fast. Note that this happens even with a monitor FPS sync plugin running such as Yanfly's YEP_FpsSynchOption.
User Pix3M in an old thread suggested adjusting the actual formula such as:
Code:
Game_System.prototype.playtime = function() {
return Math.floor(Graphics.frameCount / 30);
};However, looking at this function I would guess that it's already checking the user's frame rate and returning it as a value? If that's the case, why would our game time run so fast?
Thanks in advance.