Attract-Mode Support > Scripting

Help needed! I'm having a problem with slowdown on my theme (FIXED!)

(1/3) > >>

markc74:
Hi all,

I'm almost finished creating a theme for my upright CRT cabinet but I've ran into a problem that I can't seem to fix and really hope someone here might be able to help me out.

The theme (called the Invaders) is a relatively simple list with a video running in the background. Pressing the "custom1" button cycles between the video of the game running, the flyer, and cabinet before returning to the video again. This happens via animate.nut which just slides the images in and out from the side.

On initial loading, scrolling up and down through the list works perfectly well, but after cycling through the vid/flyer/cabinet a couple of times the whole theme starts slowing down and becoming choppy.

I've done some searching but didn't really come up with anything. The laptop I'm using to create the theme is an i7 with 16GB ram and 500GB SSD so I dont think that should be causing the problem so I expect the problem lies with my code being inefficient in some way (I'm learning as I go!)

Anyway -if anyone has time to take a look at the attached layout and see if they can see anything obvious I'd be very grateful!

Here's a youtube link showing initially how smooth it runs, and then the slowdown/stuttering appearing (around the 1:00 mark)

https://youtu.be/-YSqlLmkfMs

calle81:
Add this for your videosnap

snap.trigger = Transition.EndNavigation;

Then the video will only change when you stop scrolling.

calle81:
Or in your case vid.trigger = Transition.EndNavigation;

You should do the same with the rest of the art aswell:

flyer.trigger = Transition.EndNavigation;

calle81:
You can also use fadeart for a smooth fade

local vid = FadeArt( "video", flx*0.2, fly*0.18, flw*0.5, flh*0.65);

verion:
It's a great theme - simple, but elegant. And really needed, because there is just a bunch of vertical themes.

Navigation

[0] Message Index

[#] Next page

Go to full version