1. Lost Twins 2
  2. News
  3. Devlog#7: Introducing puzzle element - Rope

Devlog#7: Introducing puzzle element - Rope

Welcome to another entry in our game development log! In today's update, we'll be delving into the creation of one of another puzzle element - the rope. We'll walk you through our thought process, explain the technical aspects of our implementation, and discuss how we achieved the realistic physics and visual appearance of the rope.

In our development process, we explored various ways to implement ropes that could interact physically with characters and other interactive elements. We eventually settled on using Unity's Hinge Joints to simulate physics.

To achieve this, we connected a series of rigidbodies along the length of the rope, linked together by Hinge Joints. We were able to modify the length of each rigidbody piece, using an editor script, depending on the required length of the rope in a particular area of the game. To ensure the rope behaved realistically, we adjusted various attributes of the rigidbodies and hinge joints, while also clamping values to prevent the rope from behaving erratically.

[previewyoutube][/previewyoutube]

Once we had nailed down the physics, we moved on to the visual aspect of the rope. We used Unity's LineRenderer component to create the rope's visual representation. Initially, we used the edge positions of each rigidbody as the points for the LineRenderer. However, we noticed that this resulted in a blocky appearance, and increasing the number of rigidbodies affected performance. To address this issue, we used a parameterized Catmull-Rom spline to smooth out the rope's visual appearance. We then passed the smoothed out points to the LineRenderer component.

[previewyoutube][/previewyoutube]

We hope you enjoyed learning about the creation of our rope puzzle element, and gained some insight into the technical and creative aspects of game development. As always, we appreciate your support and feedback, and we can't wait to share more updates with you in the future.

Stay tuned for our next entry!

Best Regards,
Playdew Team