Hi everyone,
Thanks for looking at my thread. I'm fairly new to game development and I've hit a road block. I am trying to make an anaconda clone, https://youtu.be/h22thYhPCNw
I cannot figure out how make the tail follow the head. If anyone has any examples that would be great. If not my question is what is the concept behind making the tail follow the head not on a grid?
All I could think of is storing every small movement and rotation in a table. Storing movement and rotation seems like a lot of overhead.
I'm stuck and it sucks
Anaconda clone help
Re: Anaconda clone help
You can store segments in the table. If I understand correctly, there are three possible types of segment, maybe two: 1) a straight segment, 2) a curved segment with a certain radius and 3) a curved segment with a wider radius. I don't know what the speed depends on, maybe it's controlled by the player? and whether the turn rate varies when going fast, but if there are two speeds and the turn rate is constant no matter the speed, then there are two radii. Maybe the turn rate is higher when going faster, resulting in the same radius, I don't know.
Then you need to replay the segments in order from head to tail, to obtain the positions. You need to keep track of the length, in order to know where to stop and which segments can be deleted. The formula for the straight segments is the regular distance formula; the formula for the curved segments is angle in radians times radius.
Then you need to replay the segments in order from head to tail, to obtain the positions. You need to keep track of the length, in order to know where to stop and which segments can be deleted. The formula for the straight segments is the regular distance formula; the formula for the curved segments is angle in radians times radius.
Re: Anaconda clone help
Thanks for the help, I thought the table route would not work, but i made a concept and it seems to be the route I want. I'm going to mess with it more this weekend.
Thank you,
-Toast
Thank you,
-Toast
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], rabbitboots and 7 guests