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

Pages: 1 ... 3 4 [5]
64
General / A nice arcade font for layouts...
« on: August 20, 2014, 05:50:43 PM »
I found this font very appealing for layouts, so, I am sharing it. 

65
Scripting / Listbox Question about sel background
« on: August 17, 2014, 08:43:10 AM »
Is there a way to make the listbox selection background transparent without setting listbox = visible ? Here is why, I would like to use a mask like in trimm for the selection of text. It gives you a nice effect when using a snap background instead of a solid color. Thanks...

66
Scripting / Hyperspin theme layout script
« on: July 03, 2014, 10:08:24 AM »
So, here is a layout based on hyperspin mame theme. This is about all I could do with my basic understanding of transitions and indexing. The offsets could use a little tweaking and the wheel will only scroll so fast until Andrew does his thing.  If anyone can think of ways to improve on this then please help with any suggestions you might have. Here is the script and artwork. Thanks...
//
// Attract-Mode Front-End - "mediaV" sample layout
//
fe.layout.width=1024;
fe.layout.height=768;
fe.layout.font="coolvetica";
fe.add_image( "bg.png", 0, 0, 1024, 768 );
fe.add_artwork( "video.png", -360, 100, 1400, 600 );

// fill an entire surface with our snap at a resolution of 480x360
local surface = fe.add_surface( 480, 360 );
local snap = surface.add_artwork( "snap", 0, 0, 480, 360 );
snap.preserve_aspect_ratio = false;
//local screen = fe.add_image( "frame.png", 50, 150, 495, 395 );

surface.set_pos( 80, 210, 540, 380 );
//surface.pinch_y = -40;

// now create a reflection of the surface
//
//local reflect = fe.add_clone( surface );
//reflect.subimg_y = reflect.texture_height;
//reflect.subimg_height = -reflect.texture_height;
//reflect.set_rgb( 20, 20, 20 );

// position the reflection
//
//reflect.set_pos( 250, 430, 475, 90 );
//reflect.skew_y = 440;
//reflect.skew_x = 0;
//reflect.pinch_y = 10;
class UserConfig {
   </ label="Orbit Artwork", help="The artwork to spin into orbit", options="marquee,flyer,wheel" />
   orbit_art="marquee";

   </ label="Bloom Effect", help="Enable Bloom Effect (requires shader support)", options="Yes,No" />
   enable_bloom="Yes";

}
local my_config = fe.get_config();
local no_shader = fe.add_shader( Shader.Empty );
local yes_shader;
if ( my_config["enable_bloom"] == "Yes" )
{
   yes_shader = fe.add_shader( Shader.Fragment, "bloom_shader.frag" );
   yes_shader.set_texture_param("bgl_RenderedTexture");
}
else
{
   yes_shader = no_shader;
}

fe.add_artwork( "pointer.png", 950, 370, 80, 120 );

local title = fe.add_text( "[Title]", 10, 660, 320, 20 );
title.set_rgb( 255, 255, 255 );
title.align = Align.Left;

local man = fe.add_text( " ([Category]) [Manufacturer] [Year] ", 10, 690, 320, 20 );
man.set_rgb( 255, 255, 255 );
man.align = Align.Left;

local name = fe.add_text( " [ListTitle] ", 02, 02, 320, 20 );
name.set_rgb( 255, 255, 255 );
name.align = Align.Left;

local entry = fe.add_text( "[ListEntry]/[ListSize]", 350, 610, 320, 18 );
entry.set_rgb( 255, 255, 255 );
entry.align = Align.Right;

local filter = fe.add_text( "[ListFilterName]", 10, 720, 290, 18 );
filter.set_rgb( 255, 255, 255 );
filter.align = Align.Left;

// Create 13 artworks. (even though only 10 artworks will appear on screen)
local title_p2 = fe.add_artwork( "wheel", 780, -80, 190, 75 );
local title_p1 = fe.add_artwork( "wheel", 780, 0, 190, 75 );
local title_p3 = fe.add_artwork( "wheel", 780, 80, 190, 75 );
local title_n1 = fe.add_artwork( "wheel", 780, 160, 190, 75 );
local title_n2 = fe.add_artwork( "wheel", 780, 240, 190, 75 );
local title_n3 = fe.add_artwork( "wheel", 780, 320, 190, 75 );
local title_n0 = fe.add_artwork( "wheel", 740, 400, 190, 75 );
local title_n5 = fe.add_artwork( "wheel", 780, 480, 190, 75 );
local title_n6 = fe.add_artwork( "wheel", 780, 560, 190, 75 );
local title_n7 = fe.add_artwork( "wheel", 780, 640, 190, 75 );
local title_n8 = fe.add_artwork( "wheel", 780, 720, 190, 75 );
local title_n9 = fe.add_artwork( "wheel", 780, 800, 190, 75 );
local title_n10 = fe.add_artwork( "wheel", 780, 880, 190, 75 );

//note title_p2, title_n10 will not be shown on screen, they are for transitional effects...
// Set index_offset for these 5 artworks.
title_p2.index_offset = -2;
title_p1.index_offset = -1;
title_p3.index_offset = 1;
title_n1.index_offset = 2;
title_n2.index_offset = 3;
title_n3.index_offset = 4;
title_n0.index_offset = 0;
title_n5.index_offset = 1;
title_n6.index_offset = 2;
title_n7.index_offset = 3;
title_n8.index_offset = 4;
title_n9.index_offset = 5;
title_n10.index_offset = 6;
// Add transition callback function.
fe.add_transition_callback( "orbit_transition" );
// Fill in orbit_transition function, as below:
local SPIN_MS=160; // Duration of transition effect (in msec)
function orbit_transition( ttype, var, ttime ) {
switch ( ttype )
{
case Transition.ToNewSelection:
if ( ttime < SPIN_MS ) {
local direction = -1;
if (var < 0) direction = 1;
local increment = (ttime * direction * 80) / SPIN_MS;
title_p2.y = -80 + increment;
title_p1.y = 0 + increment;
title_p3.y = 80 + increment;
title_n1.y = 160 + increment;
title_n2.y = 240 + increment;
title_n3.y = 320 + increment;
title_n0.y = 400 + increment;
title_n5.y = 480 + increment;
title_n6.y = 560 + increment;
title_n7.y = 640 + increment;
title_n8.y = 720 + increment;
title_n9.y = 800 + increment;
title_n10.y = 880 + increment;

return true;
}

else {
title_p2.y = -80;
title_p1.y = 0;
title_p3.y = 80;
title_n1.y = 160;
title_n2.y = 240;
title_n3.y = 320;
title_n0.y = 400;
title_n5.y = 480;
title_n6.y = 560;
title_n7.y = 640;
title_n8.y = 720;
title_n9.y = 800;
title_n10.y = 880;
return false;
}
}
return false;
}

// Gives us a nice high random number for the RGB levels
function brightrand() {
 return 255-(rand()/255);
}

local red = brightrand();
local green = brightrand();
local blue = brightrand();

// Transitions
fe.add_transition_callback( "fancy_transitions" );

function fancy_transitions( ttype, var, ttime ) {
 switch ( ttype )
 {
 case Transition.StartLayout:
 case Transition.ToNewList:
 case Transition.ToNewSelection:
 case Transition.EndLayout:
  //gametitleshadow.msg = trimmed_title( var );
  //gametitle.msg = trimmed_title( var );
  //man.msg = trimmed_man ( var );
  red = brightrand();
  green = brightrand();
  blue = brightrand();
  //year.set_rgb (red,green,blue);
  //copy.set_rgb (red,green,blue);
  //man.set_rgb (red,green,blue);
  //romlist.set_rgb (red,green,blue);
  //screen.set_rgb (red,green,blue);
  //frame3.set_rgb (red,green,blue);
  //cat.set_rgb (red,green,blue);
  //title.set_rgb (red,green,blue);
  break;

 case Transition.FromGame:
  if ( ttime < 255 )
  {
   foreach (o in fe.obj)
    o.alpha = ttime;
   //message.alpha = 0;     
   return true;
  }
  else
  {
   foreach (o in fe.obj)
    o.alpha = 255;
   //message.alpha = 0;
  }
  break;
   
 case Transition.EndLayout:
  if ( ttime < 255 )
  {
   foreach (o in fe.obj)
    o.alpha = 255 - ttime;
   //message.alpha = 0;
   return true;
  }
  else
  {
   foreach (o in fe.obj)
    o.alpha = 255;
   //message.alpha = 0;
  }
  break;
     
 case Transition.ToGame:
  if ( ttime < 255 )
  {
   foreach (o in fe.obj)
    o.alpha = 255 - ttime;
   message.alpha = ttime;
   return true;
  }   
  break;
 }
 return false;
}

67
I think attract-mode is the best front-end out right now. But, I think a few more great layouts need to be created to generate more interest. Most of us here have our own custom layouts but I think for the general public creating layouts would be a difficult task without an editor. So, lets have a contest and let Raygun decide.  What do you guys think?

Pages: 1 ... 3 4 [5]