fuwafuwa
A downloadable library
fuwafuwa is a timer system for GameMaker Studio 2 designed to be 1. as simple to use as possible and 2. banish "alarms" to the depths of hell. We use it internally for our projects but have made it available as a separate open-source library.
fuwafuwa was made for GMS 2.2.5, but works in 2.3.0+ as well. If you run into problems in 2.3.0+, please re-import the asset package and try again, as the importer seems to break and wipe functions occasionally (this isn't a fuwafuwa thing, just a GMS thing).
Features
- Simple syntax: Once you've created a timer, just pass it to
timer_check
in your Step event to check if it's gone off. You can create timers in frames, milliseconds, seconds, or the latter two but frame-locked. - Pausing and resuming timers: Timers can be paused, resumed, or restarted at any time. You can also create stopped timers in advance and resume them later when you need them.
- Access and modify lots of timer information: Get how long a timer's run, the time remaining, how many times it's completed, change its duration, time-shift it, and more. All functions that return or require a time value automatically use the unit you set for the timer in the first place, doing conversion as necessary.
- Repeating and sequential timers: Timers can be set to repeat, either with a single time (e.g. repeat every 5 seconds) or a sequence of time values (e.g. set a timer for 5 seconds, followed by one for 10 seconds). This functionality seamlessly integrates with
timer_check
. You can check whether the current sequence has completed, and append additional nodes to the timer sequence. - Ping-pong support: Timers can be set to invert their values every time they repeat or restart, useful for symmetrical animations, etc.
- Normalized progress, easings, and easing downsampling: You can check the normalized progress of a timer (from 0-1), but if you set an easing function, you can also track its progress along that easing function. If you don't like a smooth look, change how often the function is sampled by setting the timer's ease interval.
- Script support: Timers can run a script on completion, timer resume, or timer halt in any instance scope.
- Fully documented: The fuwafuwa wiki contains a full list of functions and some tutorials, and a basic example project is downloadable below.
License
fuwafuwa is published under the MIT License, and includes these easing functions under BSD license.
Questions/bugs/feature requests
Please leave a comment below with any questions or suggestions, or ask in the Deerbell Discord. You may also file a bug report or feature request on GitHub.
Status | Released |
Category | Assets |
Author | Deerbell |
Made with | GameMaker |
Tags | GameMaker |
Code license | MIT License |
Links | GitHub, Documentation, Issue Tracker, Discord |
Download
Install instructions
Please view the setup guide for installation and initialization instructions.
Development log
- fuwafuwa 1.2.0 - Release NotesJul 28, 2022
- fuwafuwa 1.1.1-1.1.4 - Release NotesJun 27, 2021