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

calle81

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

keilmillerjr

  • Hero Member
  • *****
  • Posts: 561
    • 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
« Last Edit: September 09, 2018, 05:14:48 PM by keilmillerjr »

nevincho

  • Full Member
  • ***
  • Posts: 74
    • 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?
AM Version : 2.1.0/2.3.0
Input :  Mouse; Keyboard; USB Joystick, Arcade controls
Cabinet : No ( working on second ) and Yes one with Pandoras Box 4
OS : Groovy Arcade 2016/Windows
System : IBM M52 ; Intel P4 3GHz Dual Core ; 4GB DDR2 RAM
Emulators : mame, mupen64plus, PSX (mednafen), Dolph

keilmillerjr

  • Hero Member
  • *****
  • Posts: 561
    • 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: 506
  • 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: 74
    • 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
AM Version : 2.1.0/2.3.0
Input :  Mouse; Keyboard; USB Joystick, Arcade controls
Cabinet : No ( working on second ) and Yes one with Pandoras Box 4
OS : Groovy Arcade 2016/Windows
System : IBM M52 ; Intel P4 3GHz Dual Core ; 4GB DDR2 RAM
Emulators : mame, mupen64plus, PSX (mednafen), Dolph

keilmillerjr

  • Hero Member
  • *****
  • Posts: 561
    • 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

  • Hero Member
  • *****
  • Posts: 561
    • 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: 74
    • 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.
AM Version : 2.1.0/2.3.0
Input :  Mouse; Keyboard; USB Joystick, Arcade controls
Cabinet : No ( working on second ) and Yes one with Pandoras Box 4
OS : Groovy Arcade 2016/Windows
System : IBM M52 ; Intel P4 3GHz Dual Core ; 4GB DDR2 RAM
Emulators : mame, mupen64plus, PSX (mednafen), Dolph