Author Topic: Shuffle v2.2.0 - Loop feature now added  (Read 4441 times)

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #30 on: September 30, 2019, 01:14:00 PM »
I have visited arcademvs.org, and it will be because of my poor command of the English language, but i have no idea what you intend to do on that site... Sorry  :-[
Nacer a los 15 años Una novela de iOtero

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1077
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #31 on: September 30, 2019, 09:52:01 PM »
I have visited arcademvs.org, and it will be because of my poor command of the English language, but i have no idea what you intend to do on that site... Sorry  :-[

Guides for creating MAME machines. I have a guide how to fully hide windows 10, how to create a mame setup from scratch on the raspberry pi, unix commands, how to compile mame on different operating systems. These are things a lot of people struggle with or just haven't a clue to do and instead seek “images” and end up in the same position of not knowing how to do something. The namespace also now houses my attract layouts/modules/plugins. Guides might be at a standstill until I fix my flyback transformer.

rand0m

  • Sr. Member
  • ****
  • Posts: 299
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #32 on: October 17, 2019, 10:07:53 PM »
Good find iOtero. I have logic for new list, but not filters. Currently working on a new project. Transferring everything to gitlab group and started a wiki. Will put this on my list to do afterwards. Thank you!

Wiki is http://arcademvs.org if you want to check it out. Going to have an attract section for setting up filters and displays eventually. I think a few people here could help me with the displays section.

Hiya Keil, Filter info update on display change has been fixed > https://github.com/mickelson/attract/commit/7dc5c88ca15d756f53ff28e427f8b6be019a1db7
If I understand it correctly jumping from one filter to next should behave similarly to new display as filter array is reloaded

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #33 on: October 24, 2019, 05:40:55 AM »
Well nothing... To compile Attract-Mode again... thanks for the info Rand0m...
Nacer a los 15 años Una novela de iOtero

rand0m

  • Sr. Member
  • ****
  • Posts: 299
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #34 on: October 24, 2019, 10:08:38 AM »
Well nothing... To compile Attract-Mode again... thanks for the info Rand0m...

The filter issue still persists, just checked.

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #35 on: December 10, 2019, 10:00:07 AM »
Keil, i know that you are very busy with other things, but are you going to someday end this plugin? It doesn't work properly.
Thanks.
Nacer a los 15 años Una novela de iOtero

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1077
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #36 on: December 11, 2019, 02:48:10 AM »
Keil, i know that you are very busy with other things, but are you going to someday end this plugin? It doesn't work properly.
Thanks.

I will try to continue it soon. Latest attract commits will be good for this. However, my financial standing may impact my time with attract for a while.

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #37 on: December 11, 2019, 06:58:43 AM »
Keil, i know that you are very busy with other things, but are you going to someday end this plugin? It doesn't work properly.
Thanks.

I will try to continue it soon. Latest attract commits will be good for this. However, my financial standing may impact my time with attract for a while.

Ok, thanks.
Nacer a los 15 años Una novela de iOtero

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #38 on: January 03, 2020, 04:37:58 AM »
Well, since I needed Shuffle to work correctly when changing filters, I made this modification to your code. I hope it doesn't bother you.
I guess it's not the right modification you would make, but for now it works for me. And it has been easier than I thought, I've only added five lines of code.

Your original code:

Code: [Select]
function _signals(signal_str)
{
switch(signal_str)
{
// ignore signals at start or end of list when looping is false
case "prev_game":

if(this._loop == false && fe.list.index == 0) return true;
break;

case "next_game":

if(this._loop == false && fe.list.index == fe.list.size-1) return true;
break;

// do not update selection for these signals
case "prev_letter":
case "next_letter":
case "random_game":
case "add_favourite":
case "prev_favourite":
case "next_favorite":
this._ignoreNewSelection = true;
break;
}

return false;
}

Modified code:

Code: [Select]
function _signals(signal_str)
{
switch(signal_str)
{
// ignore signals at start or end of list when looping is false
case "prev_game":

if(this._loop == false && fe.list.index == 0) return true;
break;

case "next_game":

if(this._loop == false && fe.list.index == fe.list.size-1) return true;
break;

case "prev_filter":

case "next_filter":
this._selected = 0;
fe.list.index = 0;
break;

// do not update selection for these signals
case "prev_letter":
case "next_letter":
case "random_game":
case "add_favourite":
case "prev_favourite":
case "next_favorite":
this._ignoreNewSelection = true;
break;
}

return false;
}

This fixes the problem with the filter change, but not with the letter change... which is not going well either.
« Last Edit: January 05, 2020, 10:10:30 AM by iOtero »
Nacer a los 15 años Una novela de iOtero

rand0m

  • Sr. Member
  • ****
  • Posts: 299
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #39 on: January 30, 2020, 10:11:47 AM »
This fixes the problem with the filter change, but not with the letter change... which is not going well either.

Tested your solution on my layout and it works :D experimented some more and if we change "reset" to true in following part (your might be different):

Code: [Select]
local list = ShuffleList({ save="retrodiction", hide=true, loop=false, reset=true, slots=list });
local pow = ShufflePow({ save="retrodiction", hide=true, loop=false, reset=true, slots=pow});

We won't need additional instructions and original code will work. IMHO "save=layout_name" and "reset=true" operates in most optimal fashion and takes care of anyother function(s) we might use like "search_results" and  "filter_menu" without adding additional instructions for them.

Kudos to Keil, shuffle is working really great now!