3

I don't want code or anything that will make this too easy for me, but I'm just starting the development of a little game and I want to add worms to it, I want the worms to be Terraria like. My current idea is to make the worm be composed of multiple entities, one being the head and the rest parenting each other leading downwards from the head. However, this in my opinion sounds inefficient and might be lag inducing when there are a large number of worms in the entity map. Does anyone have any other theories on how I can implement a worm- like movement?

Terraria worm video: http://www.youtube.com/watch?v=PhFR8bDQA5w

Shaun Wild
  • 583
  • 2
  • 5
  • 23

1 Answers1

1

Well you aren't quite far from the famous approach for Snake like games. Let the worm be represented as an array of segments. Head being the 0 element of array. Head should controll the movement of the body while each segment would follow its predecessor.

AB.
  • 406
  • 3
  • 7