Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zpaolo11x

Pages: [1] 2 3 ... 24
1
Scripting / Re: advanced progres bar
« on: April 17, 2019, 07:55:27 AM »
thank you just had time to use your code,,,,,it is bad ass ...thanks you

That's great! In the meantime I'm coding my own flavors of progress bars inside my theme, but I think I'll post the update after Easter vacations :D

2
Themes / Re: Any 21:9 layouts out there?
« on: April 17, 2019, 12:54:26 AM »
Are you on the Pi? If not try my Arcadeflow in 21:9 it should look like the attached screenshot...

http://www.mixandmatch.it/AF

3
General / Re: New system - 50% usage, super slow scrolling
« on: April 17, 2019, 12:49:39 AM »
Are you sure the system is using the discreet video card and not some form of embedded GPU on the CPU?
Sounds like the issue I had on my Quadro rig that was solved switching the drivers to "Game development mode", but not sure what was changed under the hood

4
Themes / Re: Arcadeflow theme v 4.1 [Release] Updated 11 April 2019
« on: April 16, 2019, 10:30:19 PM »
It's really sad that this theme won't work for raspberry pi 3! I would have used it for all my machines :(
Any way of making a lighter version, that the pi could run? All of us running Attract Mode on a Pi would be eternally greatful! :)

I know, this is something I'd really like to do but there are some hurdles: first and foremost I don't own a Pi myself, I know the Pi is cheap and easy to get, but then the second point steps in: spare time :D I mostly code on my Mac at home or on my PC at coffee breaks at work, and in both cases it would be an issue to have to interact with the TV to check the Pi. If only there was a proper Pi "emulator" for testing code.
Also, on a technical standpoint, Arcadeflow relies heavily on GLSL shaders, and I'm still trying to find what can and what can't be done on the Pi. I don't want to return to using "pre-rendered" graphics for blurred backgrounds etc.

5
Themes / Re: Arcadeflow theme v 4.1 [Release] Updated 11 April 2019
« on: April 16, 2019, 10:24:25 PM »
I know this theme is essentially mame-exclusive with regards to how it displays and handles data, but I was wondering if there was any way to force the aspect ratio of the game snaps to be horizontal.

You are right, Arcadeflow is heavily tied to using Mame or arcades, and especially to use screenshots as artwork. The idea behind this theme was exactly to build some nice graphics for machine that don't have proper "box art" (flyers are nice but sometimes a bit messy and difficult to find).

Building an entirely new "Consoleflow" theme would be interesting: consoles have some advantages like proper box art (should just tweak the drop shadows to be dynamically generated and not "faked" like they are now :D ), screens are always horizontal, probably no need to use "logo" artwork in the grid layout etc. I'll think of it but I'm not so much into console emulation :D

To answer your question more directly, I can fix something on the fly to force Arcadeflow to always display horizontal aspect ratio tiles in the grid, but the theme will force the artwork to fit in an horizontal 4:3 box, so some stretching of box art might occur. What is the aspect of SNES boxes?

[EDIT] Have you tried previous versions of Arcadeflow? Up to 3.7 (I think) it used actual snap resolution to detect horizontal or vertical games and should work with box art too...

6
Themes / Re: Arcadeflow theme v 4.1 [Release] Updated 11 April 2019
« on: April 16, 2019, 09:10:19 AM »
well then ill just wait till you release it , or post the code, so i can play...thanks and good work

The code is a slight variation from the one posted here:

http://forum.attractmode.org/index.php?topic=2864.msg19796#msg19796

The plus of this code is you don't need to pre-create the labels table, but every time you change the table you have to hide the old one, which might be a performance hit in the long run if you keep changing filters (maybe :D)

7
Themes / Re: Arcadeflow theme v 4.1 [Release] Updated 11 April 2019
« on: April 16, 2019, 06:59:33 AM »
the way its set up reminds me of a history timeline

That was the idea :D Also since I already have the proportional scrollbar it's a simple addition to the look of the theme.

Quote
my personal prefrence would be just a clean #-z line

is their a way to do that with your existing code?

Sure there is, actually that's how it started in the beginning because it's much simpler, but I found it a bit clashing with the horizontal scrollbar (that I wanted to retain). Of course I can be crazy enough to put all this variants as options in the theme LOL

8
Themes / Re: Arcadeflow theme v 4.1 [Release] Updated 11 April 2019
« on: April 16, 2019, 06:33:35 AM »
Inspired by the thread regarding progress bars... sneak preview of something that might go in next release. Curious to have feedback about that

9
Scripting / Re: advanced progres bar
« on: April 15, 2019, 10:06:52 AM »
Playing with my own code...

10
Scripting / Re: advanced progres bar
« on: April 15, 2019, 07:41:29 AM »
This is all good if your list is always sorted by name. If you have filters sorted by different criteria it gets tricky really fast. The magic token [OrderValue] can't be retrieved through fe.game_info, so one has to tweak the "first letter" function to keep track of this, and for years sorting an entirely new list should be used with years and not letters.

[SortName] works if we use it to get text directly but can't get in through game info.

Yes, [SortName] from what I get from the tutorials should give the field that is used to sort the list, like the "sort_by" attribute in the list. I don't know why it is in the magic token :D What I meant was [SortValue] (OrderValue is a typo) which again is not through game_info

11
Scripting / Re: advanced progres bar
« on: April 15, 2019, 06:56:32 AM »
This is my code contribution.

There's a "gameletter" function that acts differently if the list is sorted by name or manufacturer (returns the first letter), by category (returns the main category) or by year (returns the decade in the form 198x).

There is a routine in the on_transition section that, when transitioning to a new list, dynamically builds a table of "sort items" that are letters or years or categories according to the sort order, and changes it every time so the list is always consistent with the sort order. A small tweak can be done to space each "section" proportionally to the number of games in that slot but if there are few games then the category name will not fit, so I let it out

Code: [Select]
function gameletter( offset ) {
   if (fe.filters.len() > 0){

      if (fe.filters[fe.list.filter_index].sort_by == Info.Year){
         local s = fe.game_info( Info.Year, offset )
         s = s.slice (0,3)+"x"
         return s
      }
      else if (fe.filters[fe.list.filter_index].sort_by == Info.Manufacturer){
         local s = fe.game_info( Info.Manufacturer, offset )
         return s.slice(0,1)
      }
      else if (fe.filters[fe.list.filter_index].sort_by == Info.Category){
         local s = fe.game_info( Info.Category, offset )
         if (s == "") return "?"
         s = split( s, "/" )
         return strip(s[0])
         }
      else {
         local s = fe.game_info( Info.Title, offset )
         if (s.find("The ") == 0) s = s.slice(4,s.len())
         local s2 = s.slice(0,1)
         if ("1234567890".find (s2) != null ){
            s2="#"
         }
         return s2
      }
   }
}


local flw = fe.layout.width
local flh = fe.layout.height
local gamename = fe.add_text("[Title]\n[SortValue]",0,0,flw,flh/10)
gamename.charsize = gamename.height*0.25

local accent = fe.add_text ("[!gameletter]",0,flh*0.5,flw,flh*0.25)
accent.charsize = flh*0.25


local keys = null

fe.add_transition_callback( this, "on_transition" )

function on_transition( ttype, var, ttime ) {

   if (ttype == Transition.ToNewSelection){
      local l1 = gameletter(0)
      local l2 = gameletter(var)

      if (l1 != l2){
         keys [l1].alpha = 128
         keys [l2].alpha = 255
      }
   }

   if (ttype == Transition.ToNewList){
      local tableorder = []
      local tableletter = {}

      for (local i = 0 ; i < fe.list.size ; i++){
         local s =  (gameletter (i-fe.list.index))
         try { tableletter[s]++ }
         catch (err) {
            tableletter[s] <- 1
            tableorder.push (s)
         }
      }

      keys = {}
      local i = 0
      local x0 = 0

      foreach (key in tableorder){
         local key_obj = fe.add_text(key,x0,flh*0.5,flw/tableorder.len(),50)
         key_obj.charsize = 50
         key_obj.alpha = ((tableletter[key] > 0) ? 128 : 0)
         key_obj.set_bg_rgb (100+50*(i%2),100+50*(i%2),100+50*(i%2))
         i++
         x0 = x0 + flw/tableorder.len()
         keys[key] <- key_obj
      }

      keys [gameletter(0)].alpha = 255
   }

}

12
Scripting / Re: advanced progres bar
« on: April 15, 2019, 05:48:47 AM »
This is all good if your list is always sorted by name. If you have filters sorted by different criteria it gets tricky really fast. The magic token [OrderValue] can't be retrieved through fe.game_info, so one has to tweak the "first letter" function to keep track of this, and for years sorting an entirely new list should be used with years and not letters.

13
Scripting / Re: advanced progres bar
« on: April 13, 2019, 11:03:08 AM »
This thread is giving me ideas... I like both Oomek and Rand0m implementation, but I'm thinking of something even more radical... I want to add markers on my scrollbar for the letters and space them according to the actual number of games of that letter. This will work also for years, genres etc... I'll start coding ASAP lol!

14
Scripting / Re: advanced progres bar
« on: April 13, 2019, 12:39:16 AM »
I think that most of the problems you have with my code (which is very rude anyway) is that it's not built to work with shuffle, I have no idea how shuffle works. The code updates only the current and previous letters based on ToNewSelection transitions to be less resource heavy, alternatively you can clean up all the letters and "light up" the current one, but you need to find the proper trigger for that in shuffle mode.

Just to be sure, the routine detecting the current letter is working right?

15
Scripting / Foreach item oreder
« on: April 12, 2019, 04:57:24 AM »
I have this simple code:

Code: [Select]
local key_names = { "1": "A", "2": "B", "3": "C", "4": "D"}

foreach (key,val in key_names){
   print (key + " " + val +"\n")
}

Maybe I don't get it right but the console output of this code is

Code: [Select]
1 A
3 C
2 B
4 D

I would expect it to return

Code: [Select]
1 A
2 B
3 C
4 D

Also speaking of tables, what is the difference between something like this:

Code: [Select]
local aTable = { "first_key" : "Max Normal",
                 "second_key" : 42,
                 "third_key" : true};

and this:

Code: [Select]
local aTable = { "first_key" = "Max Normal",
                 "second_key" = 42,
                 "third_key" = true};

Pages: [1] 2 3 ... 24