Author Topic: Cosmo's Theme (v.1.1 uploaded!)  (Read 81954 times)

cosmo

  • Full Member
  • ***
  • Posts: 54
    • View Profile
Cosmo's Theme (v.1.1 uploaded!)
« on: April 03, 2017, 10:53:39 AM »
Cosmo's Main Menu

Well, after some time fiddling with the code and trying to optimize it, here is my main menu theme. Thanks to David Marti for the unified code.

It includes animations for the background, boxarts, cartarts, you can also mute the videos... and many more!

Preview


Video Previews:

https://www.youtube.com/watch?v=7rBgmLg09fA (v.1.1)
https://www.youtube.com/watch?v=g1rN2Suc7VY (beta version)
(the animations are faster on the raspberry pi)

Main Menu Layout:


Systems Layout:


Snes-N64 theme:


Arcade Layout:


Nintendo DS Layout:



How to install:
1. Download the .rar file below, and extract in your computer. Copy 'layouts' and 'menu-art' to:
-The folder you have installed Attract Mode (if you're using PC version)
-home/pi/.attract/    on your Raspberry Pi (use WinSCP)

2. in attract mode go to the menu/displays/ and use this layouts:
cosmo-mainmenu: to use with the displays main menu
cosmo-systems: To use with systems displays
cosmo-arcade: layout for arcade systems. Includes support for flyers and marquees.
cosmo-snes-n64: same as cosmo-systems but better support for bigger boxarts
cosmo-favorites: support for compilation displays. Info about emulator in the text box and it can show console art based on it.
cosmo-nds: support for Nintendo DS dual screen.

-If some images don't appear check that your display name in attract mode and the name of the images are the same (even capital letters on the raspberry)
-If you aren't going to use some systems you can delete their files in the menu-art folder or in "cosmo-systems" folder. Search and delete every image you aren't going to need to save some precious space. 

Systems supported:
Quote
Attract Mode Setup (for Retropie)
Ports (for Retropie)
Favorites
Kodi


Arcade:
Arcade Classics
Arcade
Atari Classics
Capcom Classics
Capcom Play System
Capcom Play System II
Capcom Play System III
Cave
Daphne
Data East Classics
Final Burn Alpha
Irem Classics
Konami Classics
MAME (Advance)
MAME (Libretro)
MAME (Mame4All)
Midway Classics
Namco Classics
Nintendo Classics
Sega Classics
SNK Neo Geo MVS
Taito Classics
Williams Classics

Computers:
Acorn BBC Micro
Amstrad CPC
Apple II
Apple Macintosh
Atari 8-bit
Atari ST
Commodore VIC-20
Commodore 64
Commodore Amiga
Fujitsu FMTowns
Microsoft MS-DOS
Microsoft MSX
Microsoft MSX2
PC Games
ScummVM
Sharp X68000
Sinclair ZX Spectrum

Consoles:
Amstrad GX4000
Atari 2600
Atari 5200
Atari 7800
Atari Lynx
Atari Jaguar
Atari Jaguar-CD
Bally Astrocade
Bandai Wonderswan
Bandai Wonderswan Color
ColecoVision
Commodore Amiga CD32
Commodore CDTV (thanks to BadFurDay)
Emerson Arcadia 2001
Fairchild Channel F
GCE Vectrex
Game & Watch
Magnavox Odyssey 2
Mattel Intellivision
Microsoft Xbox
NEC PC Engine
NEC PC Engine-CD
NEC Turbografx-16
NEC Turbografx-CD
NEC SuperGrafx
NEC PC-FX
Nintendo Famicom
Nintendo Famicom Disk System
Nintendo Entertainment System
Nintendo Game Boy
Nintendo Super Famicom
Super Nintendo Entertainment System
Nintendo Virtual Boy
Nintendo 64
Nintendo Game Boy Color
Nintendo Game Boy Advance
Nintendo Gamecube
Nintendo DS
Nintendo Wii
Nintendo WiiU
Panasonic 3DO
Philips CD-I
RCA Studio II
Sega SG-1000
Sega Master System
Sega Mega Drive Japan
Sega Genesis
Sega Mega Drive
Sega Game Gear
Sega CD
Sega Mega-CD
Sega 32X
Sega Saturn
Sega Dreamcast
SNK Neo Geo AES
SNK Neo Geo CD
SNK Neo Geo Pocket
SNK Neo Geo Pocket Color
Sony Playstation
Sony PlayStation 2
Sony PlayStation 3
Sony PSP
Sony PSP Minis
Console Classics

Downloads

Cosmo's Theme v.1.1: https://mega.nz/#!c95zSDiC!LsXoPnMCwA9XMMO5jJ2aj7R1nFfnNuZQRXR0bRHXxuk (includes the layouts + .psd templates to do the backgrounds and pointers)
Snap videos: https://mega.nz/#!x9AQ2KaT!NmNzWGnKTAO4p1UHMnbnS0PTs20k124-oLcHp44N4kc

FAQ:

Are you going to support more systems?
Probably a few more supported by retropie as:
-Dragon 32/64
-Oric
-Sam Coupe
-TI-99
-TRS-80
-Z-Machine (Infocom games)


No collections are supported? Why?
Collections are a bit personal. I don't use them. Many others probably yes. And you could make hundreds of them and not finish... so no, i'm not going to make them. But i have upload a .psd file so you can make your own backgrounds and images using photoshop. Feel free to share them and if they are good enough i will include them in the theme (crediting you ofc)

It's a bit slow on my raspberry pi!
If you are having slowdowns on the main menu or you feel its a bit slow you can disable the animations or boxart and cartart. With everything off it should work much more faster. 

Some systems don't have images!
If some images don't appear check that your display name in attract mode and the name of the images are the same (even capital letters on the raspberry). Rename them if not.
« Last Edit: April 22, 2017, 03:02:37 AM by cosmo »

chad.burdette88

  • Full Member
  • ***
  • Posts: 37
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #1 on: April 03, 2017, 02:38:26 PM »
Killer looking main menu man! I am glad to see that your adding capcom 1-3 and cave as well to it!

danilop2k2

  • Jr. Member
  • **
  • Posts: 12
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #2 on: April 03, 2017, 02:49:55 PM »
please .please robospin like layouts for speccy msx1 msx2

yelever

  • Full Member
  • ***
  • Posts: 29
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #3 on: April 03, 2017, 03:53:41 PM »
This theme is amazing.  Was wondering would it possible to use the same template for system themes and where the fanart and cartart slides in maybe have boxart and carts instead?  Never made a theme before but would love to try something like for individual systems.

SuperMagicom

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #4 on: April 03, 2017, 04:22:37 PM »
This is a fantastic addition to your system themes.

chad.burdette88

  • Full Member
  • ***
  • Posts: 37
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #5 on: April 03, 2017, 04:25:47 PM »
Hey Man!

My buddy Mike just finished his theme stemmed from the same template but you both used different wheels (Yours vertical, his curved). Wish I could combine both to choose my favorites from both your builds. Do you have your flyers without the wheel already photoshopped in?

https://www.youtube.com/watch?v=ENqDzeU9xDM&t=22s

carlhungus74

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #6 on: April 04, 2017, 05:07:02 AM »
Great Job !  8) 8)

cosmo

  • Full Member
  • ***
  • Posts: 54
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #7 on: April 05, 2017, 07:52:29 AM »
i'm currently updating the code and improving it. The next iteration will have...

-Options to mute video sound (done)
-Option for disabling/enabling animations (i don't know why but it's making dissapear wheel art  ::)... i'm probably going to need some help for this)
-Options for using vertical wheels or normal wheels (done)
-A layout for all systems with boxart and cartart (wip)
-lots of fixes to the code
« Last Edit: April 05, 2017, 09:26:51 AM by cosmo »

chad.burdette88

  • Full Member
  • ***
  • Posts: 37
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #8 on: April 05, 2017, 09:10:05 AM »
I am excited to hear about the updates. I noticed the vertical wheel shadow  is actually on the flyer background art. Does that mean you would be uploading the flyers again but without that so that we can choose from the normal wheel or vertical wheel?

cosmo

  • Full Member
  • ***
  • Posts: 54
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #9 on: April 05, 2017, 09:20:37 AM »
Yes. I have splitted wheel shadows from the rest of the background.

robertretropie

  • Jr. Member
  • **
  • Posts: 10
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #10 on: April 05, 2017, 03:31:19 PM »
Ive got a black screen in the background

cosmo

  • Full Member
  • ***
  • Posts: 54
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #11 on: April 06, 2017, 05:33:24 AM »
Ok, i've made some progress but i'm stuck with 2 things...

1- Does anyone knows how to make wheels fade? I've search the forum but didn't found anything useful. It would be great If you can point out a theme using it, so i can look at the code.

2- I have include boxart and cartart for systems with animations, it works great but i'm having some problems with the aspect ratio. The code works, but the results are not as i expected. I've used this code Fixed.

« Last Edit: April 06, 2017, 08:58:28 AM by cosmo »

tipoto

  • Full Member
  • ***
  • Posts: 43
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #12 on: April 06, 2017, 09:11:14 AM »
For the wheel fading, you can take a look at my code in the file I attached to this post.

You can see the result in the video I posted in this thread
http://forum.attractmode.org/index.php?topic=1219.msg8985#msg8985

cosmo

  • Full Member
  • ***
  • Posts: 54
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #13 on: April 06, 2017, 01:29:50 PM »
Thanks but lol, there are so many animations i don't understand half of what i've read

what part of this applies to the wheel?
Code: [Select]
// ANIMATION CURVES
local easeOut350=[0,0.088,0.361,0.836,1.533,2.474,3.686,5.2,7.052,9.287,11.958,15.13,18.885,23.323,28.572,34.789,42.173,50.946,61.319,73.339,86.601,100]
local easeOut500=[0,0.046,0.188,0.434,0.79,1.265,1.869,2.613,3.508,4.568,5.808,7.246,8.9,10.794,12.953,15.406,18.188,21.335,24.891,28.904,33.426,38.51,44.208,50.559,57.58,65.25,73.491,82.162,91.071,100]
//local easeIn350=[100,86.601,73.339,61.319,50.946,42.173,34.789,28.572,23.323,18.885,15.13,11.958,9.287,7.052,5.2,3.686,2.474,1.533,0.836,0.361,0.088,0]
local easeIn500=[100,91.071,82.162,73.491,65.25,57.58,50.559,44.208,38.51,33.426,28.904,24.891,21.335,18.188,15.406,12.953,10.794,8.9,7.246,5.808,4.568,3.508,2.613,1.869,1.265,0.79,0.434,0.188,0.046,0]


// VARIABLES

local locked = 0;
local hide_mask = 0;


local wheelOffStep = 21;
local wheelOff = 0;
local wheelOnStep = 0;
local wheelOn = 0;

l

// CALLBACK FUNCTIONS
fe.add_transition_callback( "update_lb" );
function update_lb( ttype, var, ttime )
{
switch ( ttype )
{
case Transition.StartLayout:
romname_delay = 0; romname_set = 0;
animTextPos = 21;
animFlyerPos = 21;
flyer_sweep = 0;
flyer_lock = 0;
animLogoPos = 21;
currentEmu = fe.list.name;
currentFilter = fe.list.filter_index;
flyer_art.alpha = 0; flyerDisplayed = 0;
break;

case Transition.ToNewSelection:
romname_delay = 0; romname_set = 0;
animTextPos = 21;
animFlyerPos = 21;
flyer_sweep = 0;
flyer_lock = 0;
animText = 1;
hide_timer_value = timer_backup;
wheelOff = 0; wheelOffStep = 21; hide_mask = 0; locked = 0;
flyer_art.alpha = 0; flyerDisplayed = 0;
break;

case Transition.ToNewList:
romname_delay = 0; romname_set = 0;
animTextPos = 21;
animFlyerPos = 21;
flyer_sweep = 0;
flyer_lock = 0;
animText = 1;
hide_timer_value = timer_backup;
wheelOff = 0; wheelOffStep = 21; hide_mask = 0; locked = 0;
flyer_art.alpha = 0; flyerDisplayed = 0;
break;

case Transition.ToGame:
gotogame = 1;
break;
}
}

fe.add_ticks_callback( "tick_fn" );
function tick_fn( ttime )
{
romname_delay++;
if ( romname_delay > 20 && romname_set == 0 ) // - arduino ARDUINO - Sends rom name info to am_arduino.sh
{
local romname = fe.game_info( Info.Name );
local system = fe.game_info( Info.Emulator );
local sys_rom = ( system + "+" + romname );
//fe.plugin_command_bg( "/home/odroid/.attract/emulators/RGB_leds/am_arduino.sh", romname );
fe.plugin_command_bg( "/home/odroid/.attract/emulators/scripts/tools/text_to_speech/am_tts_titles.sh", sys_rom );
romname_delay = 0; romname_set = 1;
}

if ( gotogame == 1 )
{
bgart.alpha = 0; bgart.y = 1080;
flyer_art.alpha = 0; flyer_art.y = 1080;
for(local a=-1;a<11;a+=1)
{
if ( a != 6 )
{
try { wheelObj[a].alpha = 0; } catch ( e ) { }
try { wheelObj[a].x = 2200; } catch ( e ) { }
}
else
{
wheelObj[a].alpha = 0;
wheelObj[a].x = 2200;
}
}
}

if ( fe.get_input_state( button_KEYBOARD_L ) || fe.get_input_state( button_XBOX360 ) ) // To display the wheel and the cabinet immediately
{
if ( flyer_art.alpha == 0 && flyer_lock == 0 && animFlyerPos == 21 && gotogame == 0 )
{
flyer_lock = 1; flyer_sweep = 1; flyer_art.alpha = 255; flyerDisplayed = 1;
hide_timer_value = 300; wheelOffStep = 21; hide_mask = 0; locked = 0; f1 = 1; wheelOff = 0;
for(local a=-1;a<11;a+=1)
{
if ( a != 6 )
{
try { wheelObj[a].alpha = 80; } catch ( e ) { }
}
else
{
wheelObj[a].alpha = 255;
}
}
}
if ( wheelOffStep == 21 && hide_mask > timer_backup || locked == 1 )
{
if ( hide_timer_value == timer_backup )
{
hide_timer_value = 300; wheelOff = 0; wheelOffStep = 21; hide_mask = 0; locked =0;
}
else
{
hide_timer_value = timer_backup; hide_mask = ( timer_backup + 1 ); wheelOff = 1; f1 = 3; locked =0;
}
flyer_art.alpha = 255; flyerDisplayed = 1;
for(local a=-1;a<11;a+=1)
{
if ( a != 6 )
{
try { wheelObj[a].alpha = 80; } catch ( e ) { }
}
else
{
wheelObj[a].alpha = 255;
}
}
}
}


if ( locked == 0 ) hide_mask++;
if ( hide_mask >= hide_timer_value ) wheelOff = 1; // Wheel and mask visibility duration
if ( wheelOff == 1 )
{
if ( f1 == 3 ) {
if ( flyerDisplayed == 1 ) flyer_art.alpha = 255-(-((easeOut350[wheelOffStep]-100)*2.55));
for(local a=-1;a<11;a+=1)
{
if ( a != 6 )
{
try { wheelObj[a].alpha = 80-(-((easeOut350[wheelOffStep]-100)*0.8)); } catch ( e ) { }
}
else
{
wheelObj[a].alpha = 255-(-((easeOut350[wheelOffStep]-100)*2.55));
}
}
wheelOffStep--; f1 = 1;
}
else f1++;
if ( wheelOffStep < 0 )
{
wheelOffStep = 21; hide_mask = 0; hide_timer_value = timer_backup; locked = 1; f1 = 1; wheelOff = 0; flyerDisplayed = 0; flyer_lock = 0;
}
}
}

i just want it to fade out after 10 seconds or so... nothing fancy.

tipoto

  • Full Member
  • ***
  • Posts: 43
    • View Profile
Re: Cosmo's Main Menu - An unified theme
« Reply #14 on: April 06, 2017, 02:51:54 PM »
Yeah I know it's very messy, but I did this code long time ago (way before we see the first wheel fade out) and I don't even use the animation plugin!
So basically I created my own animation system.

The "// ANIMATION CURVES" section is the creation of different arrays with a list of values from 0 to 100 (to be used as percentage), one with a smooth acceleration and another one with a smooth deceleration.
There are 4 arrays because there are 2 different accelerations and 2 different decelerations.

To make it work I used variables to pick the different items inside the arrays and use them as a percentage of acceleration or deceleration.
I think at the end I only used the array called "ease350", then I just used the math to make it work with the acceleration and the deceleration.

Unfortunately you need to track all the places where I inserted thoses variables, because you need to take into account all the different situation where you want your fade out animation to be reset.

Hopefully someone else can give you an easier way to do it, I knew that you were going to ask me explanation about the code :P, but unfortunately it's all what I have.
Also, if you want to run my layout, you will have to comment line 235, otherwise it will try to launch an external script at start and every time you change your game selection.