It’s 3 AM. Your RTS units are finally moving, but something feels off. When they march in a line, the lead unit looks great, but the ones behind it are doing a weird shuffle-slide, like they’re on ice. You’ve got hundreds of units on screen, each needing to move, attack, and die, and animating them all individually is a nightmare you can’t afford. This isn't just about a walk cycle; it's about the entire army moving as one, with each soldier maintaining their position in the formation animation.
1.The march of many: Why your RTS units feel like a disjointed parade
Traditional sprite-sheet animation, while charming for individual characters, quickly becomes a resource hog when you have a hundred units on screen. Each unit needing its own set of frames for every action means a massive texture atlas and potentially complex state machines. This approach works for heroes, but not for the rank and file.

The real pain comes with group movement. Units don't just follow a path; they maintain relative positions, turn in unison, and react to obstacles. If your units don't animate correctly within a formation, the illusion of a disciplined army falls apart instantly, leaving your game feeling janky and unpolished. The visual fidelity of your RTS hinges on how convincingly your units move together.
a.The illusion of individual agency vs. collective movement
Players expect individual units to have their own animations for walking, attacking, and idling. However, when those units are part of a larger formation, their movements need to be subtly synchronized. An isolated unit might have a broad, expressive walk, but a unit in a tight formation needs a more constrained, purposeful stride. Balancing these two needs is a constant challenge for developers.
- Overlapping walk cycles cause units to clip through each other.
- Identical idle animations make formations look robotic and lifeless.
- Lack of turning animations results in units instantly snapping to new directions.
- Inconsistent animation speeds break the visual cohesion of a marching group.
- Missing transition animations between movement states create jarring pops.
b.The performance hit of unique animations for every soldier
Every unique animation frame and every complex state machine adds to your game's memory footprint and CPU load. For a game with dozens or even hundreds of units, this quickly becomes unsustainable. We need a method that allows for animation variety without multiplying resource demands. Efficient animation is not just about looking good; it's about keeping your frame rate high.
2.Skeletal animation is not just for heroes anymore
This is where Skeletal animation shines. Instead of drawing every frame, you draw body parts once and attach them to a digital skeleton. This skeleton is then animated, moving the body parts accordingly. The result is a highly flexible system that allows for endless animation variations from a single set of art assets, making it perfect for RTS units. You animate the bones, and the art pieces follow, dramatically reducing the amount of art required.

Tools like Spine or DragonBones have popularized this approach, but they often come with a steep learning curve or a price tag. For indie developers, especially those working with 2D sprites, a browser-native tool like Charios offers a more accessible entry point to this powerful animation technique. It simplifies the process of rigging and animating, letting you focus on game design.
a.Layered PNGs: Your secret weapon for unit diversity
The magic of skeletal animation for RTS units starts with layered PNGs. Instead of a single sprite, you prepare your character art as separate layers: torso, upper arms, lower arms, hands, head, legs, feet, etc. Each layer is a transparent PNG. When you drop these into a tool like Charios, you can snap them to a fixed skeleton. This allows you to mix and match armor, weapons, or even character types using the same underlying animation rig.
- Separate body parts into individual PNGs (e.g., `body_torso.png`, `arm_upper.png`).
- Ensure consistent pivot points or registration points for each part.
- Use a naming convention that makes sense for rigging.
- Prepare variations (different helmets, shields) as separate layers.
- Keep file sizes optimized for faster loading.
3.Mocap magic: Retargeting real movement onto tiny soldiers
Hand-animating a dozen distinct walk cycles for your various RTS units is already a time sink. Animating hundreds of frames for every state, for every unit type, is simply not feasible for a solo developer. This is where Motion capture (mocap) becomes an absolute lifesaver. You can apply realistic human motion to your stylized 2D characters, saving countless hours. Mocap provides a vast library of natural movement you can adapt.

Trying to animate unique, natural-looking walk cycles for every single RTS unit by hand is malpractice. Your time is better spent elsewhere.
a.The Mixamo bone mismatch and how to fix it
Many developers turn to Mixamo for its extensive library of free mocap animations. The catch? Mixamo's rigs are designed for 3D characters and have a specific bone hierarchy. When you try to retarget this data onto your 2D rig, you'll often encounter bone mismatches or strange rotations. The solution involves a mapping process where you tell your 2D rig which of its bones corresponds to which Mixamo bone. Charios simplifies this retargeting, allowing you to snap Mixamo data to your custom 2D skeleton with minimal fuss.
This mapping isn't always one-to-one. Sometimes, you'll need to ignore certain bones (like finger joints for a simpler 2D character) or combine the influence of multiple 3D bones onto a single 2D bone. It's a trial-and-error process initially, but once you have a good mapping for your base rig, you can reuse it for all your units. Think of it as teaching your 2D puppet how to dance to a 3D choreographer.
b.Cleaning up BVH data for 2D rigs
Beyond Mixamo, you can find other BVH format mocap data from sources like the CMU motion capture database or commercial packs like Truebones mocap. These often require more cleanup. You might need to filter out noise, adjust global rotation, or even trim unnecessary frames. Tools like Blender can help with this pre-processing before importing into your 2D animation tool. A clean BVH file means less headache during retargeting and smoother 2D animations.
- Find a base mocap animation that fits your unit's movement (walk, run, idle).
- Import the BVH or FBX into your animation tool.
- Map the mocap bones to your 2D character's skeleton.
- Adjust scale and offset to fit your 2D proportions.
- Refine rotations to ensure realistic 2D perspective.
- Save the retargeted animation as a reusable asset.
4.The leader and the followers: Orchestrating formation movement
Units in an RTS formation don't just follow a straight line; they maintain their relative positions to a leader or a central point. When the formation turns, each unit needs to adjust its position and orientation to maintain the overall shape. This isn't just a visual detail; it's crucial for gameplay, as unit positioning affects combat and pathfinding. A convincing formation animation sells the idea of a cohesive military unit.

The core principle is often a leader-follower system. One unit (or an invisible point) dictates the overall movement, and other units follow, calculating their individual paths and orientations based on their designated formation slot. The animation for each follower unit then needs to adapt to these micro-movements, often blending between a primary walk cycle and subtle positional adjustments. This is more complex than a simple walk. For example, consider how a unit might adjust when moving from an open formation to a tight one, an aspect similar to how hero-unit special abilities require unique blended animations.
a.The formation offset: Every unit has a home
Every unit within a formation has a target offset from the leader or the formation's center point. As the formation moves, this target offset moves with it. The unit then attempts to reach and maintain this offset. Instead of just playing a standard walk cycle, the unit's animation might be blended with a 'shuffle' or 'drift' animation when it's close to its target position but still needs minor adjustments. This blend creates the illusion of constant, subtle repositioning.
Quick rule:
Units should always be animating, even when they appear stationary within a formation. A subtle idle or micro-adjust animation prevents them from looking frozen. This principle also applies to defeat animation and corpse decay, where even static elements need subtle movement to feel alive.
b.Anticipation and follow-through in group movement
When a formation changes direction, units at the front of the turn should anticipate the movement slightly, while units at the back should show follow-through. This means their turning animations might start or end at slightly different times. It’s a subtle detail that adds immense realism. Implement this by adjusting animation playback speed or phase based on the unit's position relative to the turn's pivot point. This staggered animation makes group turns feel organic, not robotic.
5.Making every unit feel alive, even in a blob
Even with formation movement handled, you don't want your army to look like a cloned mass. Subtle variations can make each unit feel unique without requiring individual animation data. This is where procedural animation tricks and clever blending come into play. A little random deviation goes a long way in adding character.

a.Randomizing idle states and minor movements
Once units reach their formation positions, they shouldn't just freeze. Introduce randomized idle animations with slight delays. One unit might shift its weight, another might glance around, a third might scratch its head. These are tiny, short animation clips that play infrequently and out of sync with each other. This breaks up the visual monotony and adds a layer of believability to your army. Consider short animations for things like a slight head tilt or a subtle weapon adjustment, similar to the small movements that sell big draws in card-game character animation.
b.The "micro-adjust" animation loop
Units in a formation are rarely perfectly still. They're constantly making tiny adjustments to maintain their spacing. Create a very short, subtle
micro-adjust
animation loop – perhaps a slight lean, a small step, or a sway. This can be blended with the base idle animation or triggered when a unit is within a small threshold of its target position. This constant, subtle motion prevents units from looking glued to the ground.
- Apply slight random delays to animation start times for each unit.
- Introduce minor scale or rotation variations in the character rig.
- Blend in short, secondary idle animations (e.g., weapon sway, head turn).
- Use inverse kinematics for reactive foot placement on uneven terrain.
- Add particle effects (dust, mud) tied to footfalls for environmental interaction.
6.The workflow: From static art to marching army in an afternoon
Building a functional and visually appealing RTS unit formation system doesn't have to take weeks. With the right tools and approach, you can go from static layered PNGs to a fully animated marching army in a surprisingly short amount of time. This workflow focuses on efficiency and reusability, leveraging mocap and skeletal animation to speed up production. This is how you get formation animation done without losing sleep.

a.Setting up your base rig for mass deployment
- 1Prepare layered PNGs: Separate your unit art into logical body parts (head, torso, upper arm, lower arm, etc.).
- 2Import into Charios: Drop your layered PNGs into the Charios canvas.
- 3Create a base skeleton: Snap bones to the center of each body part. Ensure a consistent bone hierarchy.
- 4Bind textures: Attach each PNG layer to its corresponding bone.
- 5Adjust pivot points: Fine-tune the pivot of each bone for natural rotation.
- 6Create a default pose: Set a neutral pose for easier animation retargeting.
b.Batch retargeting and exporting
Once your base rig is set up, the real time-saving begins. You can import mocap data (like a walk cycle from Adobe Mixamo) and retarget it to your Charios rig. After the initial mapping, this animation can be applied to any unit sharing the same base skeleton. This means you only need to rig and animate one generic soldier, then apply the animations to all its variations. This is also how you'd typically handle other complex animations, such as those for bullet-hell graze animation feedback.
- 1Import mocap file (BVH or FBX) into Charios.
- 2Map mocap bones to your 2D skeleton's bones.
- 3Preview and adjust: Ensure the animation looks natural in 2D.
- 4Save the animation clip: Name it clearly (e.g., `walk_cycle`, `run_cycle`).
- 5Apply to other units: If units share a skeleton, apply the saved animation directly.
- 6Export: Use Charios' export options for Unity prefab or GIF sequences. For specific engine integrations, check out resources like importing a Charios rig into Defold.
7.Performance is king: Animating hundreds without tanking frames
Having hundreds of animated units on screen can quickly bring even a powerful PC to its knees. Optimizing your animations is non-negotiable for RTS games. This means making smart choices about rig complexity, animation length, and export format. Every frame counts when you're rendering an army.

a.Looping cycles and minimal bone counts
The vast majority of your unit animations will be seamless loops: walk cycles, run cycles, idle animations. Ensure these loops are as short and clean as possible without sacrificing quality. Furthermore, resist the urge to add too many bones to your rig. A complex 2D rig with 30+ bones per unit might be great for a hero character, but for a common soldier, aim for a minimalistic skeleton (e.g., 12-18 bones). Fewer bones mean fewer calculations per frame, per unit.
b.Exporting efficiently for Unity or Godot
When exporting from your animation tool, choose formats that are engine-friendly and optimized. Charios, for instance, can export directly to a Unity prefab zip or GIF. For Godot, you might export individual sprite sheets or texture atlases of your animations. The goal is to minimize draw calls and CPU usage. Batching techniques and efficient rendering are crucial for large numbers of units.
- Keep animation loops short (e.g., 8-12 frames for a walk cycle).
- Use minimal bone counts for background or common units.
- Batch similar units together for rendering.
- Utilize texture atlases for all unit parts and animation frames.
- Implement level of detail (LOD) for animations at different zoom levels.
- Consider culling animations for units off-screen or far away.
Getting formation animation right in your 2D RTS game isn't just about making things look pretty; it's about selling the core fantasy of commanding an army. By embracing skeletal animation with layered PNGs and leveraging mocap retargeting, you can create compelling, dynamic unit movements without drowning in repetitive animation tasks. Remember, the goal is efficiency and visual impact, making your units feel like a cohesive, living force on the battlefield. Don't let animation be the bottleneck for your RTS vision.
Ready to bring your armies to life? Head over to the Charios dashboard and start experimenting with layered PNGs and mocap for your unit animations today. You can have a fully animated unit marching in formation in under an hour, ready for export.



