- Joined
- May 15, 2013
- Messages
- 2,248
- Reaction score
- 2,158
- First Language
- English
- Primarily Uses
- N/A
Ease Script - Animation framework 1.0.11
By: Galenmereth / Tor Damian Design
Introduction:
So what is "easing"? Have you tried using the Move Picture event command in Ace? You'll notice that, if you move the picture's position from one spot to another, the movement in between is linear - it moves from point A towards point B in X amount of frames in equal amounts each frame. A lot of the time this is fine, but what if you want to move the pictures quickly but with a little slowing down at the end, for example for a "pop up" effect? That's what easing can do. Easing is using math to apply a modified movement curve to an object's attributes over a given period of time. Math has a tendency to sound boring, doesn't it? Video time!
Examples
(The slight choppiness in the videos is due to the recording; the actual motion is silky smooth. Fullscreen helps, but you can check out the demo to see how it runs for you)
Video showing Move Picture and Tint Picture:
The video shows how a Move Picture event and a Tint Picture event are changed based on the selected easing method; the duration and settings in the events are the same, only the applied easing algorithm changes, to often drastic effect. Here's a screenshot of how easy it is to set an easing method:
By setting the Game_Picture.easing value to Easing::BOUNCE_OUT, all subsequent calls to Move Picture and Tint Picture are affected. You can set different easing methods for tint and move by adding another script call in between them, and there is no limit to how many pictures you can animate like this at any time. The script hooks into the update loop and replaces the default animation methods with the new easing one; as far as I can tell, there is no performance hit whatsoever.
Video showing Move Route calls:
And the third and final video shows the script used within other scripts to easily animate Ace's default windows. This script will be an addon for this script very soon.
Features:
[*]Fully documented script - makes it very easy for scripters to use the Ease module for their own animations
[*]Fully modular script setup - like the above, this will help other scripters (and myself!) extend the functionality of the Ease module with new Easing algorithms, and using the Ease module in other scripts
[*]Virtually no performance hit as far as I have been able to tell, due to using mathematical algorithms to affect only the attributes of objects and hooking into the default update loop
How to use:
To install this script, open up your script editor and copy/paste this script to an open slot below Materials but above Main. Remember to save.
Using with Move Picture and Tint Picture
Using with Move Routes
The following is a list of all available easing methods included by default.
Demo
This is a download for the demo shown in the video
Script (direct link)
This is a direct link with the script; this is always up-to-date with the latest build
Side note: This script file is built using the Plugin Framework script, which you can take a look at in the demo file. There's a link to it in my signature.
Github
In case you're into github, or just want to see more details about ongoing development, check out the github repo: https://github.com/T...ss3-ease-script
FAQ
Q: Do I have to read the documentation before I ask a question?
A: Preferably, yes. Pretty please? :3
Credits and thanks
- Galenmereth / Tor Damian Design (that's me)
- Tsukihime: For the "Hime External Script Loader" script in the demo file
- https://github.com/ai/easings.net: For a few of the base algorithms. Free and open source.
License
Free for non-commercial and commercial use. Credit greatly appreciated but not required. Share script freely with everyone, but please retain this license unless you change the script completely. Thank you.
Author's notes
Planned future extensions:
Changelog
Feeling generous?
If you would like to give me a small tip to help me spend even more time making and maintaining these free scripts, do consider supporting me on Gratipay. Any and all support will be greatly appreciated.
By: Galenmereth / Tor Damian Design
Introduction:
So what is "easing"? Have you tried using the Move Picture event command in Ace? You'll notice that, if you move the picture's position from one spot to another, the movement in between is linear - it moves from point A towards point B in X amount of frames in equal amounts each frame. A lot of the time this is fine, but what if you want to move the pictures quickly but with a little slowing down at the end, for example for a "pop up" effect? That's what easing can do. Easing is using math to apply a modified movement curve to an object's attributes over a given period of time. Math has a tendency to sound boring, doesn't it? Video time!
Examples
(The slight choppiness in the videos is due to the recording; the actual motion is silky smooth. Fullscreen helps, but you can check out the demo to see how it runs for you)
Video showing Move Picture and Tint Picture:
The video shows how a Move Picture event and a Tint Picture event are changed based on the selected easing method; the duration and settings in the events are the same, only the applied easing algorithm changes, to often drastic effect. Here's a screenshot of how easy it is to set an easing method:
By setting the Game_Picture.easing value to Easing::BOUNCE_OUT, all subsequent calls to Move Picture and Tint Picture are affected. You can set different easing methods for tint and move by adding another script call in between them, and there is no limit to how many pictures you can animate like this at any time. The script hooks into the update loop and replaces the default animation methods with the new easing one; as far as I can tell, there is no performance hit whatsoever.
Video showing Move Route calls:
And the third and final video shows the script used within other scripts to easily animate Ace's default windows. This script will be an addon for this script very soon.
Features:
- Works on both Move Picture and Tint Picture
- Available Move Route script calls for easing events and characters. These calls areease_moveto(x, y, duration, easing_method)
- ease_moveto_char(char_id, duration, easing_method)
- ease_opacity(opacity, easing_method)
[*]Fully documented script - makes it very easy for scripters to use the Ease module for their own animations
[*]Fully modular script setup - like the above, this will help other scripters (and myself!) extend the functionality of the Ease module with new Easing algorithms, and using the Ease module in other scripts
[*]Virtually no performance hit as far as I have been able to tell, due to using mathematical algorithms to affect only the attributes of objects and hooking into the default update loop
How to use:
To install this script, open up your script editor and copy/paste this script to an open slot below Materials but above Main. Remember to save.
Using with Move Picture and Tint Picture
Before calling Move Picture and Tint Picture for a picture in the event editor, make a script call like this:Game_Picture.easing = Easing::ELASTIC_OUTThis will set the easing method to the ELASTIC_OUT algorithm. When you erase any picture using Erase Picture, the easing method is reset to the set default (Easing::LINEAR by default)
You can provide different easing methods for different events as well, by setting Game_Picture.easing between each call. It is remembered for each individual event call.
If you wish to set the default easing, you use the following in a script call:
Game_Picture.easing_default = :quad_in# :quad_in is shorthand for Easing::QUAD_IN; works for all easing methodsYou can look at the picture linked above in the introduction section for a visual demonstration of the script call.
You can provide different easing methods for different events as well, by setting Game_Picture.easing between each call. It is remembered for each individual event call.
If you wish to set the default easing, you use the following in a script call:
Game_Picture.easing_default = :quad_in# :quad_in is shorthand for Easing::QUAD_IN; works for all easing methodsYou can look at the picture linked above in the introduction section for a visual demonstration of the script call.
Using with Move Routes
There are 3 Move Route script calls you can use. Below are the script calls and an explanation of the parameters. You place these within an event's Move Route by using the Script button.ease_moveto(x, y, duration, easing)#--------------------------------------------------------------------------# * Move To Position# Params:# =======# - x (integer or "string")# The x position to move to.# if integer then absolute X position on map# if string then relative to current position. Examples:# "0" -> 0 from current x pos# "-5" -> -5 from current x pos# "5" or "+5" -> +5 from current x pos# - y (integer or "string")# The y position to move to. Same rules as x param# - duration (integer)# How many frames the easing should last for# - easing
symbol or "string")# The easing method to apply. Default is :linear#--------------------------------------------------------------------------ease_moveto_char(char, duration, easing)#--------------------------------------------------------------------------# * Move Character To Other Character# Params:# =======# - char (integer)# An integer noting the character to move to.# -1 -> player# 0 -> the current object calling this method# 1 and above -> event id on the current map# - duration (integer)# How many frames the easing should last for# - easing
symbol or "string")# The easing method to apply. Default is :linear#--------------------------------------------------------------------------ease_opacity(opacity, duration, easing)#--------------------------------------------------------------------------# * Ease To Opacity# Params:# =======# - opacity (integer or "string")# Target opacity to ease to. If string, then relative to current opacity# value. See ease_moveto's x param for more on how to use relative# string values.# - duration (integer)# How many frames the easing should last for# - easing
symbol or "string")# The easing method to apply. Default is :linear#--------------------------------------------------------------------------Here are two examples:
The above uses the relative position X and Y coordinates "0" and "+6" respectively, by setting them as strings. The duration is set as 90 frames, and the easing method is :bounce_out.
The above uses ease_moveto to move the entity to 11x, 0y, over 90 frames, using the easing method :circ_in. An opacity ease is chained in the same call (must be separated with ";") easing the opacity to 0 over 120 frames.
The above uses the relative position X and Y coordinates "0" and "+6" respectively, by setting them as strings. The duration is set as 90 frames, and the easing method is :bounce_out.
The above uses ease_moveto to move the entity to 11x, 0y, over 90 frames, using the easing method :circ_in. An opacity ease is chained in the same call (must be separated with ";") easing the opacity to 0 over 120 frames.
The following is a list of all available easing methods included by default.
You use them in calls like this:Game_Picture.easing = :back_in# orGame_Picture.easing = "back_in"# orGame_Picture.easing = Easing::BACK_IN# It's up to you what you prefer List of easing methods:
- LINEAR (default, and like the default in VXAce)
- BACK_IN
- BACK_IN_OUT
- BACK_OUT
- BOUNCE_IN
- BOUNCE_IN_OUT
- BOUNCE_OUT
- CIRC_IN
- CIRC_IN_OUT
- CIRC_OUT
- CUBIC_IN
- CUBIC_IN_OUT
- CUBIC_OUT
- ELASTIC_IN
- ELASTIC_IN_OUT
- ELASTIC_OUT
- EXPO_IN
- EXPO_IN_OUT
- EXPO_OUT
- QUAD_IN
- QUAD_IN_OUT
- QUAD_OUT
This is a download for the demo shown in the video
Script (direct link)
This is a direct link with the script; this is always up-to-date with the latest build
Side note: This script file is built using the Plugin Framework script, which you can take a look at in the demo file. There's a link to it in my signature.
Github
In case you're into github, or just want to see more details about ongoing development, check out the github repo: https://github.com/T...ss3-ease-script
FAQ
Q: Do I have to read the documentation before I ask a question?
A: Preferably, yes. Pretty please? :3
Credits and thanks
- Galenmereth / Tor Damian Design (that's me)
- Tsukihime: For the "Hime External Script Loader" script in the demo file
- https://github.com/ai/easings.net: For a few of the base algorithms. Free and open source.
License
Free for non-commercial and commercial use. Credit greatly appreciated but not required. Share script freely with everyone, but please retain this license unless you change the script completely. Thank you.
Author's notes
Planned future extensions:
- Rotate implementation (I can't extend the Rotate Picture event command due to its structure, so I will have to make a script call for this)
Move Route implementation with script calls (will be nice for falling meteors, bouncing balls and smooth alpha fading)Already done!
Changelog
- 08/12/2013 - Restructured internal workings to use the TDD module namespace and utilize an Ease_Object instead of a hash for ease object workings. Updated OP with instructions for Move Route commands.
- 05/16/2014 - Update with a new demonstration map and greater compatibility with other scripts.
- 11/09/2014 - TDD Ease Object updated. :from now works as intended. Fixed attribute origin setting to remove method check, since that is done in the easing module already. Demo project updated.
- 11/09/2014 - Added support for a delay option in options hash. This makes the easing wait x amount of frames before starting. Great for easily queueing up sequential menu list animations and other nice things.
- 11/26/2014 - Added support to use non-Hash target objects. Also documented delay option in script source comments.
- 12/21/2014 - Bumped to version 1.0.8. All changes will now be logged in the script proper, as well as the compiled source documentation found here: https://tdd-ease-script.s3.amazonaws.com/TDD/Ease.html
- 03/24/2015 - Fixed ease_moveto_char errors reported by aramis_ix
- 03/29/2015 - Fixed a bug in overwrite_other_easings and register_ease that caused overwrite to not work as advertised.
- 03/30/2015 - Implemented :same functionality for overwriting other eases, only overwriting same attributes. Default (true) works as before.
Feeling generous?
If you would like to give me a small tip to help me spend even more time making and maintaining these free scripts, do consider supporting me on Gratipay. Any and all support will be greatly appreciated.
Last edited by a moderator:


