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

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: shuffle-module: First official release
« Reply #15 on: January 18, 2019, 02:34:18 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.

Please do, I can work my way through trial and error with an example. I have looked into previous themes utilizing the shuffle module but the code is obsolete with regards to current version.

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: shuffle-module: First official release
« Reply #16 on: January 18, 2019, 03:45:12 AM »
Taken from the readme is an example with three text objects. They are passed as an array to the class constructor. The index of these objects is handled by the class. You place or style the objects however.

You could create 12 text objects with Title as a magic string. Position them in a visually stacked manner. Extend the class select function to make object bold. Now you can see which object is selected. It should operate similar to attract’s built in listbox object, but allows for much more freedom.

// Load the Shuffle module
fe.load_module("shuffle");

// Create your objects
local list = [];
   list.push(fe.add_text("Title", -1, -1, 1, 1));
   list.push(fe.add_text("Title", -1, -1, 1, 1));
   list.push(fe.add_text("Title", -1, -1, 1, 1));

// Create an instance of the Shuffle class
// Shuffle(slots, type, reset=true)
local list = Shuffle(list, "text");

Best I can do on iPhone until Saturday. Feel free to hit me up on discord if you need to.

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: shuffle-module: First official release
« Reply #17 on: January 18, 2019, 06:18:16 AM »
Taken from the readme is an example with three text objects. They are passed as an array to the class constructor. The index of these objects is handled by the class. You place or style the objects however.

You could create 12 text objects with Title as a magic string. Position them in a visually stacked manner. Extend the class select function to make object bold. Now you can see which object is selected. It should operate similar to attract’s built in listbox object, but allows for much more freedom.

Best I can do on iPhone until Saturday. Feel free to hit me up on discord if you need to.

Thanks a lot Keil, I finally got both the text and images working with the new version (1.0) of shuffle :D. I will now try my luck shuffle on larger lists following your suggestions.

I think fast browsing is working in shuffle, though my list (of 5 items) seems to be too short for the fast browsing option of AM to be truly noticeable as it reaches the end too fast and (like AM) stops at the last item before looping. I've uploaded a small video of my current shuffle setup (displaymenu only) and you can check the fast browsing part near the end (around 08 secs).

Video Link: https://youtu.be/rb4ttP4QKq4

PS: A shout out to @jedione too, it was his theme which helped a lot in figuring out the image part!
« Last Edit: January 18, 2019, 06:47:53 AM by rand0m »

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: shuffle-module: First official release
« Reply #18 on: January 18, 2019, 09:54:29 AM »
word..that looks so clean....bro
help a friend....

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: shuffle-module: First official release
« Reply #19 on: January 18, 2019, 07:29:01 PM »
Taken from the readme is an example with three text objects. They are passed as an array to the class constructor. The index of these objects is handled by the class. You place or style the objects however.

You could create 12 text objects with Title as a magic string. Position them in a visually stacked manner. Extend the class select function to make object bold. Now you can see which object is selected. It should operate similar to attract’s built in listbox object, but allows for much more freedom.

Best I can do on iPhone until Saturday. Feel free to hit me up on discord if you need to.

Thanks a lot Keil, I finally got both the text and images working with the new version (1.0) of shuffle :D. I will now try my luck shuffle on larger lists following your suggestions.

I think fast browsing is working in shuffle, though my list (of 5 items) seems to be too short for the fast browsing option of AM to be truly noticeable as it reaches the end too fast and (like AM) stops at the last item before looping. I've uploaded a small video of my current shuffle setup (displaymenu only) and you can check the fast browsing part near the end (around 08 secs).

Video Link: https://youtu.be/rb4ttP4QKq4

PS: A shout out to @jedione too, it was his theme which helped a lot in figuring out the image part!

Looks very nice! I noticed that your indexing seems very quick. If you hold down the next game control, does it continue to index until the end of the list?

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: shuffle-module: First official release
« Reply #20 on: January 18, 2019, 09:50:25 PM »
word..that looks so clean....bro

Thanks man, I am trying to follow file manager (tree) organizational setup with systems opening and closing like folders and moving in similar hierarchy.

Looks very nice! I noticed that your indexing seems very quick. If you hold down the next game control, does it continue to index until the end of the list?

Thanks Keil, yes the indexing is quick and overall experience has improved quite a bit by using mipmap. I've tried the shuffle plugin on a large list 200+ and AM quick browsing does work as intended. Indexing also continue to index till the end of list and stops there, I have to press down again to continue the indexing (which starts from 1st item of list).

I'll upload another video of shuffle in a large list in a couple of hours.

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: shuffle-module: First official release
« Reply #21 on: January 19, 2019, 06:35:38 AM »
Looks very nice! I noticed that your indexing seems very quick. If you hold down the next game control, does it continue to index until the end of the list?

Here is a much longer video showing shuffle in 200+ list > https://youtu.be/cEAhZQLsCho

Shuffle is working brilliantly but two instances where I am facing some trouble:

1) Feels a tad bit slower then AM default, it might very well be videos which I have to re-encode or my awful coding skills :D.
2) Some romsets have fewer then 10 roms, on a shuffle setup with 10+ objects rom titles are repeated (repetition not in loop but on the same screen).

word..that looks so clean....bro

Check it out now bro, not in its full glory since its very much a WIP but still.