It is currently June 2nd, 2020, 11:37 am

ActionTimer v Lua for shape meter and other animations

General topics related to Rainmeter.
User avatar
theimmersion
Posts: 55
Joined: November 27th, 2016, 1:51 pm

ActionTimer v Lua for shape meter and other animations

Post by theimmersion »

I am kinda wondering which one is more efficient to use for skin animations, especially dynamic shape meter manipulation which i use a lot.
I'm not that much into LUA tbh and use ActionTimer but i had some issues in the past with strains on performance versus some launchers i found that use LUA instead doing the same thing or more. E.g. a launcher that mimics rocketdock or similar with icon zooms and all that goodness, i had one that for some reason was lagging while zooming while i found some skin some time ago that had no such issue while being otherwise identical but used LUA to control everything.
So, i might have made some mistake somewhere in the skin or is LUA just simply more efficient and is it worth investing time in learning LUA if i want to animate stuff? Ya know, benefits of investing time vs return value in skin efficiency?
Time is very allocated mind you so gotta be worth it. :-(
I know i could learn LUA and mind be useful in future and any knowledge gain is worth it in the end but let's just assume i'm not that lucky to ever need LUA outside a few rainmeter skins.
Or am i being too stupid about it? :confused:

Have a good one! :great:
User avatar
jsmorley
Developer
Posts: 20678
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ActionTimer v Lua for shape meter and other animations

Post by jsmorley »

I don't think Lua is a good fit for animations. Lua is run in the same thread as the Rainmeter skin, and so is "blocking" while the Lua is executing and can't really be used to effectively drive animations. I really think ActionTimer is the better bet.

Mind you, there is plenty of value that Lua can bring, even in the context of an animation, but I don't think it is the best way to drive the animation process itself. ActionTimer runs in its own thread, and can run much faster than the update of the skin it is in.
User avatar
Jeff
Posts: 137
Joined: September 3rd, 2018, 11:18 am

Re: ActionTimer v Lua for shape meter and other animations

Post by Jeff »

https://forum.rainmeter.net/viewtopic.php?f=99&t=28585&p=149394#p149394
Check this out as well if you need some complex math that can't be done by RM and can be easier with LUA or whatever else you want
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: ActionTimer v Lua for shape meter and other animations

Post by Yamajac »

Jeff wrote:
December 7th, 2019, 12:23 pm
https://forum.rainmeter.net/viewtopic.php?f=99&t=28585&p=149394#p149394
Check this out as well if you need some complex math that can't be done by RM and can be easier with LUA or whatever else you want
Well it can be done in RM without Lua, it's just a lot more complicated lol.

Actiontimer or lua would probably serve the purpose just as well for not extremely complicated animations. Lua might be easier to code the animation in, though.
User avatar
balala
Rainmeter Sage
Posts: 10664
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ActionTimer v Lua for shape meter and other animations

Post by balala »

Jeff wrote:
December 7th, 2019, 12:23 pm
Check this out as well if you need some complex math that can't be done by RM and can be easier with LUA or whatever else you want
I doubt such calculations can't be done with Rainmeter. I don't contest the need of the Lua script in this case, but similar calculations definitely can be done in Rainmeter as well.