[Request] Standardise radar animation definition

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

[Request] Standardise radar animation definition

Post by Deadlock989 »

Don't fancy my chances with this one but don't ask, don't get.

Radar entities are another one of these entities like labs and drills that have an inflexible sprite definition - but worse than either labs or drills. Instead of using an animation sprite and working visualisations, they don't actually define any kind of "animation" at all. Instead, for whatever reason, they have a RotatedSprite (like a car or a turret) indexed by direction_count, even though radars aren't directional and all they do is rotate (or not). Presumably the game just loops the direction count using the rotation_speed parameter, instead of treating this animation like ... an animation. This seems really odd when all they have to do is rotate in a loop (or stop rotating when unpowered) and they never have to point in a particular direction.

This prevents the following:

- Having a working animation light / fire / movement that is only visible when the radar is powered (cf. drills)

- Having layers of animations with different direction counts, because direction_count doesn't have an equivalent of repeat_count - so if the radar's silhouette doesn't actually change with its animation, I still have to make a sprite sheet full of identical copies of the same shadow.

- The same thing also prevents VRAM/atlas savings by breaking the moving parts out into their own layer - you can see this in the vanilla radar sprite, where the base of the radar has to be in every single frame despite the only moving part being considerably smaller, increasing the sprite sheet size.

If radars had the regular animation and working_visualisation definitions like other looping animation entities do, you could do nice things like burner radars, or otherwise actively animated radars, and also save considerably on the atlas space those animations use up. This change would not require any artist time for the existing radar because the existing spritesheet would serve perfectly well as a base animation. However, if the change were made, you could save some atlas space by breaking out the rotating dish and its shadow.
Image

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2904
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [Request] Standardise radar animation definition

Post by darkfrei »

+1 for simple and standard animation definition.

Post Reply

Return to “Modding interface requests”