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 - keilmillerjr

Pages: [1] 2 3 ... 60
1
Scripting / Re: custom loading screen for every game.
« on: May 15, 2019, 04:52:17 PM »
Glad I could help, don’t get me wrong my code changes are sloppy and a word of caution don’t change the time for the second variable to 0 when you adjusting game fade out times

I have them set to 3000 and 500 respectively.  I'll probably knock the FromGame down to something very low, but this is working great.  Just need to figure out the sound piece.

I would create a transition callback within your layout and mute your objects audio.

I am very tired so bed early. Will work on this plugin tomorrow and try to add in some requests. This plugin was kind of a step and stone for my latest layout - so time to update. Keep the brainstorming.

2
Themes / Re: PICKnMIX - unibios neogeo inspired layout
« on: May 13, 2019, 12:45:27 PM »
Great Job Keil!

Thank you!

Not documented yet, but here’s a first commit if anyone wants to try. It’s very crt friendly (and lcd). @oomek resolved an issue with sfml and raspberry pi that I have to test in a few days. Added a GPL license this time due to an issue that arouse recently on facebook.

https://github.com/keilmillerjr/picknmix-layout

3
Scripting / Re: custom loading screen for every game.
« on: May 13, 2019, 12:04:24 PM »
You are setting all color values of the image r-0 g-0 b-0, so your artwork image will be solid black. It’s a quirky way I make a 1px image any solid color.

Where is the artwork coming from? Curious. I have been thinking about some sort of instruction. Searched emu movies and hyper spin two days ago and couldn’t find anything that would work. Settled on maybe parsing history.dat info and stripping unrelated data.

Was thinking about reworking this plugin somehow. My picknmix layout is just about done with cool animations. Reworking the fadetogame plugin is next logical step. Ideas?

4
Code: [Select]
// text
local surf = fe.addSurface(flw/2, fly/2);
  surf.x = flw/2-surf.width/2;
  surf.y = fly/2-surf.height/2;
local text = surf.add_text("[Title]", 0, 0, surf.width, surf.height/10);
  text.margin = 0;

// probeText
local probeText = fe.fe.add_text("", 0, 0, flw, text.height); // Must be in layout coordinates, height within a surface might not work
  probeText.visibile = false;
  probeText.margin = 0;

// transitions
function transitions(ttype, var, ttime) {
  if (ttype == "Transition.ToNewList“) {
    probeText = text.msg;
    text.width = probeText.msg_width;
  }
}
fe.add_transition_callback("transitions“);

I got this to work in my picknmix layout that I will try to release today. To save explanation, or posting a full layout, I tried to create a small example of what worked. Untested. Will test another time. Very tired. Work schedule has me messed up all the time now. See video to compare platform text (fixed) and filter text (normal msg_width and no margin applied).

https://youtu.be/EgS_PmTsul8

5
Revival of an old thread to help others. I was having the same exact issue, finding a text objects length in layout coordinates. Using a transition to dynamically set something similar to text.width = text.msg_width was cutting off characters, and would get smaller and smaller with each transition until only 1 letter of the message was visible.

The following resolved the cutting down size issue, but would consistently be noticbly larger than the text width. I tried multiplying it by a factor since I was using a monospace font, but results were inconsistent.

Code: [Select]
text.len()*text.char_size.tofloat();
Then I figured it out. Results were accurate when the margin is set to zero. If you require a margin, perhaps you could set a default value of -1, store the calculated margin value in a different variable, change the margin back to 0, and then add the stored margin value twice to your message width.? Otherwise, perhaps create another text object, hide it, and find it’s margin size?

Code: [Select]
text.margin = 0;
text.width = msg_width;

Hopefully this is helpful to others struggling like I was. https://github.com/mickelson/attract/issues/180

Edit: NOPE. It still doesn’t work and I need to go to bed. It only has correct width for the start layout. Each transition after shortens it. Maybe I try the copy method I suggested another time. I need sleep.

6
Scripting / Re: aspect ratio, Q:
« on: May 12, 2019, 05:04:57 PM »


it would be great if you could elaborate on  "My helpers module has an aspect function."

i have used the module to load your theme,   but not 100% on what its doing, that AM lacks ,,because
imlost when it comes to this topic,,,   though i did look up an aspect to pixel ratio,,   that might help

in short would like to make some themes just for vertical...and want to go abought it in the best way posible...ya know

how would you go abought it,,  to still be user friendley,, cross the board?

I just re-read your original question. Kids and wife screaming, so I mis-read. I would think that your original method would work. Perhaps add
Code: [Select]
fe.layout.preserve_aspect_ratio=true;?

My suggestion I recommended was because I mis-read and thought you wanted to utilize multiple aspect ratios. My helpers module, I wrote the following method that pertains to this scenario. Of course, you could do the math yourself, but thats why I wrote a function. I use it so my themes look fine in native aspect and can force a 4x3 window, as well as certain design elements maintaining a certain aspect ratio.

Code: [Select]
// Match Aspect Ratio
matchAspect(aw, ah, dimension, param, obj=null)

7
Themes / Re: [WIP] BIONIC theme - a new approach to vertical theme
« on: May 12, 2019, 04:45:41 PM »
question #1:
Do you think it should be more elements?
No.
question #2:
Is the 4:3 aspect only ok? I have a feeling that if people are using dedicated vertical screen - it's 4:3 only.
If the design utilizes raster images and thus not easy to make fluid, force an aspect and let other aspects have jail-bars.

I love the design, but would love to see what it looks like without the control panel image and the overall skew. It looks like a better non-branded version of pandora box. 8)

8
Scripting / Re: Running AM directly on DVD drive?
« on: May 12, 2019, 04:34:07 PM »
hi, i am brazilian, so sorry may poor english! and o need help with one question.Is possible running Attract Mode directly on DVD drive or Pen-Drive ?
How insert command lines to recognize the files of the emulators and yours respsctives settings? ::)

Binary storage on write only media, I would assume you *might* have to pass a CLI param for the config folder location.

Code: [Select]
attract --config /my/config/location

9
Scripting / Re: aspect ratio, Q:
« on: May 12, 2019, 04:29:03 PM »
My method: use native window size and resize a surface that contains all child objects. My helpers module has an aspect function.

11
@rand0m I resolved the issue by adding a transition. Here’s my full example. I will modify source and make a pull request. It works with or without trigger = Transition.EndNavigation.

Code: [Select]
// ---------- Logo

class PreserveLogo extends PreserveArt {
function _set(idx, val) {
if (idx == "index_offset") art.index_offset = val;
else if (idx == "filter_offset") art.filter_offset = val;
else if (idx == "file_name") art.file_name = val;
else if (idx == "trigger") art.trigger = val;
else surface[idx] = val;
}

function onTransition(ttype, var, ttime) {
if (ttype == Transition.StartLayout || ttype == Transition.FromOldSelection || ttype == Transition.ToNewList || ttype == Transition.EndNavigation) request_size = true;
}
}

local logo = PreserveLogo("wheel", config.logo.x, config.logo.y, config.logo.width, config.logo.height, container);
logo.trigger = Transition.EndNavigation;
logo.set_fit_or_fill("fit");
logo.set_anchor(::Anchor.Bottom);

Edit: Here’s the pull request - https://github.com/mickelson/attract/pull/567

12
@rand0m Thank you.
Code: [Select]
obj.art.trigger = Transition.EndNavigation; yields the same results. I extended the class to test. It creates weird effect where the logo is stretched across the parent object (surface?) for a second, and then aspect retained and anchored. Hmm...

13
Themes / Re: Port Animatic theme to AM
« on: May 07, 2019, 01:22:05 PM »
Those are just hyperspin movies of their themes and hyperspin wheel art. We have two modules for the wheel action. I think we even have native hyperspin support? Havent checked it out. Not really into the look. Take a look.

14
Changing subimg_y has no effect on positioning of the image. Any insight?

Code: [Select]
local logo = container.add_artwork("wheel", -1, -1, 1, 1);
setProps(logo, config.logo, true);

fe.add_transition_callback("logo_transition");
  function logo_transition(ttype, var, ttime) {
if ((ttype == Transition.FromOldSelection) || (ttype == Transition.ToNewList)) {
printL("Logo - file name: " + logo.file_name + " height: " + logo.height + " texture height: " + logo.texture_height + " subimg height: " + logo.subimg_height + " subimg y: " + logo.subimg_y);
}
return false;
}

15
Layouts.md#ImageNotes

Code: [Select]
local logo = container.add_artwork("wheel", -1, -1, 1, 1);
setProps(logo, config.logo, true);

fe.add_transition_callback("logo_transition");
  function logo_transition( ttype, var, ttime ) {
      if ((ttype == Transition.FromOldSelection) || (ttype == Transition.ToNewList)) {
printL("Logo - file name: " + logo.file_name + " height: " + logo.height + " texture height: " + logo.texture_height + " subimg height: " + logo.subimg_height);
      }
      return false;
   }

Code: [Select]
Logo - file name: /Applications/mame0200b_macOS/wheels/88games.png height: 288 texture height: 118 subimg height: 118
Logo - file name: /Applications/mame0200b_macOS/wheels/88games.png height: 288 texture height: 118 subimg height: 118
Logo - file name: /Applications/mame0200b_macOS/wheels/gtmr.png height: 288 texture height: 175 subimg height: 175
Logo - file name: /Applications/mame0200b_macOS/wheels/1942.png height: 288 texture height: 134 subimg height: 134
Logo - file name: /Applications/mame0200b_macOS/wheels/1943u.png height: 288 texture height: 175 subimg height: 175
Logo - file name: /Applications/mame0200b_macOS/wheels/1942.png height: 288 texture height: 134 subimg height: 134
Logo - file name: /Applications/mame0200b_macOS/wheels/gtmr.png height: 288 texture height: 175 subimg height: 175

Still not exactly sure what the difference between texture and subimg is, but I can accomplish dynamically changing size/positioning based on these results. Hmm...

Pages: [1] 2 3 ... 60