ENIGMA Forums

General fluff => Announcements => Topic started by: Goombert on June 04, 2014, 01:31:52 AM

Title: Timelines Implemented
Post by: Goombert on June 04, 2014, 01:31:52 AM
That's right, timelines have been implemented by Seth N. Hetu (sorlok) in his quest to port Iji.

This was his pull request.
https://github.com/enigma-dev/enigma-dev/pull/738
This was the discussion topic about the implementation.
https://github.com/enigma-dev/enigma-dev/issues/636

You can get these changes via git or by downloading the new Portable ZIP.
http://enigma-dev.org/docs/Wiki/Install:Windows

Please test his changes and see how well everything works. And be sure to give him a round of applause for his contributions!
Title: Re: Timelines Implemented
Post by: egofree on June 04, 2014, 02:12:58 AM
Sorlok, you have all my gratitude for your contribution. Thanks a lot !  (Y) ( I will test later :P ).
Title: Re: Timelines Implemented
Post by: sorlok_reaves on June 04, 2014, 12:46:17 PM
Glad I could help! I already said it in the pull request, but thanks to the developers here too; they were very helpful and offered lots of positive criticism.

Let me know if there's any bug reports; the system's not perfect, but I did test it quite a bit.
Title: Re: Timelines Implemented
Post by: edsquare on June 04, 2014, 09:10:23 PM
@ sorlok_reaves:

I wanna have your babies!  :D

Thank you very much!  (Y)
Title: Re: Timelines Implemented
Post by: Seheiah on June 05, 2014, 03:40:01 AM
Hi  guys...i downloaded this new version and now i can not compile any of the examples or games.i have the previous version in another directory and everything compiles but now i just get a black window,but most of the time the temp app created by compilation crashes.
Title: Re: Timelines Implemented
Post by: Goombert on June 05, 2014, 05:07:33 AM
Hey Seheiah, I am working on it, sorlok accidentally committed an old version of action_webpage, the drag and drop action to open a webpage in your browser. I have sent a pull request removing the code and as soon as it is merged I will patch the Portable ZIP and upload it. Sorry about that, I have reviewed the code again and made sure it builds this time, my apologies.

This is the pull request I am waiting on.
https://github.com/enigma-dev/enigma-dev/pull/740

If you want, you can attempt to remove the code yourself, save the file, and then try building.
Title: Re: Timelines Implemented
Post by: Seheiah on June 05, 2014, 05:19:10 AM
Thanks Robert...i will wait until you make the new build..

Did you check my post about full screen bug?

http://enigma-dev.org/forums/index.php?topic=1950.msg18833#msg18833

I hope it can be fixed as well.

Robert...are you still working on Enigma or moving to another one? enigger or dejavu?

Thanks
Title: Re: Timelines Implemented
Post by: Goombert on June 05, 2014, 11:42:03 AM
The patch has been applied and the new Portable ZIP uploaded, please go ahead and redownload.

I have seen your post about the fullscreen bug and responded.
Title: Re: Timelines Implemented
Post by: sorlok_reaves on June 05, 2014, 01:24:15 PM
The patch has been applied and the new Portable ZIP uploaded, please go ahead and redownload.

I have seen the your fullscreen bug and responded.

Thanks for patching this; I was "git cherry-pick"-ing older work from my timelines branch, and I must have accidentally pulled in the old action_webpage.
Title: Re: Timelines Implemented
Post by: Darkstar2 on June 05, 2014, 03:17:44 PM
@ sorlok_reaves:

I wanna have your babies!  :D

TMI....... :D :P

Quote
Thank you very much!  (Y)

Yeah indeed, nicely done mate.  Have not had a chance to test it, to be honest never used timelines before.  It's good to see new features added to ENIGMA :D
Title: Re: Timelines Implemented
Post by: egofree on June 05, 2014, 04:02:20 PM
Just a question : are timelines implemented in EDL ? It seems it's not. If i try :

Code: [Select]
global.tl = timeline_add();
I've an error message.
Title: Re: Timelines Implemented
Post by: Goombert on June 05, 2014, 07:22:38 PM
Darkstar2, there really isn't anything special about timelines, thus why it took us so long to add them. egofree, timeline_add() will never be implemented because it requires the timeline to be dynamically compiled, like script_add and execute_string Studio also deprecates this function.
Title: Re: Timelines Implemented
Post by: time-killer-games on June 05, 2014, 07:45:43 PM
Fuck yeah! Been wanting this for a while! :D
Title: Re: Timelines Implemented
Post by: egofree on June 06, 2014, 07:07:27 AM
I create a timeline_0 with a step at 60, where is display the message '60' within a script. Then on the create event of an object i set the timeline to timeline_0, and add it to a room. After two seconds the message is displayed correctly. But if i add another step at 1 in the timeline, where i just run a script to set a variable, when i run the application, the message is displayed immediately. But it should display after two seconds, no ?  Finally, if i add a third step at 120, where i display the message '120' and i run the application, the message '60' is displayed immediately, and after two seconds, the same message is displayed. Perhaps i am not using correctly times lines ? Or is it a bug ?

Here is my project : https://dl.dropboxusercontent.com/u/29802501/test_time_line.egm
Title: Re: Timelines Implemented
Post by: Goombert on June 06, 2014, 10:38:16 AM
Timelines are in steps egofree, they don't work like alarms. So if your room speed is 30 then step 120 will occur at exactly 4 seconds. I believe, perhaps someone could add timeline documentation on the wiki.
Title: Re: Timelines Implemented
Post by: egofree on June 06, 2014, 11:06:00 AM
Timelines are in steps egofree, they don't work like alarms. So if your room speed is 30 then step 120 will occur at exactly 4 seconds. I believe, perhaps someone could add timeline documentation on the wiki.

Ok, but it's not step 120 which is triggered but step 60 twice ! In step 120 i display in a message box the value 120, but you never see this value displayed.
Title: Re: Timelines Implemented
Post by: sorlok_reaves on June 06, 2014, 12:48:41 PM
Can you provide a simple test-case game that works in GM:Studio but fails in Enigma? I'll have a look.
Title: Re: Timelines Implemented
Post by: egofree on June 06, 2014, 03:50:33 PM
Can you provide a simple test-case game that works in GM:Studio but fails in Enigma? I'll have a look.

Ok, i did the exactly the same with GM, and everything works as expected. This is not the case with Enigma right now.

Here is the GM project zipped :
https://dl.dropboxusercontent.com/u/29802501/TestTimeLine.gmx.zip

For downloading the Enigma project, see my previous message.

With a simple project, i did three modifications to test timelines:

1) A time line with one step at 60:

timeline_0:
step 60 -> execute script -> show_message("60");

After two seconds, it displays 60. Works the same on GM and ENIGMA.

2) I add a step at 1, which just sets a variable:

timeline_0:
step1 -> execute script -> x=1;
step 60 -> execute script -> show_message("60");

On GM, it displays correctly the message 60 after 2 seconds. With ENIGMA, it displays the message immediately.

3) I added a third step at 120, which displays another message :

timeline_0:
step1 -> execute script -> x=1;
step 60 -> execute script -> show_message("60");
step 120 -> execute script -> show_message("120");

On GM, it displays correctly the message "60" after 2 seconds, and the message "120" after another delay of 2 seconds. With Enigma, it displays immediately the message "60" and after another delay of 2 seconds it displays "60".

Update : i've found that if you restart ENIGMA and load again the project everything works as expected. To be sure i made again from scratch the project with ENIGMA and the bug happens exactly as i described earlier. You can save the project, it doesn't change anything, but you have to close and restart Enigma if yout want to 'remove' this bug. Perhaps the bug is not within ENIGMA but LateralGM ?

Update2:
A lot of strange things happen with timelines if you don't restart ENIGMA and load again the project. Another slightly different example : if you first create step 1, which displays nothing, run the application, nothing happens as expected, but if you add another step at 60 which displays a message, and run the application, nothing is displayed ! If you restart ENIGMA and load the project, everything is again ok.

In conclusion, every time you make a modification to a timeline, you need to restart ENIGMA to be sure it works as expected.
Title: Re: Timelines Implemented
Post by: sorlok_reaves on June 07, 2014, 10:23:18 PM
Update : i've found that if you restart ENIGMA and load again the project everything works as expected. To be sure i made again from scratch the project with ENIGMA and the bug happens exactly as i described earlier. You can save the project, it doesn't change anything, but you have to close and restart Enigma if yout want to 'remove' this bug. Perhaps the bug is not within ENIGMA but LateralGM ?

Update2:
A lot of strange things happen with timelines if you don't restart ENIGMA and load again the project. Another slightly different example : if you first create step 1, which displays nothing, run the application, nothing happens as expected, but if you add another step at 60 which displays a message, and run the application, nothing is displayed ! If you restart ENIGMA and load the project, everything is again ok.

In conclusion, every time you make a modification to a timeline, you need to restart ENIGMA to be sure it works as expected.

Thanks for digging into this more! This will definitely help me narrow down the bug. I'll let you know once I track it down further.
Title: Re: Timelines Implemented
Post by: sorlok_reaves on June 17, 2014, 01:46:57 PM
Double-posting; just wanted to thank egofree again for his detailed bug report; without it, this issue would have hidden stealthily until undoubtedly the worst possible time.

The issue is now fixed, as of this commit:
https://github.com/enigma-dev/enigma-dev/commit/1c845b0349664b948c8e86faefe832f68e6deb46
Title: Re: Timelines Implemented
Post by: Goombert on June 17, 2014, 06:20:59 PM
The new Portable ZIP with these fixes is available.
http://enigma-dev.org/docs/Wiki/Install:Windows
Title: Re: Timelines Implemented
Post by: egofree on June 20, 2014, 02:56:02 AM
I did more tests with graphical objects and objects inheritance, and everything works as expected.  (Y)