Author Topic: Problem plugin - Random  (Read 28245 times)

calle81

  • Sr. Member
  • ****
  • Posts: 184
    • View Profile
Re: Problem plugin - Random
« Reply #15 on: September 08, 2018, 10:09:24 AM »
This is awesome. Thanks!

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Problem plugin - Random
« Reply #16 on: September 09, 2018, 02:58:55 PM »
ok here it is...  showing two or three cycles of the game list by it's self
after not scrolling..

to me this embodies the word "attract mode" when put on a arcade cabinet. 

i think this would be the game changer for AM.

preview =
https://youtu.be/vGXdz2JjWfs


note:  this is what got me in to AM 4 years ago..IE:  i would walk out to get some milk say
2 to 3 in the morning.   and see AM on my arcade cabnet in my living room.
and it was going crazy with..all the difrint games that were of coruse the,, screen saver..
i could not go back to bed... i had to play...... :-* a new game i never saw

  • I added this feature.
  • It works.
  • It is not yet released.
  • It still has some small bugs and needs refinement.

It works similar as the first release - waiting for a period of time after the last signal before activating. Plugin then chooses a target for a random game, and sends a next_game signal until the target is reached.

FadeArt will not update until the current playing video is complete, I think.?

https://youtu.be/d5QUhjdtYPs

nevincho

  • Full Member
  • ***
  • Posts: 92
    • View Profile
Re: Problem plugin - Random
« Reply #17 on: September 09, 2018, 09:35:06 PM »
Is it possible except by random, to change the list in ascending order: 1,2,3 and so on?

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Problem plugin - Random
« Reply #18 on: September 10, 2018, 03:54:12 PM »
Is it possible except by random, to change the list in ascending order: 1,2,3 and so on?

I am not sure why you would want this. Anyways, fork it on GitHub now before I do an update, and change plugin.nut line 51 to the following:
Code: [Select]
if (ttime >= signalTime + delayTime) fe.filters.reverse_order = true;

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: Problem plugin - Random
« Reply #19 on: September 10, 2018, 06:05:30 PM »
thanks for making the rev-2 cant wait till you release it thanks..

did not know you were in to firewood, cool.
help a friend....

nevincho

  • Full Member
  • ***
  • Posts: 92
    • View Profile
Re: Problem plugin - Random
« Reply #20 on: September 10, 2018, 10:02:43 PM »
Is it possible except by random, to change the list in ascending order: 1,2,3 and so on?

I am not sure why you would want this. Anyways, fork it on GitHub now before I do an update, and change plugin.nut line 51 to the following:
Code: [Select]
if (ttime >= signalTime + delayTime) fe.filters.reverse_order = true;

Thanks again for your time. I tried and changed the code to line 51 but it does not work

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Problem plugin - Random
« Reply #21 on: September 11, 2018, 02:15:23 AM »
Is it possible except by random, to change the list in ascending order: 1,2,3 and so on?

I am not sure why you would want this. Anyways, fork it on GitHub now before I do an update, and change plugin.nut line 51 to the following:
Code: [Select]
if (ttime >= signalTime + delayTime) fe.filters.reverse_order = true;
Thanks again for your time. I tried and changed the code to line 51 but it does not work

I rechecked the docs. I guess I looked at it too quickly.

Quote
reverse_order - [bool] Will be equal to true if the list order has been reversed.

You need to test reverse_order and switch its boolean value.

Try:

Code: [Select]
if (ttime >= signalTime + delayTime)
  fe.filters.reverse_order ? fe.filters.reverse_order = false : fe.filters.reverse_order = true;

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Problem plugin - Random
« Reply #22 on: September 11, 2018, 02:19:20 AM »
thanks for making the rev-2 cant wait till you release it thanks..

did not know you were in to firewood, cool.

My father owns a logging company. I just changed careers last week to CNC electro-mechanical technician.

I changed the logic on the signal variable. I think it works correctly now. Give the experimental a try again with latest commit? It compares the distance between index and target, and the list size minus the distance between index and targe, and then selects appropriate direction based on index and target size comparison.

nevincho

  • Full Member
  • ***
  • Posts: 92
    • View Profile
Re: Problem plugin - Random
« Reply #23 on: September 11, 2018, 03:34:17 AM »
Is it possible except by random, to change the list in ascending order: 1,2,3 and so on?

I am not sure why you would want this. Anyways, fork it on GitHub now before I do an update, and change plugin.nut line 51 to the following:
Code: [Select]
if (ttime >= signalTime + delayTime) fe.filters.reverse_order = true;
Thanks again for your time. I tried and changed the code to line 51 but it does not work

I rechecked the docs. I guess I looked at it too quickly.

Quote
reverse_order - [bool] Will be equal to true if the list order has been reversed.

You need to test reverse_order and switch its boolean value.

Try:

Code: [Select]
if (ttime >= signalTime + delayTime)
  fe.filters.reverse_order ? fe.filters.reverse_order = false : fe.filters.reverse_order = true;

I tested it with АМ 2.3.0/2.4.0 and it did not work again. No matter how interesting it may be. Thank you again for your attention. It's not important that if one day you have time a look at it. It would be a nice plugin to have two options for alternating games.

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Problem plugin - Random
« Reply #24 on: October 09, 2018, 07:24:27 PM »
Updated the experimental branch for sequencer plugin. Sorry it took so long. I just spent two hours with it. I added the ability to jump ahead indexes. It makes the action quicker. Anyone can try it and provide input or fork/pull request. Still hung up on why fe.signal on every consecutive tick does not produce the same result as navigation button press. My frame rate gets low too.

jeffy777

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problem plugin - Random
« Reply #25 on: October 11, 2018, 04:29:23 AM »
Is there any way to auto pause the script while you’re playing a game? Feels a bit weird to exit a game and have another game selected. (I haven’t tried the experimental version yet, so apologies if it was already added to that).

Amazing work, thank you for making this.
« Last Edit: October 11, 2018, 04:32:53 AM by jeffy777 »

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Problem plugin - Random
« Reply #26 on: October 11, 2018, 08:41:50 AM »
Is there any way to auto pause the script while you’re playing a game? Feels a bit weird to exit a game and have another game selected. (I haven’t tried the experimental version yet, so apologies if it was already added to that).

Amazing work, thank you for making this.

No, but I can add that feature. I forgot that the front end doesn’t really pause when focus is taken away. Perhaps this weekend I can work on it.

jeffy777

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problem plugin - Random
« Reply #27 on: October 11, 2018, 03:53:55 PM »
Is there any way to auto pause the script while you’re playing a game? Feels a bit weird to exit a game and have another game selected. (I haven’t tried the experimental version yet, so apologies if it was already added to that).

Amazing work, thank you for making this.

No, but I can add that feature. I forgot that the front end doesn’t really pause when focus is taken away. Perhaps this weekend I can work on it.

That would be fantastic. I really appreciate your work.

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Problem plugin - Random
« Reply #28 on: October 14, 2018, 07:07:27 PM »
Is there any way to auto pause the script while you’re playing a game? Feels a bit weird to exit a game and have another game selected. (I haven’t tried the experimental version yet, so apologies if it was already added to that).

Amazing work, thank you for making this.

No, but I can add that feature. I forgot that the front end doesn’t really pause when focus is taken away. Perhaps this weekend I can work on it.

That would be fantastic. I really appreciate your work.

I did some work to the master branch. Totally revised. I am very pleased with the outcome.

  • Picks random target index
  • Picks a random direction
  • Changes fe.list.index -1/+1 based on direction
  • Sends signal to move to our target index

  • Game will not change during gameplay, and will reset counter FromGame.
  • No issues with fade art module
  • No drop in frame rate when changing games
  • “Spinning wheel“ type movement is not present like the experimental branch, but utilizing next and prevention signals at random means that other modules can still provide some sort of movement.

I think I’m at end with the experimental branch unless some one can provide some insight for an approach. Master branch is pretty good in my eyes, and would like feedback as to how well it’s interaction with other themes is.

calle81

  • Sr. Member
  • ****
  • Posts: 184
    • View Profile
Re: Problem plugin - Random
« Reply #29 on: October 15, 2018, 11:02:03 AM »
I just tried the updated plugin from the master branch and it works perfectly.  Thank you! :)