This is my procedurally generated movement system for top Down characters, which uses two simulated feet to move along the 2d plane. this is my second attempt at this niche, and my third in general. There are two movement modes, switched by the 'autoMove?' variable. in mode 0, the character moves when the 'WSAD' keys are pressed, and in mode 1, the character moves automatically.
Previously, my procedural animation System used a 'turn' system, where the feet take 'turns' moving, left then right and then left again. this system was lackluster in many ways, and the engine allowed for many bugs, like shimmying your feet further and further away from each other. this current system is improved in that it now moves the furthest foot from the body, and the body goes to the average of the two foot positions, and when the feet aren't moving, they center themselves on the body. this current system dynamically accounts for both running and walking, and avoids many of the previous system's bugs just by way of its simplicity.