Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 AWorks Frame Skip
#1
AWorks Frame Skip
Created by: AWorks(vgvgf)
Version: 1.10
Updated: 11/08/2009(dd/mm/yyyy)

Description
This script lets the game to skip frames, and as these frames are not drawed the game will advance faster. You should have seen these function on emulators. This script can be used as a cheat feature, or as a debugging tool.

For installing it, just copy&paste it on a new section. On PlayTest mode press ALT for skipping frames.

Script Code
Code:
#==============================================================================
# *** AWorks Frame Skip(AFS)
#------------------------------------------------------------------------------
# Creted by AWorks(vgvgf)
# Version: 1.10
# Updated: 11/08/2009 (dd/mm/yyyy)
#------------------------------------------------------------------------------
#==== Description ====
# This script lets the game to skip frames, and as these frames are not drawed
# the game will advance faster.
# Compatible with RMXP and RMVX.
#------------------------------------------------------------------------------
#==== Instructions ====
# There are two frame skip modes, one which skip frames each time the screen
# is updated, and the other which will skip an amount of frames per second.
# The first one will let the game to play faster, but the second one is
# smoother.
#
# * Graphics.frame_skip_mode = mode
#   Changes the frame skip mode. Set it to 0 or 1.
#
# * Graphics.frame_skip_rate = rate
#   Changes the frame skip rate, the higher the number the faster it goes.
#   If it is 0, frame skip will be deactivated.
#
# * FRAME_SKIP_PLAY_TEST
#   If true, frame skip will be activated when a key is press on Play Test
#   mode. ALT by default.
#
# * FRAME_SKIP_PLAY_TEST_MODE
#   Change the frame skip mode for Play Test.
#
# * FRAME_SKIP_PLAY_TEST_RATE
#   Change the frame skip rate for Play Test.
#
# * FRAME_SKIP_PLAY_TEST_BUTTON
#   Change the frame skip key for Play Test.
#==============================================================================

#==============================================================================
# ** Graphics Module
#==============================================================================
module Graphics
  #----------------------------------------------------------------------------
  # * Opciones
  #----------------------------------------------------------------------------
  FRAME_SKIP_PLAY_TEST = true
  FRAME_SKIP_PLAY_TEST_MODE = 0
  FRAME_SKIP_PLAY_TEST_RATE = 5
  FRAME_SKIP_PLAY_TEST_BUTTON = Input::ALT
  #----------------------------------------------------------------------------
  # * Variables
  #----------------------------------------------------------------------------
  @frame_skip_rate = 0
  @frame_skip_count = 0
  @frame_skip_mode = 0
  #----------------------------------------------------------------------------
  FRAME_SKIP_PLAY_TEST = false if (!$DEBUG and !$TEST and !$BTEST) or
                                  FRAME_SKIP_PLAY_TEST_RATE <= 0
  class << self
    attr_accessor(:frame_skip_rate, :frame_skip_mode)
    if @aworks_frameskip_alias.nil?
      alias_method(:aworks_graphics_update, :update)
      alias_method(:aworks_graphics_transition, :transition)
      @aworks_frameskip_alias = true
    end
    #--------------------------------------------------------------------------
    # * Update
    #--------------------------------------------------------------------------
    def update(*args)
      if @frame_skip_rate > 0
        if @frame_skip_mode == 0
          @frame_skip_count += 1
          if @frame_skip_count >= @frame_skip_rate
            @frame_skip_count = 0
          else
            return
          end
        else
          @frame_skip_count += [@frame_skip_rate, frame_rate / 2].min
          if @frame_skip_count >= frame_rate
            @frame_skip_count = 0
            return
          end
        end
      elsif FRAME_SKIP_PLAY_TEST and Input.press?(FRAME_SKIP_PLAY_TEST_BUTTON)
        if FRAME_SKIP_PLAY_TEST_MODE == 0
          @frame_skip_count += 1
          if @frame_skip_count >= FRAME_SKIP_PLAY_TEST_RATE
            @frame_skip_count = 0
          else
            return
          end
        else
          @frame_skip_count += [@frame_skip_rate,
                                FRAME_SKIP_PLAY_TEST_RATE / 2].min
          if @frame_skip_count >= FRAME_SKIP_PLAY_TEST_RATE
            @frame_skip_count = 0
            return
          end
        end
      end
      aworks_graphics_update(*args)
    end
  end
end
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Skip Title Once kyonides 0 289 01-07-2024, 01:26 AM
Last Post: kyonides
   Title Skip for Lycan ABS JayRay 3 6,670 04-21-2014, 01:55 PM
Last Post: MetalRenard
   Skip Battle Messages Helladen 1 5,383 08-06-2012, 01:34 AM
Last Post: Helladen
   Skip Battle Log Helladen 0 4,253 08-02-2012, 10:49 AM
Last Post: Helladen
   Skip Party Command Window Helladen 0 4,398 07-27-2012, 06:43 AM
Last Post: Helladen
   Victor Engine - Skip Battle Log Victor Sant 0 4,455 01-09-2012, 05:27 AM
Last Post: Victor Sant
   Xenres' Title Skip Kirito 0 4,946 11-25-2010, 06:03 AM
Last Post: Kirito
   Xenres' Title Skip Kirito 0 6,571 11-25-2010, 05:59 AM
Last Post: Kirito
   [Unsupported] Title Skip 2 XP PK8 3 8,381 02-17-2010, 12:01 PM
Last Post: Villain
   AWorks Fix Walk Speed XP vgvgf 2 6,331 10-13-2009, 02:09 AM
Last Post: Hsia_Nu



Users browsing this thread: