public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

How to make VX Ace less framerate dependant?

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: How to make VX Ace less framerate dependant?
  • Original author: DaOwl
  • Original date: January 9, 2019
  • Source thread: https://forums.rpgmakerweb.com/threads/how-to-make-vx-ace-less-framerate-dependant.104235/
  • Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSSx Script Support

Summary

Hello! Glad to be here. I currently work on VX Ace and something is really tearing me down with it. When I use a script call Graphics.frame_rate = 120, all the game speeds up by 2. And vice-versa when I set it to 30, etc.

Archived First Post

Hello!
Glad to be here.

I currently work on VX Ace and something is really tearing me down with it.
When I use a script call Graphics.frame_rate = 120, all the game speeds up by 2. And vice-versa when I set it to 30, etc.

I would be glad to know how to make VX Ace less "Framerate dependant". Namely, that the game only gains fluidity when I set Graphics.frame_rate to 120, and feels laggy when I set it to 30.

I also started to think about that and tried to write a lil script that is available here:
https://www.dropbox.com/sh/f440k9tw6pfcyli/AACRP80nB7_4h1abf6jLpllva?dl=0

Code:
module BoubouEngine
  module_function
  def frame
  (Graphics.frame_rate/60.0).round(2)
  end
end

# Fix Parallax moves

class Game_Map
  def update_parallax
    @parallax_x += (@parallax_sx / 64.0) / BoubouEngine::frame if @parallax_loop_x
    @parallax_y += (@parallax_sy / 64.0) / BoubouEngine::frame if @parallax_loop_y
  end
end

# Fix fade and weather effects

class Game_Screen
  def start_fadeout(duration)
    @fadeout_duration = duration * BoubouEngine::frame
    @fadein_duration = 0
  end
 
  def start_fadein(duration)
    @fadein_duration = duration * BoubouEngine::frame
    @fadeout_duration = 0
  end

  def start_tone_change(tone, duration)
    @tone_target = tone.clone
    @tone_duration = duration * BoubouEngine::frame
    @tone = @tone_target.clone if @tone_duration == 0
  end
 
  def start_shake(power, speed, duration)
    @shake_power = power
    @shake_speed = speed
    @shake_duration = duration * BoubouEngine::frame
  end

  def change_weather(type, power, duration)
    @weather_type = type if type != :none || duration == 0
    @weather_power_target = type == :none ? 0.0 : power.to_f
    @weather_duration = duration * BoubouEngine::frame
    @weather_power = @weather_power_target if duration == 0
  end
 
end

# Fix characters move

class Game_CharacterBase
  def distance_per_frame
    (2 ** real_move_speed / 256.0) / BoubouEngine::frame
  end
 
  def update_animation
    update_anime_count
    if @anime_count > (18 - real_move_speed * 2) * BoubouEngine::frame
      update_anime_pattern
      @anime_count = 0
    end
  end

end

# Fix some Battle animations

class Sprite_Battler
  def start_effect(effect_type)
    @effect_type = effect_type
    case @effect_type
    when :appear
      @effect_duration = 16 * BoubouEngine::frame
      @battler_visible = true
    when :disappear
      @effect_duration = 32 * BoubouEngine::frame
      @battler_visible = false
    when :whiten
      @effect_duration = 16 * BoubouEngine::frame
      @battler_visible = true
    when :blink
      @effect_duration = 20 * BoubouEngine::frame
      @battler_visible = true
    when :collapse
      @effect_duration = 48 * BoubouEngine::frame
      @battler_visible = false
    when :boss_collapse
      @effect_duration = bitmap.height * BoubouEngine::frame
      @battler_visible = false
    when :instant_collapse
      @effect_duration = 16 * BoubouEngine::frame
      @battler_visible = false
    end
    revert_to_normal
  end
end

# Fix some things about Windows

class Window_Base < Window
  def update
    super
    update_tone
    update_open if @opening
    update_close if @closing
  end
 
  def update_open
    self.openness += 48 / BoubouEngine::frame
    @opening = false if open?
  end
 
  def update_close
    self.openness -= 48 / BoubouEngine::frame
    @closing = false if close?
  end
 
  def draw_text_ex(x, y, text)
    reset_font_settings
    text = convert_escape_characters(text)
    pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
 
    # ---
 
    if Graphics.frame_rate < 60
      g = ( 1 / ( BoubouEngine::frame ) ).to_i
      process_character(text.slice!(0, g), text, pos) until text.empty?
    else
      process_character(text.slice!(0, 1), text, pos) until text.empty?
    end
  end
 
  def process_character(c, text, pos)

    # ---
 
    f  ||= 0
    p  ||= BoubouEngine::frame
 
    if Graphics.frame_rate >= 60
      while f < p
        Fiber.yield unless SceneManager.scene_is?(Scene_Battle)
        f    += 1
      end
      f = 0
    end
 
    case c
    when "\n"   # New line
      process_new_line(text, pos)
    when "\f"   # New page
      process_new_page(text, pos)
    when "\e"   # Control character
      process_escape_character(obtain_escape_code(text), text, pos)
    else        # Normal character
      process_normal_character(c, pos)
    end
  end
 
end

But during this little script session, I found that some animations, fade effects and such were coded in the built-in modules and classes, so they aren't easy to patch...

Among other, I can list:
- The cursor blink effect in all the Window_Selectable instances. [OK]
- The Message's "Pause" icon animation (the little arrow at the bottom of the window_message) [OK]
- The Scene_Menu fadeIn and fadeOut effects.
- Battle Animations
- Transitions (nah, it's okay. There is an argument "duration" for Graphics.transition)

My "priorities" would be:
- The cursor blink effect [OK]
- The Message's Pause Graphic animation [OK]
- The Battle Animations [ No Idea :/ ]
- (Eventually) the Transitions [ No Idea :/ ] [it's OK]

Does anyone know how to patch those elements of this listing to make them less "framerate dependant", as I started to do in my script for characters' moves and so on?


I'm looking forward to reading your responses,
Regards.

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#rpg-maker-archive#rgss-support

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar