Proposal for Simulating Early Multicellular Organisms as Soft Bodies

I’ve been pondering the early multicellular phase, and how to model those organisms that aren’t quite regular enough in shape yet for techniques like good old inverse kinematics to apply. Personally, I would also love to create something that bridges the gap between a clump of cells and a true “animal”, while showing the process of specialized cells adapting to behave independently in distinct roles. Previously I had performed some experiments with AI making some independent choices in a multicellular species, but this still leaves multicellular organisms as rigid “vehicles”, rather than little worms or tardigrades or tiny sea stars.

Currently, cell binding takes advantage of Godot’s nodes to make each bound cell a child of the colony leader, maintaining a constant offset position. What I propose is that we instead keep the cells as separate nodes, but link them with an invisible “lattice” of connections, like in a soft body simulation. These connections would NOT be defined by the player, but automatic from placement on the cell grid.

One cell is still the leader, and serves as a “first mover” based either on the AI’s choices or player actions. All other cells base movement decisions on the difference between the actual distance and angle, and a desired distance and angle.

If there is a little bit of a difference, the cell’s first movement priority is to move in a direction that minimizes these differences. If the difference is enough, the cell will be “pulled” by the rest of the organism at a rate faster than what the cell’s movement speed would allow. At extreme differences, the cell takes steady damage. These rules apply to both distance and angle, and would apply to both cells in the pair. I would envision the actual tolerances varying by membrane type, to account for wiggly worms and rigid algae balls alike.

(In future diagrams I will color the lines to show the strongest effect each cell is under)

A strange effect of this system is that the placement of the leader cell. With a leader in the front, you might see behavior like a gastrotrich, whereas with a leader in the center you might get more of a sea star, perhaps with independent arms that could reach for things independently while staying within movement bounds.


Maybe with enough damage you could even see an attacker using a wedge like thing to “rip off” a part of a creature without eating the whole thing:

A flaw I see in this design is that rear cells specialized for locomotion would not be able to travel at full speed, unless one of those cells was the leader, since in this model a cell will never “push” a leader ahead to where it wants to go, only keep up.

2 Likes

As for implementation, I don’t have any time in the near future for this big a refactor, but it’s not something we would need to run in before the end of microbe development anyway, for obvious reasons. If anyone has any interest in pairing with me on this, or taking it over, let me know and I’m happy to hand off ownership of the idea.

This is an interesting idea, but I think this goes a bit too far in the direction of colonies no longer really being a thing. If I were designing this feature I would pick slightly elastic physics constraints as the implementation mechanism. That avoids the problem with having slow cells or really fast cells in a colony, as they could still impart their movement to the colony leader and then get pulled along with the colony. The constraints can still be tweaked to only keep a relatively static position and break if there’s too much force required (but someone capable of writing a custom constraint type for a physics engine might be needed to implement that if no existing Jolt constraint type can be customized to do the right thing).

I expect a ton of bugs caused by this kind of soft simulation for cell colonies, for example when a random cell, a big chunk or even another colony overlaps into a colony, those kind of situations are going to cause so much physics glitching around or colonies breaking (and players will report this as a bug or annoyance when you can lose most of your reproduction progress in a few seconds to parts of your colony detaching). This is the reason why I originally implemented cell colonies as a single physics body, I had had bad experience with trying to even rigidly attach pili to a cell body. Even that kind of thing had many physics glitching potential places.