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)
[*]7 groups of easing methods, each with 3 variations: In, out and in-out. Also includes an improved (performance vise) version of the default Linear ease 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.
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 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:
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!
Feel free to request an extension or modification, and please give me your feedback; it's greatly appreciated.
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.
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.
Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.