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.


Topics - popoklo

Pages: [1]
1
OI!

Have a new problem:
Best debugger are friends using my cab.
My noob friends started a game in AM, first loading of MAME takes some time, so the focus stays some time in AM.
The noobs thought AM didnt react to start the game, so they pushed a key again. Then MAME starts and gets Focus, BUT no key / input focus!

Can someone reproduce it?
its really annyoing because without ALT-TAB MAME does not get any input-focus.

best greets!

2
Scripting / script: random_game signal skips games randomed before.
« on: November 26, 2017, 07:04:02 AM »
i made this script that the random game funtion does not show the same games which were randomed before.
In my mamelist with 2000 games there appear often the same games after random_game signal.

i tested this with 13 games in my fav_list. so please test it with 10 games or so to recreate the problem.
the problem:

sometimes the fe.signal(random_game) does not fire after a game is found. Its like the random_game signal gets lost.
the script fires the random_game signal so long till no match in the array rgames is found (that means the game was not randomed before)
Please watch the console.
press your random_game configed button as long as u can see the signal fires ("random signal is coming...and should now execute New transition:\n\n") but no new random game is selected and no transition is fired.

Code: [Select]

local rgames = [];

local mlist = fe.add_listbox(0,0,800,900);

fe.add_signal_handler( this, "on_signal" );
fe.add_transition_callback( this, "on_transition" );

function on_signal( sig )
{

switch (sig) {
    case "random_game":
    {
    print("random signal is coming...and should now execute New transition:\n\n");
    }
        return false;
}
}

function on_transition( ttype, var, ttime )
{
print("transition started...\n\n");

switch ( ttype )
{
case Transition.EndNavigation:
{
// print("EndNavigation \n");
if (rgames.len() >= fe.list.size) //clear the list if all games were randomed
{
rgames.clear();
print("cleared\n");
}

if (rgames.find(fe.list.index) == null)
{
rgames.push(fe.list.index);
print(fe.list.index + " not found...pushed\n");
} else
{
print(fe.list.index + " found...skipping------------\n");
fe.signal("random_game");
}

print("rgames size: " + rgames.len() + " / current listSize " + fe.list.size + " / current index: " + fe.list.index + "\n\n");
}        
}
}

3
Scripting / Getting first Char and ignoring "The" Titles for everyone
« on: November 26, 2017, 05:09:22 AM »
Perhaps someone is interested in getting the First Character of a Title ignoring "The":

Code: [Select]
function FirstChar()
{
local strip;

if (fe.game_info(Info.Title).slice(0,3) == "The")
{
strip = fe.game_info(Info.Title).slice(4,5);
// print("cut\n");
}
else
{
            strip = fe.game_info(Info.Title).slice(0,1);
//     print(fe.game_info(Info.Title).slice(0,3) + " nocut\n");
}
       
        return strip;
}

4
Themes / Standard Grid mod with Surface animation
« on: November 12, 2017, 04:15:53 PM »


OI!

for all who like a grid system with animation of a fe.surface.
It works fine now with big lists. my MAME games are 2350 snaps and videos.
Scrolling has good speed to go through all games.

added features:
- Grid on a surface: allows smooth animations and scrolling fast when holding button.
   also the selected game frame with video scrolls with the surface, i think this is a better feeling.
- Delayed Video Loading after 800 ms: important that added scrollanimation is not choppy during anim when videos load.

- DemoMode after Starttime = 90 sec. and looping through random games after LoopTime=30 secs. values can be changed in options.
   attention: u can start the games by hitting your select button! the DemoMode stops when you start navigating. navigation starts from the game in Demomode.
- in the left botoom corner appears the First character of the game and disappears after some time. this is good when u scroll fast and search a game.

i think a very important feature of attractmode should be the "attract mode".
here it is the DemoMode from where u can start the games directly. This is the good ol feeling from neogeo multiplay machines.

What u need:
-snaps, flyer... (changeable in options)
-videos

the visuals are inspired by switch ui design.
the design is 4:3, but u can change it in code.

overall i have big problems with the transition system.
I dont understand it, so i had to make workarounds for timing like delayed video loading.
This causes some shit. The timers will not be reset correctly. sometimes the videos are not delayed or the Demomode loops faster.

5
Scripting / class userconfig , not showing options in menu
« on: November 11, 2017, 07:03:44 AM »
OI!

Im trying to use UserConfig Class.
But in the displys Menu there are no Options. they are not shown.

class UserConfig
{
   </ label="Grid Artwork", help=" in the grid", options="snap,flyer", order=1 />
   art="snap";

   </ label="StartTime", help="t takes to start DEMOMode", order=2 />
   stime="90000";

   </ label="LoopTime", help="dom games in Demomode", order=3 />
   ltime="30000";   
}

local my_config = fe.get_config();
local STIME = my_config["stime"].tointeger();
local LTIME = my_config["ltime"].tointeger();

.....


Do i miss something?

6
Scripting / A little performance boost for those using video snaps
« on: November 06, 2017, 09:01:06 AM »
OIOIOI!

i like to share a Workaround how to Change the Video snap to normal snap.
my Problem was:
Scrolling through games causes heavy loading of Video snaps one after another, on my Retro machine Computer this was unacceptable.
So i tried to delay Video artwork. the Problem seems to be that the videoartwork property

video.video_flags = 0;
video.video_flags = Vid.ImagesOnly | Vid.NoAudio;

will only update and Show effect after transitions. i couldnt make a timer in an on_tick callback and set the new Videoflags. the effect was random.

i didnt know how to force a Transition without doing a Signal, does anybody know?.

so i made a timer in on_tick callback, waiting (800ms) to the Point the Video should load.
when the timer Ends i set a boolian and give two sgnals:

fe.signal("up"); fe.signal("down");

this fires the Transition calllback. The Transition callback then checks the boolian und sets
video.video_flags = 0;
so the Video starts loading and playing.
the up and down Thing is to stay at the current game.

the nice Thing now is: no Video will load immediatly after a new game is selected. it waits 800 MS and then loads the Video.
much better Performance when Holding a key or pushing a key fast to go through games.

this is not needed if someone can tell me how to trigger a transition without navigating signals...


Code: [Select]

local TIMEIDLE = 0;
local IDLE = 0;
local TIME = 0;

local video = gamegrid_surface.add_artwork("snap", 0, 0, 240, 220);

video.video_flags = Vid.ImagesOnly | Vid.NoAudio;


fe.add_signal_handler( "on_signal" );
function on_signal( sig )
{

if ( fe.get_input_state("down") || fe.get_input_state("up") )   //if a key is pressed (navigating to another game) reset timer
{
TIMEIDLE = TIME; IDLE = 0;
        }

switch ( sig )
{
case "up":
{
                                .... here is the code i switch my frame to another game......

return true;
}
case "down":
{
                                .... here is the code i switch my frame to another game......
return true;
}
                }
   return false;
}


fe.add_ticks_callback( this, "on_tick" );

function on_tick( ttime )
{
       TIME = ttime;        //keep track of the global time since AM runs, is used in on_signal callback
if (!IDLE && (ttime - TIMEIDLE > 800))               //check if 800ms since any key was not pressed passed, then activate via fe.signal the transitioncallback, so the video will update its state after the 800ms
{
IDLE = 1;
fe.signal( "down" );fe.signal( "up" );
        }
}


fe.add_transition_callback("artwork_transition");

function artwork_transition( ttype, var, ttime )
{
if (IDLE)  video.video_flags = 0;
        else
if (!IDLE) video.video_flags = Vid.ImagesOnly | Vid.NoAudio;


  return false;
}


7
Scripting / animation pulse not working?
« on: October 08, 2017, 07:33:09 AM »
Ahoi!
try to do a pulsating selection Frame, it only runs once:

local flicker_anim = {
   when = When.Always,
    property = "alpha", time=300,
    start = 255, end = 0,
    loop = 1, pulse = 1
}

local frame2 = gamegrid_surface.add_image("frame.selected.2.png", 0, 0, 240 220); frame.alpha = 255;

animation.add( PropertyAnimation( frame2, flicker_anim ) );

does anyone had the Problem? or knows my fault?

thx!

8
Themes / GridNew Theme update3
« on: April 26, 2017, 05:36:43 AM »


new YOUTUBE update3:

Youtube Video


You Need: snaps videos AND pics (for best take title pics)
Its made for 1080p!
On top line there are the Filters, made only for 10 max.
Finally there is a nice Animation added when you scroll up or down the games.


have fun and feedback is welcome.
i will update this theme with more things...

Update1:
- Scrollbar added
Update2:
- forgot to set screensizes -> should run on different resolutions. whoops
Update3:
- the actual game will have an Image and fade away so the video is visible afterwards. see the youtube video.

Greets!

9
hi and thx for this great Project!

i use the Signal function to check my downkey. after pressing down 4 times i want to Animation.add WITH wait function.
i don't want to usee the When Option, because i want to start the Animation only after 4 key downs.
it seems the wait=true Option sticks in a Loop wihtout using a whenoption.
when i use when= When.ToNewSelection , the wait Option works.
is there o way to make a wait Thing on my own? or how can i manipulate an existing Animation (start, stop or delete)?




local movey_cfg = {
   //when = When.ToNewSelection,
    property = "y",
    end = -y*300-100,
    time = 800, wait=1
}

fe.add_signal_handler( "on_signal" );
function on_signal( sig )
   {
      switch ( sig )   
      {
         case "down":
         {
            if (frame_y < y-1)
            {
               frame_y += 1;

            } else {
                     animation.add( PropertyAnimation( gamegrid_surface, movey_cfg ) );  <------------
                fe.list.index += x*y;
            }
            return true;
         }
...............



thx

Pages: [1]