About Collision System in Godot

There are several collision algorithms such as Octal Tree for collision detection in 3D. (see image (b) below)

For Godot, what is the algorithm being used in 3D?

In the case that we have many soldiers running around and shooting many projectiles, what would be the recommended way to implement the collision system in Godot?

If I remember right Godot uses quad/oct trees for 2d/3d collision broad phase.

Your optimization question is harder to answer. I’d recommend you test and see whether you need to do anything. Most games don’t need to do custom collision systems since you can get pretty far by limiting the checked colliders (e.g. bullets don’t check for each other) and other built-in optimizations like limiting physics tick rate.

If you have a lot of colliders you need to check for (lets say thousands or tens of thousands) you can implement a specialized custom collision sim in a higher perfomance language e.g. C++ or C#.

Writing your own collision sim and syncing it to godot is a lot more work, however, than just using Godot’s built-in physics.