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 ... 72 73 [74] 75 76 ... 78
1096
Scripting / Re: Joystick 4-8 way switcher.
« on: July 10, 2016, 03:05:57 AM »
Hi all.

Just wondering if a plugin exists like the Joychoose for Mala?

http://forum.arcadecontrols.com/index.php?topic=113162.0

I don't think so. But it is achievable to make a plugin to do this.

1097
Scripting / Re: video not visible after from game transition
« on: July 06, 2016, 08:28:12 PM »
I never figured out the issue with the boot video not visible after coming from a game. However, I figured out that I can send a reload signal and all is well with the cosmos. I cleaned up the code so the class itself can add ticks and callbacks that point to itself. The secret was using „this“ as an environment object.

Here’s the revised code if anyone wants to take a peak. Should make it’s way into mvscomplete layout soon. I must say, I am not the best designer - nor coder, but this is coming along to be a really cool project. Loving attract mode. Can’t wait to get it up on the crt.

Code: [Select]
// Attract-Mode front end
// mvscomplete layout by keilmillerjr
// http://keilmiller.com

fe.load_module( "fade" );
fe.load_module( "conveyor" );

//
// Screen
//

fe.layout.width = 640;
fe.layout.height = 480;
fe.layout.preserve_aspect_ratio = true;
local screen = fe.add_surface( 640, 480 );

//
// Background
//

local bgx = (640/8)*-1;
local bgy = (480/8)*-1
local bgw = (640/4)*5;
local bgh = (480/4)*5;
local background = FadeArt( "snap", bgx, bgy, bgw, bgh, screen );

//
// Boot
//

class Boot {
  video = null;
 
  constructor( path ) {
    video = screen.add_image( path, 0, 0, 640, 480 );
    video.visible = false;
    video.video_playing = false;
    video.video_flags = Vid.NoLoop;
   
    fe.add_ticks_callback( this, "End" );
    fe.add_signal_handler( this, "Block" );
    fe.add_transition_callback( this, "Reload" );
  }
 
  // public functions

  function Play() {
    video.visible = true;
    video.video_playing = true;
    Mute();
  }
 
  // private functions
 
  function Mute() {
    if ( video.video_playing == true ) {
      if ( background != null ) background.video_flags = Vid.NoAudio;
    }
    else {
      if ( background != null ) background.video_flags = Vid.Default;
    }
  }
 
  function End( ttime ) {
    if ( video.video_playing == false ) {
      video.visible = false;
      Mute();
    }
    return false;
  }
 
  function Block( signal ) {
    if (( video.video_playing == true ) && ( signal != null )) return true;
    return false;
  }
 
  function Reload( ttype, var, ttime ) {
    switch ( ttype ) {
      case Transition.FromGame:
        fe.signal( "reload" );
        break;
    }
    return false;
  }
}

local boot = Boot("intro/boot.mp4");
boot.Play();


1098
Scripting / video not visible after from game transition
« on: July 06, 2016, 03:38:16 PM »
Layout will be contained to 4:3 format. Using a surface because the fe object allows child objects to be shown outside of itself. Boot video (a recording of the neo geo boot screen) is intended to be played when the layout starts and coming from a game.

I created a boot class, with a constructor, play and stop methods. The object could potentially call its own stop method, but I can not find a way for squirrel to sleep/wait/timer. So, I am using the fe.add_ticks_callback to see if the video is not playing and call the stop method on the boot class. It probably waste cpu resources, but it’s the only way I could think of how to do it. Is there a better way?

I am using fe.add_transition_callback method to call the start method on the boot class when ttype is Transition.StartLayout or Transition.FromGame. Currently, It works when the layout is first started. After exiting a game, background is frozen and muted, and audio from boot video can be heard, but it is not visible. The same result occurs in mac 10.11 and windows 7 running attract 2.1. Any ideas of why it is not visible? zorder has no effect. I don’t even think zorder works because I can give the video a zorder of 1000 and it is not visible at any time unless its drawn after the background.

Code: [Select]
// Attract-Mode front end
// mvscomplete layout by keilmillerjr
// http://keilmiller.com

fe.load_module( "fade" );
fe.load_module( "conveyor" );

//
// Screen
//

fe.layout.width = 640;
fe.layout.height = 480;
fe.layout.preserve_aspect_ratio = true;
local screen = fe.add_surface( 640, 480 );

//
// Background
//

local bgx = (640/8)*-1;
local bgy = (480/8)*-1
local bgw = (640/4)*5;
local bgh = (480/4)*5;
local background = FadeArt( "snap", bgx, bgy, bgw, bgh, screen );

//
// Boot
//

class Boot {
  video = null;
 
  constructor( path ) {
    video = screen.add_image( path, 0, 0, 640, 480 );
    video.visible = false;
    video.video_playing = false;
    video.video_flags = Vid.NoLoop;
  }
 
  function Play() {
    if ( background != null ) background.video_flags = Vid.NoAudio;
    video.visible = true;
    video.video_playing = true;
  }
 
  function Stop() {
    video.visible = false;
    if ( background != null ) background.video_flags = Vid.Default;
  }
}

local boot = Boot("intro/boot.mp4");

fe.add_ticks_callback( "boot_tick" );

function boot_tick( ttime ) {
  if ( boot.video.video_playing == false ) {
    boot.Stop();
  }
  return false;
}

fe.add_transition_callback( "transitions" );
function transitions( ttype, var, ttime ) {
  switch ( ttype ) {
    case Transition.StartLayout:
    case Transition.FromGame:
      boot.Play();
      break;
  }
  return false;
}

1099
General / Re: Attract-Mode system requirements?
« on: July 03, 2016, 07:27:08 PM »
Unfortunately yes :(
all fully operational.
what is your systems specs and the specs of any windows based pc you have seen AM running on?
cheers

Mac 10.11 Imac mid 2011 i3 2.7ghz 12gb ram integrated hd2000 graphics

Windows 7 64-bit i3 3.1ghz 4gb ram external hd4350 graphics

Using mac as my dev for attract mode layouts is getting annoying. Window resizing is all fucked up. Need that bug fixed.

1100
General / Re: Attract-Mode system requirements?
« on: July 03, 2016, 11:53:13 AM »
Anyone else care to share their personal setup/specs and performance?

Tried Attract Mode on 3 machines now:
Core2Duo Lenovo t8100 2.10GHz laptop 3GB Ram
Dual core 2.5GHz E5200 2GB Ram
Dell Core2Duo 2.9GHz 4GB Ram
all 32Bit Windows 7

All run terribly,
all the classic and console games up to PSX work fine on each system but the FE is slow as hell even with basic displays.

I switched to see NEVATO theme and it went from bad to not usable :(
What gives?

Have you tried updating your video drivers? Doing so resolved an issue with my windows pc and attractmode being unusable slow.

1101
Themes / Re: [download] NEVATO theme
« on: June 24, 2016, 02:57:26 AM »
Where does it actually get the missing wheel-art from? The only place I know that you can easily pull it from is TheGamesDB.

It just prints a list of missing files not matching your xml file. It doesn't retrieve anything.

1102
General / Re: Video when Game Launch?
« on: June 23, 2016, 08:21:15 PM »
I think these are the tid bits you need to look at to get you started. You can add the transition to a layout, but it might make a nice plugin like you mentioned. I could make this rather easily if it works how I believe it should, but am currently 1000 miles from my computer. Take a look at the intro plugin as well.

https://github.com/mickelson/attract/blob/master/Layouts.md#feadd_transition_callback

Code: [Select]
fe.add_transition_callback( function_name )

function transition( ttype, var, transition_time )
{
   local redraw_needed = false;

   // do stuff...

   if ( redraw_needed )
      return true;

   return false;
}

Transition.ToGame

1103
Themes / Re: [download] NEVATO theme
« on: June 23, 2016, 07:45:21 PM »
In regards to missing wheel art:

I created a script called mamesoftwareparser that can parse a mame software list and find missing artwork. It could probably be adapted to use an attractmode list and possibly execute a photoshop action to create a generic wheel art. It would be better than a question mark.

1104
General / Re: How to turn off random image selection?
« on: June 17, 2016, 05:15:40 AM »
This is the github issue with a commit that likely messed things up.

https://github.com/mickelson/attract/issues/227

1105
Themes / Re: Pandoras Box Theme
« on: June 16, 2016, 11:25:18 AM »
Thank you for keilmillerjr hints. I have updated the theme. You may download it from post #1  :)

Woohoo! Did passing the index_offset to the magic token work? I haven't tried it yet and I am curious.

1106
Themes / Re: Pandoras Box Theme
« on: June 16, 2016, 07:35:37 AM »
Working on a pos Android phone, so I will edit as I go as to not loose what I type.

Code: [Select]
function Title(index_offset) {

}

local listbox = fe.add_listbox( x, y, w, H );
listbox.format_string = "[!Title(index_offset)]";

1107
Themes / Re: Pandoras Box Theme
« on: June 16, 2016, 03:55:39 AM »
Hello keilmillerjr

Find how to chop game name as below code. I will try it on tonight.

But I still not know how to use "magic token" for adding index number of games. Could you help me to complete the script?. Many Thanks.

Quote
listbox.format_string = "[SortValue]";

I'll try to get it started if I have a slow part of my work day. Down here in florida working 14 hour days for two weeks.

1108
Themes / Re: Pandoras Box Theme
« on: June 15, 2016, 08:56:30 PM »
Good work Kent...


I would like to change listbox game's name format  to index number of games & chop game name. Do you know a code make for ? Thanks.  :)



fe.Listbox
  • format_string - Get/set the format for the text to display in each list entry. Magic tokens can be used here, see Magic Tokens for more information. If empty, game titles will be displayed (i.e. the same behaviour as if set to "[Title]"). Default is an empty value.

Can use a function for a magic token. Create your function to return your proper string. Typing on a phone while away from home. Hopefully you have enough to get started, assuming it works.

1109
General / Re: Filtering all clones but one?
« on: June 15, 2016, 07:35:40 AM »
Try negative lookahead and let me know how it works. You might have to play around with the regex a bit. I can't test as I am out of state for work.

Code: [Select]
^(?!foo).*$

1110
General / Re: can I have one marquee for all games
« on: June 12, 2016, 06:57:45 PM »
I think attract mode will default missing artwork for a rom to artwork matching the system name. I noticed that if I have a missing marquee, it will show neogeo.png in my marquee path. My setup is neo geo only, so I am not positive. Try adding png with the name of what you call your sega genesis system in the config and let us know if it works.

Pages: 1 ... 72 73 [74] 75 76 ... 78