Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

share|improve this question
possible duplicate of How To Approach 360 Degree Snake – Byte56 Mar 22 '13 at 20:34

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.

share|improve this answer
This is answered in the duplicate already. – Byte56 Mar 22 '13 at 22:07
Oh :) Well I didn't know. – AB. Mar 22 '13 at 22:09
No worries, you can check the comments below the question for information about closing before answering, just so we don't have any wasted effort. – Byte56 Mar 22 '13 at 22:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.