For enemies in a video game is there a way to change / generate an animation based off predefined code to work in any given environment.

An example could be a giant spider walking over rough terrain, or other stuff.

I intend to use this to use different attacks depending on where the user is (ie. hitting a large spider arm around a stone beam)

Generally looking for the name of what I am explaining so I can research it.

  • \$\begingroup\$ I remember seeing a youtube video featuring this animation style, but am unable to find it. It was about creating contraptions to play as and defeating enemy contraptions to gain parts. \$\endgroup\$
    – AussieNote
    Commented May 15 at 3:59

1 Answer 1


This is called procedural animation, because the pose data is computed via some procedure at runtime, rather than just looked up/interpolated from a pre-baked animation timeline.

Some examples of pure procedural animation in various forms:

This can also be mixed with conventional, pre-authored animations in various ways:

  • Using weighted/masked blends between authored poses / animations, like having "aim forward, up, up-right, right" etc. poses and blending between them to match the player's input / NPC action.
  • Inverse kinematics (IK), where we calculate and override a chain of joint angles in an animation to, e.g. keep feet planted on an uneven surface, or keep a hand correctly gripping a held object.
  • Layering "additive animations" on top of simple walk/idle loops, to make them look less repetitive and more natural.
  • Dynamically adding leans, "smear frame" distortion, or squash & stretch scaling over-top of a conventional skeletal animation to make it look more cartoony and responsive to what's happening in the game.
  • \$\begingroup\$ Any chance that you have some more links on this, such as scholar articles or things that go into greater depths on how everything works and possibilities of change in relation to IK or Procedural Animation as a whole? \$\endgroup\$
    – AussieNote
    Commented May 15 at 23:15
  • 2
    \$\begingroup\$ Just using the search term "procedural animation" will turn up a bunch of hits. I can try to curate some if you're looking to animate something specific or need help with a specific technique, but for a general survey, your search will turn up the same results as mine. \$\endgroup\$
    – DMGregory
    Commented May 16 at 0:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .