Knode makes Cable Physics the Puzzle.
by Vicente C.
Published |
13
Share
A cable in Knode can snag on a ledge, form a knot or slip back down after a long climb. Developer Denis shares how the simulation makes those puzzles work.
In Knode: Untangle & Connect, you untangle cables and pull them to the right sockets. Developer Denis from BusFactorOne wanted their weight to matter. If a cable starts slipping off a ledge as you haul it up, you can wrap it around a post to hold it there.

One level asks you to haul a 32-metre cable upward. It catches on things along the way, and you might be almost at the top before you realise it has snagged somewhere far below.

Most game engines can’t stop flexible objects from passing through themselves under enough force. Mine can’t either. But 99.8% of the time, it looks like it can. #GameDev #GamePhysics

[image or embed]

— BusFactorOne 🎮 Game in bio (@busfactorone.bsky.social) 29 de agosto de 2026 a las 19:47
Each cable is a chain of spherical particles. Springs were an option for connecting them, but Denis did not want to spend his time fighting their springiness. Instead, the particles move, then a solver corrects collisions and connections that have stretched too far.

A connection does not push neighbouring particles apart when they are close; their spheres handle collisions. The cable can fold into a loose loop, then tighten when you pull it. Here is the simplified stretch rule Denis shared:
# Simplified pseudocode shared by Denis

function limit_stretch(a, b, max_distance):
    offset = b.position - a.position
    distance = length(offset)

    if distance <= max_distance:
        return  # Slack is allowed. Don't push the particles apart.

    total_weight = a.inverse_mass + b.inverse_mass
    if total_weight == 0:
        return  # Both particles are fixed.

    direction = offset / distance
    correction = direction * (distance - max_distance)

    a.position += correction * (a.inverse_mass / total_weight)
    b.position -= correction * (b.inverse_mass / total_weight)
That is only the stretch check. The full solver repeats its corrections over several passes alongside collisions, grabbing and attachments. Denis also had to find the right amount of give: too little made the cables stiff, while too much made them feel like chewing gum.

Using spheres leaves possible gaps between particles. Denis tuned their size and spacing so cables would not normally slip through each other. 

He also limits how far a particle can move in each simulation step. If it moves too far, it could pass through another cable between collision checks.
A pile of cables brought its own problem. Small movements kept waking neighbouring particles, even after the pile looked settled. Denis had to tune when it could stop simulating and how quickly it responded when a player grabbed a cable again.

The simulation runs on the CPU in C++ through Godot's GDExtension. For the visuals, the game smooths the simulated points into a curve, and a shader draws the cable around it.

Want to learn Godot VFX? ✨
We just released our new Godot All About VFX Bundle, it covers shaders, particles, and VFX for 2D, UI, and 3D games with step-by-step examples in over 600 pages of content.
Jettelly wishes you success in your professional career! Did you find an error? No worries! Write to us at [email protected], and we'll fix it!

Subscribe to our newsletter to stay up to date with our latest offers

© 2026 Jettelly Inc. All rights reserved. Made with ❤️ in Toronto, Canada