I learned a trick from a web design professor about looping animations, which I found interesting. He proposed that you could make a more complicated design, and as long as the animation ends with the elements lining up, you can chop a frame off and it will loop. This snake only actually animates long enough for one of the brown beveled rectangles to reach the next position, but the loop works well enough that the effect works. The illustration was created in illustrator, animated in After Effects, and the gif was exported through Photoshop after some final touch ups.