Author Topic: shuffle-module: First official release  (Read 9449 times)

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
shuffle-module: First official release
« on: January 01, 2019, 07:51:20 PM »
This is Shuffle’s first official release. Shuffle will now used versioned releases. Please update your layouts to the latest release and make note of the version used to prevent the breaking of your layouts.

I know some people are using my shuffle module. The latest commit will break existing layouts. I am sorry. Please either update your layout, or link in your readme to a previous specific commit. I am now using versioning, and it should prevent issues like this in the future.

Expect to see versioning in use slowly as I update other modules/plugins/layouts. I accomplished some attract coding on my holiday break. Still need to polish a few items, update readme, and push to GitHub. Might be a few days for other releases like an updated shader module. We will see how my new work schedule of 12hr nights works out. Good news is I will have random days off during the week with a 2 on / 3 off / 3 on / 2 off schedule. Not excited.

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: shuffle-module: First official release
« Reply #1 on: January 02, 2019, 04:12:15 AM »
Well, I have been using this shuffle module for a long time and it has not given me any problems...  8)


But hey, I'll try the new one ...  ::)
« Last Edit: January 02, 2019, 04:13:53 AM by iOtero »
Nacer a los 15 años Una novela de iOtero

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: shuffle-module: First official release
« Reply #2 on: January 02, 2019, 12:53:26 PM »
Successfully updated the layout with shuffle 1.0 after including the magic token as you suggested. Thank you!

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: shuffle-module: First official release
« Reply #3 on: January 03, 2019, 10:32:54 AM »
Well, i will continue using the old module, at least until i see a complete practical example. I do not intend to waste my time doing tests until i find the correct way to apply the new module... Besides, i am one of those who think that something works, the best thing is not to touch it... :D


Now if someone translates this to the new module, then i will be grateful:

Code: [Select]
local flxl = flx*0.4805;
local flwl = flw*0.5016;
local flhl = flh*0.0315;
local bfy  = 0.1825;
local rows =20;

local list = Shuffle(rows, "text", "[Title]");

for(local i=0; i<rows; i++)
{
list.slots[i].set_pos(flxl, fly*bfy, flwl, flhl);
bfy = bfy + 0.0252;
}

class ShufflePow extends Shuffle
{
function select(slot)
{
slot.visible = true;
}

function deselect(slot)
{
slot.visible = false;
}
}

local flxp = flx*0.4705;
local flwp = flw*0.5313;
local flhp = flh*0.0495;
local pfy = 0.177;

local pow = ShufflePow(rows, "image", "objs/sys/selector.png");

for(local i=0; i<rows; i++)
{
pow.slots[i].set_pos(flxp, fly*pfy, flwp, flhp);
pfy = pfy + 0.0252;
}

function fade_transitions(ttype, var, ttime)
{
switch(ttype)
{
case Transition.ToNewSelection:
case Transition.ToNewList:

local Wheelclick = fe.add_sound("objs/sys/clic.mp3");
Wheelclick.playing=true;

break;
}
return false;
}

fe.add_transition_callback("fade_transitions");
« Last Edit: January 03, 2019, 11:25:06 AM by iOtero »
Nacer a los 15 años Una novela de iOtero

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: shuffle-module: First official release
« Reply #4 on: January 06, 2019, 10:06:55 AM »

so dose the new module.. work better than the original?

their must be a reason. for the change.

it does not list support for animation ,  the original works with animation for me.

help a friend....

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: shuffle-module: First official release
« Reply #5 on: January 06, 2019, 10:14:41 AM »

so dose the new module.. work better than the original?

their must be a reason. for the change.

it does not list support for animation ,  the original works with animation for me.

Shuffle no longer creates objects. Object array must be passed to class. Supports preserve-art module. Update now called by transitions instead of signals, resolving some issues. Updated mvscomplete image and readme. This commit will break existing usage of the module, and layouts must be updated.

It works no better than before. Objects are now created outside the class. I think it produces cleaner code. Additionally, it now supports the preserve-art module. Animations and effects can be added just like before by extending the class. I hope to add the ability that some requested, optionally no looping of indexes. Versioned releases will make this easier for people using this module.

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: shuffle-module: First official release
« Reply #6 on: January 07, 2019, 04:52:21 AM »
I do not see the improvements anywhere and the code will be clearer for some... not for me, besides you say it yourself: "It works no better than before." ;D

I will continue using the old one, which works very well, allows objects and animations...  8)

That something works, the best thing is not to touch it... :D
Nacer a los 15 años Una novela de iOtero

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: shuffle-module: First official release
« Reply #7 on: January 07, 2019, 05:18:47 AM »
I do not see the improvements anywhere and the code will be clearer for some... not for me, besides you say it yourself: "It works no better than before." ;D

I will continue using the old one, which works very well, allows objects and animations...  8)

That something works, the best thing is not to touch it... :D

There is improvement in functionality. New version supports preserve-art module. Good thing about GitHub is your free to view/use at any point in history.

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: shuffle-module: First official release
« Reply #8 on: January 07, 2019, 06:13:55 PM »
There is improvement in functionality. New version supports preserve-art module. Good thing about GitHub is your free to view/use at any point in history.

I find it very good, but I do not find it useful to preserve art module. I do not need it.  8)
Nacer a los 15 años Una novela de iOtero

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 243
    • View Profile
    • Idaho Garagecade
Re: shuffle-module: First official release
« Reply #9 on: January 11, 2019, 08:06:32 AM »
What does the module do?
Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: shuffle-module: First official release
« Reply #10 on: January 11, 2019, 08:15:02 AM »
What does the module do?

Check out the readme. It describes it well and provides two animated gif examples.

https://github.com/keilmillerjr/shuffle-module/blob/v1.0.0/readme.md

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: shuffle-module: First official release
« Reply #11 on: January 17, 2019, 09:02:36 PM »
It works no better than before. Objects are now created outside the class. I think it produces cleaner code. Additionally, it now supports the preserve-art module. Animations and effects can be added just like before by extending the class. I hope to add the ability that some requested, optionally no looping of indexes. Versioned releases will make this easier for people using this module.

The "no looping of indexes" part would be great :D. I have some small queries regarding the use of (current version) shuffle.

a) Lets say we have a list of 5 items A,B,C,D & E, with A being the first item in list and E being the last. A is given the spot 100, 100, B 100, 200 till E 100, 500. While we scroll downwards from A and reach E, scrolling down further will move the list to item A but will the same spot (E, 100, 500). It this the intended behavior? Or is the selection area is supposed to move to A (100, 100)? With no looping of indexes will the list stop moving downward from E (100, 500) or jump back to A (100, 100)?

b) I am currently using shuffle in displaymenu with only 5 items. It seems that AM function of pressing down for quick scrolling is not being applied, is my list too short for application or shuffle doesn't support that?

c) What about really long lists like e.g. mame romlist. Currently I have to enter manually 5 items in shuffle with their locations, how would that work with 100+ items lists? Is there any other way of applying shuffle in a vertical list with numerous items where we don't have to manually position each row/ slot?

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: shuffle-module: First official release
« Reply #12 on: January 18, 2019, 12:30:21 AM »
a) Lets say we have a list of 5 items A,B,C,D & E, with A being the first item in list and E being the last. A is given the spot 100, 100, B 100, 200 till E 100, 500. While we scroll downwards from A and reach E, scrolling down further will move the list to item A but will the same spot (E, 100, 500). It this the intended behavior? Or is the selection area is supposed to move to A (100, 100)? With no looping of indexes will the list stop moving downward from E (100, 500) or jump back to A (100, 100)?

Correct. That is the intended behavior. I had intentions of using it with romlist which would be higher than the array of objects. It does seem weird if your index length is the same as your objects... or less!

b) I am currently using shuffle in displaymenu with only 5 items. It seems that AM function of pressing down for quick scrolling is not being applied, is my list too short for application or shuffle doesn't support that?

Excited for this comment! I wasn't sure if the issue only occurred for myself or others. I think the only way to get around this is to not use attract-mode's signals. I just had a quick look at the conveyor class. I might have to implement something like that to simulate attract-mode's natural indexing. I wanted to stay away from it because other things can receive signals. Manually indexing means I could implement a no loop feature. Will investigate further in two days. Thank you for bringing this to my attention!

c) What about really long lists like e.g. mame romlist. Currently I have to enter manually 5 items in shuffle with their locations, how would that work with 100+ items lists? Is there any other way of applying shuffle in a vertical list with numerous items where we don't have to manually position each row/ slot?

I would hope you wouldn't be showing 100 items in a list at the same time. However, you can create a for loop that creates the object and step things sequentially.

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: shuffle-module: First official release
« Reply #13 on: January 18, 2019, 12:51:31 AM »

Correct. That is the intended behavior. I had intentions of using it with romlist which would be higher than the array of objects. It does seem weird if your index length is the same as your objects... or less!

Excited for this comment! I wasn't sure if the issue only occurred for myself or others. I think the only way to get around this is to not use attract-mode's signals. I just had a quick look at the conveyor class. I might have to implement something like that to simulate attract-mode's natural indexing. I wanted to stay away from it because other things can receive signals. Manually indexing means I could implement a no loop feature. Will investigate further in two days. Thank you for bringing this to my attention!

I would hope you wouldn't be showing 100 items in a list at the same time. However, you can create a for loop that creates the object and step things sequentially.

I don't want to be showing hundreds of items at the same time but the ability to browse through hundreds of items in a vertical list (plain text) where a dozen or so are visible on screen at any time. Similar behavior to that of AM default.

Is retrorama2 theme (.gif in Shuffle's main github dir) utilizing the said loop? I am stuck on the idea that one slot equals one row so a list, of say 100 roms, will require 100 different slots each with its own placement (manual) instruction. In retrorama2 gif it seems there is a single slot and user can vertically browse through the roms listed in that single slot.

I am sorry for so many Q's but slots/ arrays/ rows all get mixed together for me as I don't have a programming background :D.

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: shuffle-module: First official release
« Reply #14 on: January 18, 2019, 01:07:35 AM »
I chose the name for the module because it “shuffles” indexes through objects. Create an array. Push the objects to the array. For instance, you want 12 text objects on the screen, push 12 objects. You can do this manually, or create a loop for count of 12 to do it. Style the objects. Pass the array to the shuffle class.

If you can’t get it, I’ll provide an example for you on Saturday.