Author Topic: Modern themes with retro feel  (Read 92383 times)

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Modern themes with retro feel
« Reply #75 on: April 09, 2015, 09:42:22 PM »
Ok this is what I got after the debug in the terminal

Code: [Select]
Starting Attract-Mode 1.5.1 (Linux)
Config: /home/.attract/attract.cfg

*** Initializing display: 'mame'
 - Loaded master romlist 'mame' in 23 ms (2390 entries kept, 0 discarded)
 - Constructed 6 filters in 22 ms (14340 comparisons)

AN ERROR HAS OCCURED [the index 'ship' does not exist]

CALLSTACK
*FUNCTION [unknown()] /home/.attract/modules/extended/animations/particles/particles.nut line [12]
*FUNCTION [unknown()] /home/.attract/modules/extended/animate.nut line [138]
*FUNCTION [main()] /home/.attract/layouts/uni_mame_vertical - test/layout.nut line [61]

LOCALS
[c] TABLE
[this] TABLE
[o] INSTANCE
[c] TABLE
[this] INSTANCE
[snap] INSTANCE
[offset] 4
[rot] 1
[flh] 800
[flw] 600
[config] TABLE
[vargv] ARRAY
[this] TABLE
Script Error in /home/.attract/layouts/uni_mame_vertical - test/layout.nut - the index 'ship' does not exist
 - Loaded layout: /home/.attract/layouts/uni_mame_vertical - test/ (layout.nut)

in my editor:

Line 12 is:
local config = fe.get_config();

Line 61 is:
if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "ship" } );

138 is:
//text stuff

I hope this helps.
People want life easy..then complain about it

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: Modern themes with retro feel
« Reply #76 on: April 10, 2015, 05:31:21 AM »
Fox-

I should have thought of the debug sooner :P. Included in the layout.zip you downloaded there is a presets folder. Copy the images like ship.ping into your \attract\modules\extended\animations\particles\presets. I added new art to the preset folder so anything turned on in the layout will look here.  Here is where you turn on the particle effects art in the layout.nut - As you can see the ship is turned on and I added new art like "disk, bit" that is turned off - These files need to be in the preset folder. There is a default ship.png in the original preset folder that might be called ship too which I just renamed. So, technically it should still work if the name is matched in the preset.nut in the presets folder. Take a look at the preset.nut and you will get a better understanding of what is going on. Then look at the layout nut. You can add your own particles effects this way. 

//uncomment others to see them
if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "sparkle" } );
//if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "snow" } );
//if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "default" } );
//if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "test" } );
//if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "cloudstoon" } );
//if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "bubbles1" } );
//if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "arc1" } );
//if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "invaders" } );
//if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "cloudstoon2" } );
//if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "disk" } );
//if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "bit" } );
if (config.enable_particles == "Yes") ExtendedObjects.get("bg").animate({ which = "particles", preset = "ship" } );

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: Modern themes with retro feel
« Reply #77 on: April 10, 2015, 05:50:39 AM »
Fox-

Continued... You should have something like this in the preset.nut for it to work. The index name "ship" and resources = " presets/ship.png" . This how you would add your own artwork for particle effects. Just add your own index name and resource art.png in the same presets folder. Then add same index name in layout.nut. This should should help other members too.   

},
     "ship": {
        resources = [ "presets/ship.png" ],
        ppm = 100,
        x = 0,
        y = 0,
        width = fe.layout.width,
        height = fe.layout.height,
        speed = [ 0, 0 ],
        scale = [ 1, 1.5 ],
        rotate = [ 0, 0 ],
        fade = 1500,
        lifespan = 1500
     }

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Modern themes with retro feel
« Reply #78 on: April 10, 2015, 08:55:51 AM »
Ok so I turned the ship off. I saw that the first time (not the error but the code "options")..but I was more worried about the back ground not working I guess. I moved all those pics into the folder you said above. Oddly enough it still gave me the same error..but the sparkle effects work just fine as does the invaders. However I turned of the sparkles and then tried to do the "ship3" I got the same error as before. Now I said ok I turned all the effects off.

Code: [Select]
Starting Attract-Mode 1.5.1 (Linux)
Config: /home/.attract/attract.cfg

*** Initializing display: 'mame'
 - Loaded master romlist 'mame' in 23 ms (2390 entries kept, 0 discarded)
 - Loaded layout: /home/.attract/layouts/uni_mame_vertical - test/ (layout.nut)

No errors looks like. Also remember how i said the text and all was not coming up...well it works now..all of it wheel art and all! The picture is still squashed and the sparkles will not display past the background into the black empty space. Before you added the vertical code the sparkles would appear across the whole screen..even if the background was not there.
People want life easy..then complain about it

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: Modern themes with retro feel
« Reply #79 on: April 10, 2015, 09:51:12 AM »
Fox-

OK, this is all on me. I added the preset folder and preset.nut but not with very good instructions. If my preset folder was copied over the original most of the problems would have been eliminated. I will play around with the vertical some more. What happens if you // the rotation code and use rotate under controls? Thanks a lot for all the feedback.

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Modern themes with retro feel
« Reply #80 on: April 10, 2015, 10:03:43 AM »
Fox-

OK, this is all on me. I added the preset folder and preset.nut but not with very good instructions. If my preset folder was copied over the original most of the problems would have been eliminated. I will play around with the vertical some more. What happens if you // the rotation code and use rotate under controls? Thanks a lot for all the feedback.

I'll check that out right now.

In the mean time (and I was going post the error..but is seems it's the same no matter what.) I tried all the effects one by one..the "disk" the "bit" and the "ship" fail all with the same error. (Everything sles works fine..but the squashed background.) I copied over all the effects like you said. They are where they are suppose to be...so why doesn't it find it?
People want life easy..then complain about it

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Modern themes with retro feel
« Reply #81 on: April 10, 2015, 10:20:02 AM »
Ok now I understand..once I add that to the preset.nut..it doesn't bark and error. And everything works fine. Except of course the background being squashed. I said that the effects seemed to work in the horizontal even with background too small? No I was mistaken. The effects still cut off even with the original code
People want life easy..then complain about it

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Modern themes with retro feel
« Reply #82 on: April 13, 2015, 04:19:20 PM »
Well i had to take a break from that layout omega. I  have no idea what it is. It's so weird.

I used your basic spinwheel theme and I made a new back ground for a new emulator. I went OLD school thank you very much! :D
People want life easy..then complain about it

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: Modern themes with retro feel
« Reply #83 on: April 13, 2015, 07:23:52 PM »
Fox-

No problem man. I think it has something to do with the extended objects in the layout and me not testing it on Linux before hand. There is nothing wrong with old school :p Speaking of that have you read Ready Player One? Good book for us older gamers... 

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Modern themes with retro feel
« Reply #84 on: April 13, 2015, 10:32:22 PM »
Honestly I have never heard of it. I looked it up though. I will definitely look into it! :) They started on the movie in March. http://deadline.com/2015/03/ready-player-one-movie-steven-spielberg-ernest-cline-warner-bros-1201398299/ Books are always better though :D I want to see the movie 'Pixels'. I'm sure these kids will not have a clue what those games are lol
People want life easy..then complain about it

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: Modern themes with retro feel
« Reply #85 on: April 14, 2015, 11:19:16 AM »
Fox-

Yeah, I read about the movie deal - I just hope Spielberg does a better job than he did on the crystal skull. I am looking forward to seeing Pixels myself even though it looks like Ghost busters featuring pacman as staypuff :p

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Modern themes with retro feel
« Reply #86 on: April 15, 2015, 11:35:54 AM »

Yeah, I read about the movie deal - I just hope Spielberg does a better job than he did on the crystal skull. I am looking forward to seeing Pixels myself even though it looks like Ghost busters featuring pacman as staypuff :p

ROFL

Hey I made some backgrounds for use with your original spinwheel layout. What do you think? It is going to be a running theme..or at least I am going to try :) I'm going to remove the console pic..it's covered by the wheel art..no reason for it to be there. Or i might move it somewhere else.
People want life easy..then complain about it

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: Modern themes with retro feel
« Reply #87 on: April 15, 2015, 02:49:14 PM »
Fox-

Looks good, as they say "practice makes perfect" ...  Are you still using GIMP?  I

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: Modern themes with retro feel
« Reply #88 on: April 15, 2015, 02:57:25 PM »
Fox-

Little tip for the missing wheel art. Grab a generic wheel art and put it in the layout folder as wheel.png. Then every time a game without wheel art will display the generic one.   

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Modern themes with retro feel
« Reply #89 on: April 15, 2015, 03:48:30 PM »
Yeah still using GIMP. Yeah good idea..you have one in that vertical layout I think. Yeah it's not the best but thanks :) The background for the gnes is from the boxart itself. Snes doesn't really have a pattern on the box so I just went with that becaue that part of the boxart is black.so it looked good. The boxart background for the sms is white and chequered..we'll see how that goes lol
People want life easy..then complain about it