Dev Log #4 – Moving our heaviest code from GDScript to C++

Our rule: the game has to run smoothly even on an older CPU’s integrated graphics. Once the screen gets busy, GDScript became the bottleneck, so we moved the hot paths to C++ with Godot’s GDExtension.
What moved: the physics solver (~2,400 lines) and the effect drawing. Everything else stays in GDScript, so we still iterate fast.
A line-by-line port, not a rewrite. Each physics step runs in both versions and every value is compared bit for bit. Draw commands and frames are checked too. The game feels exactly the same, just faster.
Busiest moment, Intel UHD 730 integrated graphics:
- Original GDScript: 37.7 ms per frame
- C++ port: 29.6 ms
- C++ + batched drawing: 23.3 ms
- Stutter frames (over 33 ms): 47 → 1
The GDScript version is still there as an automatic fallback.
Why not Rust? godot-cpp is Godot’s official binding, and our real risk was getting different results, which only bit-for-bit testing catches.
Also posted on Steam.