Effect of crafting speed on animation speed

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Effect of crafting speed on animation speed

Post by Deadlock989 »

Most machines with a crafting speed > 1 seem to play their animations faster - both the main sprite and any working_animations. This can "waste" frames of your animation if you have multiple tiers of the same machine and the slowest is speed 1. (If the slowest is less than speed 1, it doesn't look very good).

But it's not as simple as crafting_speed * animation_speed. If I divide the animation speed of each tier by the crafting speed, it "overcompensates" and I get slower and slower animations.

I could mess with this endlessly to get in the ballpark but does anyone know what the exact relationship between the two speeds is?
Image

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Effect of crafting speed on animation speed

Post by eradicator »

Been quite a while since i did anything with animations, but are you really sure that the default crafting speed affects the animation speed? I thought that i remember that the animation speed is only affected by speed effects from modules and beacons.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Effect of crafting speed on animation speed

Post by Deadlock989 »

Never mind, I derped with maths. The speed of the animation is exactly (crafting_speed*animation_speed), at least for furnaces.

If you want to re-use animations across different entities but keep them all at the same speed of 60 frames per second, set the animation_speed to 1/crafting_speed.
Image

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Effect of crafting speed on animation speed

Post by mrvn »

Or not. If it is the same animation you might want the work to look faster and not just be faster.

Post Reply

Return to “Modding help”