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

Pages: 1 2 [3] 4 5 6
31
General / Re: Turn off font anti-aliasing?
« on: May 16, 2015, 06:21:30 AM »
Sub pixel anti aliasing is something you definitely want off with an arcade CRT ;)

Planning on using bitmap fonts at their native resolution? I've never seen a vector font rendered nicely in 320x240 without using anti-aliasing.

Curious as to what your plan is.

32
General / Re: Turn off font anti-aliasing?
« on: May 10, 2015, 10:37:12 AM »
Which font? I'm happy enough with coolvetica in 640x480, prefer it antialiased to not. Thin fonts are a bit ugly

33
Themes / Re: preferred theme for mame?
« on: May 10, 2015, 06:17:07 AM »
The below is what I'm using on my horizontal cabinet. It's running 640x480, but should work in any square pixel resolution (you may need to tweak the size multipliers though).

I've not cleaned this up at all, it's a straight dump from my cab!

Code: [Select]
// Layout by cools / Arcade Otaku
// For use in a 640x240 resolution
// We use this strange resolution to enhance the front rendering quality in 15KHz
//
// Layout User Options
class UserConfig {
 </label="Background Image",help="Choose snap/video snap, title, flyer, user image (bg.jpg in layout folder) or no background",options="video,snap,title,flyer,user,none"/>bg_image="video";
 </label="Show Wheel Logo?",help="Enable the wheel logo?",options="Yes,No"/>wheel_logo="Yes";
 </label="Show Category?",help="Enable the category text?",options="Yes,No"/>category_text="Yes";
}
local my_config=fe.get_config();

// Colour cycle code from LukeNukem
cycleVTable <-{
 "cnListHeight":0,"swListHeight":0,"wkListHeight":0,
 "cnListRed":0,"swListRed":0,"wkListRed":0,
 "cnListGreen":0,"swListGreen":0,"wkListGreen":0,
 "cnListBlue":0,"swListBlue":0,"wkListBlue":0,
}
function cycleValue(ttime,counter,switcher,workValue,minV,maxV,BY,speed){
 if (cycleVTable[counter] == 0)
  cycleVTable[counter]=ttime;
////////////// 1000=1 second //////////////
 if (ttime-cycleVTable[counter]>speed){
  if (cycleVTable[switcher]==0){
   cycleVTable[workValue]+=BY;
   if (cycleVTable[workValue]>=maxV)
    cycleVTable[switcher]=1;
  }
  else if (cycleVTable[switcher]==1){
   cycleVTable[workValue]-=BY;
   if (cycleVTable[workValue]<=minV)
    cycleVTable[switcher]=0;
  }   
 cycleVTable[counter]=0;
 }
 return cycleVTable[workValue];
}

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

// Layout Constants
//fe.layout.orient=RotateScreen.Right;
//fe.layout.width=fe.layout.width/2;
local flw=fe.layout.width;
local flh=fe.layout.height;
local rot=(fe.layout.base_rotation+fe.layout.toggle_rotation)%4;
switch (rot) {
 case RotateScreen.Right:
 case RotateScreen.Left:
  fe.layout.width=flh;
  fe.layout.height=flw;
  flw=fe.layout.width;
  flh=fe.layout.height;
  break;
}

// Background
if (my_config["bg_image"]=="video") {
 local bg=fe.add_artwork("snap",0-(flw*0.1),0-(flh*0.1),flw*1.2,flh*1.2);
 bg.preserve_aspect_ratio=false;
 bg.set_rgb(128,128,128);
}
else if (my_config["bg_image"]=="snap") {
 local bg=fe.add_artwork("snap",0-(flw*0.1),0-(flh*0.1),flw*1.2,flh*1.2);
 bg.video_flags=Vid.ImagesOnly;
 bg.preserve_aspect_ratio=false;
 bg.set_rgb(128,128,128);
}
else if (my_config["bg_image"]=="title") {
 local bg=fe.add_artwork("title",0-(flw*0.1),0-(flh*0.1),flw*1.2,flh*1.2);
 bg.preserve_aspect_ratio=false;
 bg.set_rgb(128,128,128);
}
else if (my_config["bg_image"]=="flyer") {
 local bg=fe.add_artwork("flyer", 0, 0, flw, flh);
 bg.preserve_aspect_ratio=false;
 bg.set_rgb(128,128,128);
}
else if (my_config["bg_image"]=="user") {
 local bg=fe.add_image("bg.jpg",0,0,flw,flh);
 bg.preserve_aspect_ratio=false;
 bg.set_rgb(128,128,128);
}

// List
local lbx=0;                    // Listbox X position
local lby=flh*0.4;              // Listbox Y position
local itn=9;                    // Listbox entries
if (my_config["wheel_logo"]=="No"){
 lby=flh*0.17;                  // Listbox Y position without logo
 itn=13;                        // Listbox entries without logo
}
local lbw=flw;                  // Listbox width
local lbh=(flh-lby-(flh*0.08)); // Listbox height
local ith=lbh/itn;              // Listbox entry height
lby+=(ith*(itn/2));             // Listbox draw point - do not change
local lbr=255;                  // Listbox red
local lbg=255;                  // Listbox green
local lbb=128;                  // Listbox blue
local lbf=0.75;                 // Listbox colour fade. Lower values=less fade.

for (local i=(itn/2)*-1;i<=(itn/2);i+=1){
 if (i==0){
 }
 else {
  local unselgame=fe.add_text("[Title]",lbx,lby+(ith*i),lbw,ith);
  unselgame.index_offset=i;
  if (i<0) {unselgame.alpha=255-((i*(255/(itn/2))*-1)*lbf);}
  else {unselgame.alpha=255-(i*(255/(itn/2))*lbf);}
 }
}

// Texts
local fltsh=fe.add_text("<  [FilterName]  >",1,(flh*0.06)+1,flw,flh*0.05);
fltsh.set_rgb(0,0,0);
local filtername=fe.add_text(fltsh.msg,fltsh.x-1,fltsh.y-1,fltsh.width,fltsh.height);
local listtitle=fe.add_text("[ListSize] [DisplayName]",0,flh*0.11,flw,flh*0.05);
local slgsh=fe.add_text("[Title]",lbx+1,lby+1,lbw,ith);
slgsh.set_rgb(0,0,0);
local selgame=fe.add_text(slgsh.msg,slgsh.x-1,slgsh.y-1,slgsh.width,slgsh.height);
local freeplayleft=fe.add_text("Free Play",0,0,flw,flh*0.05);
freeplayleft.align=Align.Left;
local freeplayright=fe.add_text("Free Play",0,0,flw,flh*0.05);
freeplayright.align=Align.Right;
local inssh=fe.add_text("Instructions",1,(flh*0.92)+1,flw,flh*0.04);
inssh.set_rgb(0,0,0);
local instructions=fe.add_text(inssh.msg,inssh.x-1,inssh.y-1,inssh.width,inssh.height);
local help_text=fe.add_text("Play Game [BUTTON1]  -  Random [START]  -  Quit Game [Hold START (3s)]",0,flh*0.95,flw,flh*0.04);
if (my_config["category_text"]=="Yes"){
 local category=fe.add_text("[Category]",0-(flw*0.01),flh*0.95,flh*0.85,flh*0.05);
 category.rotation=-90;
 category.align=Align.Left;
 category.alpha=64;
}
local copyright=fe.add_text("©[Year] [Manufacturer]",flw-(flh*0.06),flh*0.95,flh*0.85,flh*0.05);
copyright.rotation=-90;
copyright.align=Align.Left;
copyright.alpha=64;

// Preview image
if (my_config["wheel_logo"]=="Yes"){
 local wheelshadow=fe.add_artwork("wheel",(flw*0.1)+2,(flh*0.18)+2,flw*0.80,flh*0.22);
 wheelshadow.preserve_aspect_ratio=true;
 wheelshadow.set_rgb(0,0,0);
 wheelshadow.alpha=192;
 local wheel=fe.add_clone(wheelshadow);
 wheel.set_rgb(255,255,255);
 wheel.x-=2;
 wheel.y-=2;
 wheel.alpha=255;
}

function textTickles(ttime){
 local RED=cycleValue(ttime,"cnListRed","swListRed","wkListRed",100,254,1,1);
 local GREEN=cycleValue(ttime,"cnListGreen","swListGreen","wkListGreen",100,254,1.5,1);
 local BLUE=cycleValue(ttime,"cnListBlue","swListBlue","wkListBlue",100,254,2,1);
 local grey=brightrand();
 selgame.set_rgb(RED,GREEN,BLUE);
 filtername.set_rgb(RED,GREEN,BLUE);
 instructions.set_rgb(RED,GREEN,BLUE);
 freeplayleft.set_rgb(grey,grey,grey);
 freeplayright.set_rgb(grey,grey,grey);
}

function fades(ttype,var,ttime){
 switch (ttype){
  case Transition.FromGame:
   fltsh.msg="<  [FilterName]  >";
   filtername.msg="<  [FilterName]  >";
   return false;
   break;
case Transition.ToGame:
   if (ttime<10){
    fltsh.msg="LOADING...";
    filtername.msg="LOADING...";
    return true;
   }
   break;
  case Transition.EndLayout:
   if (ttime<10){
    filtername.msg="EXITING";
    return true;
   }
   return false;
 }
}

fe.add_ticks_callback( "textTickles" );
fe.add_transition_callback( "fades" );

34
General / Re: Turn off font anti-aliasing?
« on: May 10, 2015, 06:12:03 AM »
Suggestion, don't run 320x240. Run attract mode in 640x240.

The font rendering doesn't work well at really low resolutions, doubling it on the horizontal cleans it up really nicely.

35
General / Re: Using Attract Mode without romlists?
« on: April 22, 2015, 10:39:33 AM »
The favourites list is just a text file called "mame.tag" in the romlists folder. It's a list of the setnames, and doesn't get affected by regenerating the romlists.

You can have multiple tag files too. I have one for "Classic" games that I don't necessarily want in my favourites list.

Mess around with tagging, it's an extremely powerful feature

36
General / Re: 1920x1080 Basic Layout help
« on: April 22, 2015, 10:34:15 AM »
Attract Mode is resolution independent - just because you tell it to use 640 x 480 for the layout it doesn't care, it will draw it on 1920x1080. The front end is a set of co-ordinates. If you want pixel perfect then of course using 1920x1080 in the layout is required, but you could easily just do 192x108 and have it draw it larger.

Positioning and sizes in my layouts are all done mathematically - I first set a pair of (short named) variables to the values of fe.layout.height and fe.layout.width, then I use simple maths on these variables to establish positions.

So:

flh = fe.layout.height;
flw = fe.layout.width;
fe.add_image ("snap", flw*0.1, flh*0.1, flw*0.3, flh*0.3);

Will put a snap on the top left of the screen.

I do this to deliberately make my layouts adjustable to different resolutions - if fe.layout.height/width change then everything is still drawn in the same place on screen. Using absolute co-ordinates when you're drawing stops this from happening.

37
Scripting / Re: Clear list box (alpha)
« on: April 01, 2015, 04:13:35 AM »
Listbox has alpha, bg_alpha, sel_alpha and selbg_alpha available.

38
Scripting / Re: Clear list box (alpha)
« on: March 31, 2015, 12:10:10 AM »
You're corecr, z-order is done by position in the .nut file

39
Scripting / Re: ListBox scrolls game names when not needed
« on: March 30, 2015, 02:02:24 AM »
You won't be able to use a listbox for this.

40
General / Re: Filtering out most -- but not all -- clones?
« on: March 28, 2015, 01:18:29 PM »
I just bung all clones I want to play into my favourites list. The "mame.tag" file.

41
General / Re: Using AttractMode as a Windows shell replacement
« on: March 27, 2015, 04:32:16 AM »
That'll be because it requires the -c parameter. Try the command I gave earlier in the thread in Instant Sheller

42
General / Re: 2 instances of MAME?
« on: March 26, 2015, 05:42:48 AM »
He means that cocktail specific games have a doubled display (the same image side by side, with each flipped vertically from the other). It's just how MAMEs "cocktail" mode works.

Your explanation for different cfgs and ini files will help him solve this :)

43
General / Re: 2 instances of MAME?
« on: March 24, 2015, 02:14:32 AM »
Why are all your slashes the wrong way? :)

Putting all the ROMs in C:\MAME\ROMS would be fine.


44
General / Re: layout questions/requests
« on: March 16, 2015, 01:55:35 AM »
1) Yes, take a look at the grid and filter-grid layouts.
2) Yes. Take a look at the history plugin for an example.
3) Yes. Assign keys to next/previous filter/display functions.

45
Themes / Re: Tate [vertical]
« on: March 13, 2015, 04:41:30 AM »

Pages: 1 2 [3] 4 5 6