Snake-like movement

How do you make a snake like movement with the bodies and joints following the head? I’ve been trying to figure out by myself but I’m stuck.

Hello,

I advice you to check this example : http://www.forum.compilgames.net/viewtopic.php?f=19&t=5580#p45344, it’s very popular last weeks :slight_smile:.

This example is made for GD4, but can be reproduced in GD5 as well.

Do you want movement like this?
https://www.bing.com/search?q=bing+snake&form=EDGTCT&qs=HS&cvid=fa504cc95b504e848f93cf0bf59319cc&cc=AU&setlang=en-US

A bit like that, but more “flowing” like movement. What I’m having trouble is to make the body and joint of the snake follow the head, which is a separate sprite. I’m still experimenting on it, but I’m stuck.

Hi Kink,
Thanks for sharing this project. I did refer to this, and recently been experimenting with it :slight_smile:

hi,
sorry to revive this post but can’t find the link
thanks.

This seems to be a recurring topic, so I’ll add my two cents.

I made a snake with GD5 (try it at Jukade - minigames for two by Gruk ) with separate head and body parts, positioning objects around others, but depending on the size of the screen and the game speed, the result doesn’t always look great… Might look better applying TimeDelta and SceneWindowHeight to all the movement events?

Could be easier to achieve with a shape painter object? I didn’t try because I wanted fancy graphics.

This is the link from Kink: Snake following