Provides a persistent object that maintains consistent delta timings which can be accessed from a global variable:
global.dt_steady (variable can easily be changed to a preferred naming convention)
Documentation can be found inside the Create Event of obj_SteadyDeltaTime
// Move right 100 pixels every 1 second pixelsPerSecond = 100; x += pixelsPerSecond * global.dt_steady; // Add 2 to health each second healthPerSecond = 2; health = health + (healthPerSecond * global.dt_steady); // Set number of sprite images to play per second imagesPerSecond = 10; image_speed = imagesPerSecond * global.dt_steady; // Turn 45 degrees every second direction += 45 * global.dt_steady; // Update seconds timer timerSeconds += global.dt_steady;
Also provided is a way to set the delta time scale, allowing you to easily create global slow/fast motion effects for all values affected by delta timing.
obj_SteadyDeltaTime.scale = 0.0; // "Pause" obj_SteadyDeltaTime.scale = 0.5; // Half speed obj_SteadyDeltaTime.scale = 1.0; // Normal speed obj_SteadyDeltaTime.scale = 2.0; // Double speed
Be sure to check out some of my other assets!
Version 1.0.0. Published November 28, 2014
Created with GameMaker: Studio v1.4.1474
You can only review assets you've bought.
Thank you so much
I've been struggling with a good starting point for delta_time for literally months. Although this hasn't completely answered all my questions, it's done way more than any other asset/tutorial out there and is commented incredibly well. This is completely necessary to download if you are looking for a primer in delta_time, as it definitely covers most of the essentials while making the code readable. Recommended for advanced beginners/intermediate users.
Thanks for the developer of this asset...
I was almost giving up implementing the delta team, that's when I found this asset and everything changed!
It's easy to use, and the developer helped me a lot, now I can rest in peace
Extremely easy to use.
Exactly what I searched for
Thanks, it will be very useful to get and set timers for some events OR features!
short and clear
usefull, short tutorial, clear and vey well commented