[XP][VX][VXA] Debug Fast Forward

Started by Heretic86, March 29, 2013, 01:31:03 am

Previous topic - Next topic

Heretic86

March 29, 2013, 01:31:03 am Last Edit: April 12, 2013, 08:00:58 pm by Heretic86
Debug Fast Forward
Authors: Heretic
Version: 0.1
Type: Debug Graphical Enhancement
Key Term: Misc Add-on



Introduction

This has to be the laziest script I've ever written!  I got really sick and tired of waiting to go through a sequence I am working on, so I decided to just put it all in Fast Forward with the press of a button!  It allowed me to test out my game much more quickly, so it will probably help you out as well.


Features


  • Push a Button and Viola!  Fast Forward!

  • Push a Button and Viola!  Slo-Mo for Animation Debugging!

  • Created by typing on a Keyboard!

  • Time Effects only alter Graphics.frame_rate

  • Only Fast Forward or Slo Mo when you want it to

  • Releasing keys turns off the Time Effects

  • How do you catch an Ether-Bunny?  With an Ether-Net!






Screenshots

No screenshots needed to understand what Fast Forward and Slo-Mo are.


Demo

No Demo.  Put it in ANY project pretty much anywhere and it should work just hunky dory.


Script

Place above Main.  I dont think it even matters if you place it in the middle of the Default Scripts.

Spoiler: ShowHide

#--------------------------------------#
# Debug Fast Forward and Slo-Mo Script #
#--------------------------------------#
#
# Version: 0.1
#
# Hold down the CTRL Key to go in to Fast Forward
# Hold down the SHIFT Key to go into Slow Motion
#
# Legal:  Not copyrighted what-so-ever.  Do what ever you want with it.
#
#-------------------------------------------------------------------------------

# Set your Engine here.
$XPVXA = "XP"

module Graphics
 unless $graphics_fast_forward_defined
   # Prevent F12 Crash
   $graphics_fast_forward_defined = true
   class << Graphics
     alias graphics_fast_forward_update update
     def update
       # Call Original
       graphics_fast_forward_update
         # If DEBUG for XP and BTEST for all higher versions
         if $DEBUG || $TEST
           # If holding CTRL Key
           if Input.press?(Input::CTRL)
             # Fast Forward
             Graphics.frame_rate = 120
           # If holding SHIFT Key              
           elsif Input.press?(Input::SHIFT)
             # Slow Mo
             Graphics.frame_rate = 10
           else
             if $XPVXA == "XP"
               # Normal Speed of 40 Frames Per Second for XP
               Graphics.frame_rate = 40
             else
               # Normal Speed of 60 Frames Per Second for all higher versions
                Graphics.frame_rate = 60             
             end
           end
        end        
     end
   end
 end
end



Instructions

Put in game.

Run Game from Editor.

Hold down the CTRL Key to Fast Forward in Debug Mode.
Hold down the SHIFT Key to go into Slow Motion for Animation Debugging.

Eat Popcorn.


Compatibility

Should be 100% compatible.


Credits and Thanks


  • I'd like to thank the Moon for being made of cheese.




Author's Notes

Legal:  Not Copyrighted, No Restrictions.

Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)