Recent Posts

Pages: [1] 2 3 ... 10
Themes / Possible to make Robospin scale with aspect ratio?
« Last post by tonberryhunter on Today at 10:42:44 PM »
I have been working for months on a custom Attract Mode theme based off of the original Robospin.  I'm trying to figure out how to scale the wheel images with a 4:3 aspect ratio.  I managed to get the cab (cropped photoshop), snap and background (cropped in photoshop) art to scale correctly but not sure what I need to edit in the layout.nut file to correct the wheel.  Other than intentionally distorting all my 16:9 assets in Photoshop I dont know how to fix this.  Perhaps someone verse with the coding used in these layouts might be of assistance. :)

Here are two example images of my main menu.


upload and share pictures

4:3 (with distorted wheel images and pointer)

upload and share pictures

Themes / Re: Hyperspin joystick anamation
« Last post by jedione on Today at 06:41:37 PM »
repeat = "yoyo",

what code is this iv never seen this?
thought it was

repeat = "true",
repeat = "false",
Scripting / Re: Preserve aspect ration in wheel using conveyor
« Last post by calle81 on Today at 11:58:14 AM »
Never mind i figured it out:

conveyor.preserve_aspect_ratio = true;


// we do it this way so that the last wheelentry created is the Center one showing the current
// selection (putting it at the top of the draw order)
for ( local i=0; i<remaining; i++ )
wheel_entries.insert( num_arts/2, WheelEntry() );

conveyor <- Conveyor();
conveyor.set_slots( wheel_entries );
conveyor.transition_ms = 50;
try { conveyor.transition_ms = my_config["transition_ms"].tointeger(); } catch ( e ) { }
conveyor.preserve_aspect_ratio = true;
Themes / Re: Hyperspin joystick anamation
« Last post by KTURNER on Today at 11:38:11 AM »
Wow thanks! This is way over my head but I would love to learn it. I'm going to play around with it. What's weird is when I first reinstalled windows 7 they were showing up. The layouts had white bars across them and were all jacked up but the joysticks were there. I downloaded the latest graphics drivers and fixed the issue but the joysticks are gone.
Scripting / Re: Last played games
« Last post by bjose2345 on Today at 12:57:30 AM »
Does attract mode load the romlist after return from game? If so, you could use a plugin that will modify the romlist during to game transition, all in squirrel.

yeah i do that but with a shell script, here is the script

first you need to add this code in your theme, remember to register it like a callback function

Code: [Select]
function on_transition( ttype, var, ttime )

switch ( ttype )
case Transition.ToGame:
fe.plugin_command_bg( "/home/pi/.attract/", "\"" + fe.game_info(Info.Name) + ";" + fe.game_info(Info.Title) + ";" + fe.game_info(Info.Emulator) + "\"" );

and here the shell script

Code: [Select]
#!/usr/bin/env bash

# get the args

IFS=';' read -r -a array <<< "$args"

filename="/home/pi/.attract/romlists/Last Played Games.txt"
NUMOFLINES=$(wc -l < "$filename")

$(grep -q "${array[0]};${array[1]};${array[2]};;;;;;;;;;;;;;" "$filename")
if [ $? -eq 1 ]; then
if [ $NUMOFLINES -lt 11 ]; then
sed -i -e '$a\'"${array[0]};${array[1]};${array[2]};;;;;;;;;;;;;;" "$filename"
sed -i '2d' "$filename"
sed -i -e '$a\'"${array[0]};${array[1]};${array[2]};;;;;;;;;;;;;;" "$filename"

you can modify this line

Code: [Select]
if [ $NUMOFLINES -lt 11 ]; then
with any number you want if you want the last 20, put 21, because you need always 1 line in your romlist, the sed command doesnt work in empty files.
hit ESC key > Exit : yes > you're on bash
Scripting / Re: Last played games
« Last post by keilmillerjr on Yesterday at 07:02:44 PM »
Add in Favorite filter

There already is favorites filter built into attractmode.
Themes / Re: Hyperspin joystick anamation
« Last post by howlerbr on Yesterday at 06:14:30 PM »
that's way too cool, I liked it. Where do I find the documentation for other animation options for sprites? In squirrel-lang site? I couldn't find anything
Emulators / Re: executable "cmd" on linux?
« Last post by progets on Yesterday at 05:20:21 PM »
I know but for some reason when I launch the mame core It doesnt close the emulator propertly.
I set esc key on emulationstation and on AM but only exits from the game to the retroarch gui.

If you used EmulationStation to set it up, the key you choose for "Select" is the hotkey and the key you choose for "Start" is used to exit (with the hotkey). So "Select+Start" is how you would exit.
Themes / Re: Hyperspin joystick anamation
« Last post by mc2programmer on Yesterday at 04:35:15 PM »
So I tried to load some .swf (flash) joystick animations into AM, and they did load however the colors were all messed up and I figured it may have been do to the still limited flash support. So what I did was created a sprite sheet from my flash file and added the sprite animation to my theme. Depending on what joystick animation you are using you might just be able to add the swf and it might play just fine. if not here is some sprite code if you want to go that route.

// Attempt for joystick animation sprite sheet
//sprite animation - use a spritesheet to animate specific frames of the sprite sheet
local joystick_up = fe.add_image("joysprite.png", (fe.layout.width / 2) - 480, fe.layout.height - 180, 300, 200);
local sprite_cfg = {
    when = When.Always,
   orientation = "vertical",
   height = 116,
    width = 242,
    frame = 0,
    time = 1000,
    order = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    repeat = "yoyo",
   loop = true
animation.add( SpriteAnimation( joystick_up, sprite_cfg ) );

keep in mind depending on your sprite sheet the setting will be a bit different
Pages: [1] 2 3 ... 10