sprite ai
Keep AI Sprite Recolors Private to the Actor That Requested Them
When a game applies a faction tint or a temporary hit color, it should change only the selected actor. Editing an image that the resource cache shares can recolor every on-screen instance that uses the original pose. Give the tint a private working surface or deliberately publish it as a separate asset for a known set of actors.
Keep an unchanged actor in the test scene
Stand two copies of a character side by side. Give them the same source image and sample a patch on both before applying the tint to one actor. After redraw, check that the selected patch changed on one actor and still has its original color on the other. Spawn a third actor from the source after the edit; it should load the original color too. Finally, clear the temporary variant and verify its owner returns to the expected source pose.
The technical guide and test fixture records Pygame Zero behavior with shared loaded surfaces and a private copy. Test the path the game actually uses to draw the modified surface or named variant. An isolated offline preview cannot reveal whether a supposedly local edit is mutating the shared resource.
Prepared by the FrameSprite Workflow Team with AI assistance. Examples are illustrative unless attributed to a linked fixture.