• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

 YOYO please fix timelines!

InCreator

Member
Currently, timeline is easiest, most logical way to detect a moment in time, and triggers even if it's passed (timeline_speed is above 1). Which is super useful if you're implementing something like time compression in your game, generating schedules for NPC's or whatever.

But! Timelines, in their current state are horribly limited, for example, you can't set length to timeline (unless adding empty moment to where you want the "end" to be - which is dumb), initializing via code is clunky and horrible (why not something nice such as timeline_start, timeline_pause, timeline_set_length, timeline_reverse etc?).

Documentation on timelines is also so poor that there's no wonder they're used so rarely.

Worst offender for me is that timeline_moment_add_script doesn't seem let you add arguments to the script you add. So you'll basically have to write new script for every moment. That's insane. Or a bug.

It would be also nice to be able to use commands in timelines directly.
such as timeline_moment_add_script(timeline_index, 300, show_message("It works!")) or something
 
Last edited:
S

Storyteller

Guest
I dont think timelines are meant to do what you are thinking.
the word 'timeline' itself,might be misleading.
can you not achieve your goals with a simple counter?
 

InCreator

Member
Timelines do what I think. And if they don't, how would one know what they do anyway?
Documentation is terrible and entire feature feels like unfinished thought mostly meant for DnD method.

And no, counters won't help if you're dealing stuff like variable time speed. Timelines are only built-in method to detect moment even if it's technically passed. This is hell on earth to code manually.

Just imagine you're counting game steps.

time += 1;

and something has to happen somewhere.

if (time = 10) do stuff
if (time = 20) do next stuff

but then you want to compress time.

time += 3;

you never hit the trigger. But with timeline, you do.
So without timeline, you have to mathematically start to play around this, causing a lot of headache. Basically you have to code entire timeline feature from ground up. Using a built-in timeline instead is simpler and more logical. Especially since you can adjust timeline speed.
 
Last edited:

Nocturne

Friendly Tyrant
Forum Staff
Admin
Documentation is terrible and entire feature feels like unfinished thought mostly meant for DnD method.
http://docs2.yoyogames.com/index.html?page=source/_build/2_interface/1_editors/timelines.html

Why is the documentation terrible?

But! Timelines, in their current state are horribly limited,
Yep, they are. :) And they have been since they were introduced! It's a "feature" that hasn't really evolved since it was first added in GM5 or whenever it was, and tbh, is really only in GMS2 in it's current forum for legacy reasons. However the devs are aware of this, and there are plans to improve on the feature a lot (but don't ask me when as I have no timeframe for you... soon?).
 

InCreator

Member
Arguments to scripts would be already tremendous upgrade. And timeline_set_length function.
Also it would be nice if you could assign multiple timelines to an instance.
 
Last edited:

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
So without timeline, you have to mathematically start to play around this, causing a lot of headache. Basically you have to code entire timeline feature from ground up.
do you mean like... whole 6 more lines of code?
Script "moment":
Code:
/// moment(time_mark)
return t_time_previous < argument0 && t_time >= argument0;
Create:
Code:
t_time = 0;
t_speed = 3;
Step:
Code:
t_time_previous = t_time;
t_time += t_speed;
// then define your moments like:
if (moment(4)) trace("moment 4");
if (moment(5)) trace("moment 5");
if (moment(60)) trace("moment 60");
live demo

edit: a blog post
 
Last edited:

gnysek

Member
Personally, I've stopped to use timelines in 2003 (yes, 15 years ago), as you can easily make it better from code (as YAL stated above). You can add much more features this way and control it better. Timelines may be helpful only for D'n'D users, for those who are programming already they are unusable IMHO.
 
Top