Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: kent79 on October 09, 2017, 04:38:23 PM
-
Dear All,
Anyone know how to make a continuous sliding image like as SNES Mini background. Thanks.
https://www.youtube.com/watch?v=roo077srwOk
:)
-
I am sure there is more than one way to do this.
My approach would be to use an app to take your image, animate it, and export it as a movie file. Photoshop can create animated gifs, but I think it can also export as quicktime movie. Move one object off the screen while having a duplicate layer replace the others position.
-
I am sure there is more than one way to do this.
My approach would be to use an app to take your image, animate it, and export it as a movie file. Photoshop can create animated gifs, but I think it can also export as quicktime movie. Move one object off the screen while having a duplicate layer replace the others position.
Make a movie or gif file is not the best way. I expect using a code. I can see "Mugen" system can do it. So, hope someone expert to write a module to do it. :)
-
I am sure there is more than one way to do this.
My approach would be to use an app to take your image, animate it, and export it as a movie file. Photoshop can create animated gifs, but I think it can also export as quicktime movie. Move one object off the screen while having a duplicate layer replace the others position.
Make a movie or gif file is not the best way. I expect using a code. I can see "Mugen" system can do it. So, hope someone expert to write a module to do it. :)
I didn't say it was the best way. The amount of time it would take *myself* to have code/animation do this would be a lot. The same effect could be had in minutes by making a movie file. Might be quicker to code for some one really familiar with animations in attractmode. I assume you would need an object, duplicate it, and have both animating. When one finished it repositions and starts animating again.
-
A lot of robospin themes I've played about with had a panscan option in them, just copy the code and put the image you want to scan in the layout folder as "flyer.png" that or change the name in the code:
local bgart = PanAndScanArt( "flyer", 0, 0, flw, flh);
bgart.trigger = Transition.EndNavigation;
bgart.preserve_aspect_ratio = false;
bgart.set_fit_or_fill("fill");
bgart.set_anchor(::Anchor.Center);
bgart.set_zoom(4.5, 0.00008);
bgart.set_animate(::AnimateType.Bounce, 0.50, 0.50)
bgart.set_randomize_on_transition(true);
bgart.set_start_scale(1.1);
local alpha_cfg = {
when = Transition.ToNewSelection,
property = "alpha",
start = 0,
end = 200,
time = 3000
}
animation.add( PropertyAnimation( bgart, alpha_cfg ) );
-
Below is code, it can do it, but it is some lag (low performance) when navigating system or game.
I don't know exactly reason. The issue does not related of machine hardware. I suspect that it is AM animation function issue. It may be not optimized :-[
https://youtu.be/aNulntecNx4
local bgArt = fe.add_image("bg.jpg", 0, 0, 1280, 720 );
local bgArt2 = fe.add_image("bg.jpg", 0, 0, 1280, 720 );
local move_bgArt1 = {
when = Transition.ToNewList, property = "x", start = 0, end = -1280, time = 24000, loop=true
}
local move_bgArt2 = {
when = Transition.ToNewList, property = "x", start = 1280, end = 0, time = 24000, loop=true
}
animation.add( PropertyAnimation( bgArt, move_bgArt1 ) );
animation.add( PropertyAnimation( bgArt2, move_bgArt2 ) );
-
Below is code, it can do it, but it is some lag (low performance) when navigating system or game.
I don't know exactly reason. The issue does not related of machine hardware. I suspect that it is AM animation function issue. It may be not optimized :-[
https://youtu.be/aNulntecNx4
local bgArt = fe.add_image("bg.jpg", 0, 0, 1280, 720 );
local bgArt2 = fe.add_image("bg.jpg", 0, 0, 1280, 720 );
local move_bgArt1 = {
when = Transition.ToNewList, property = "x", start = 0, end = -1280, time = 24000, loop=true
}
local move_bgArt2 = {
when = Transition.ToNewList, property = "x", start = 1280, end = 0, time = 24000, loop=true
}
animation.add( PropertyAnimation( bgArt, move_bgArt1 ) );
animation.add( PropertyAnimation( bgArt2, move_bgArt2 ) );
Sometimes I just position the object outside the layout and move then into it "when = Start.Layout,"
I think I have some example on my MachiRoomNesScroll Layout.
Or just adding a little alpha transition.
local title_alpha_cfg_on_load = {
when = When.StartLayout,
property = "alpha",
start = 0,
end = 255,
time = 1000
}
animation.add( PropertyAnimation( title, title_alpha_cfg_on_load ) );
Maybe this can help.
-
Thank you qqplayer reply, but not working. Anyway, I will release a new version of Grid Pro Theme soon. You may try to update. Thanks. :)
-
no luck getting these scripts to work either :/ I have a theme or background image that is just small borders at the top and bottom and transparent in the middle. All I get is black in the transparent area of the theme. Any suggestions?