godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.04k stars 20.19k forks source link

Possibility to keep Godot's old physics engine. #29161

Closed Malkverbena closed 3 years ago

Malkverbena commented 5 years ago

Godot version: 3.1 compiled from the master brunch

OS/device including version: Ubuntu 19.04 Ryzen 7 1700x - 16GB ram Radeon RX 580 Series (POLARIS10, DRM / 3.27.0, 5.0.0-15-generic, LLVM 8.0.0. )

Issue description: As far as I know Godot's old physics engine will be retired. But I was porting an old multiplayer demo to godot 3.1 and realized that using godot's old physics engine it is possible to handle almost 1/3 more Rigidbodies before having any decrease in FPS. For the players this doesn't make much difference due playeres don't need to deal with so many Rigidbodies to the point of have a significant decrease in FPS, but for servers I see a great advantage in use the old engine. It's also use Bullet on the client and Godotphysics on the server. They talked very well in my tests. I understand that removing the old engine will decrease the size of the engine, but since the old engine is faster than Bullet and is more suitable for servers, I propose that the old physics engine be keeped for performance reasons. It's also worth remembering that using Bullet is still subject to many bugs.

Minimal reproduction project: I made this litle project to compare https://docs.google.com/uc?export=download&id=1Hbv3Br5vFGffbzCQUDs7Y7Qtz8fEGgGn

Steps to reproduce: Switch the physics engine between Bullet and GodotPhysics on projectsettings. Run the project and compare the FPS.

eon-s commented 5 years ago

Godot physics will not be dropped but updated in the future according to devs, for 4.0 or 4.1 (it is not clear on the roadmap, though).

NathanWarden commented 5 years ago

That's interesting. It's probably hardware dependent.

For me the opposite happens. The framerate drops for Godot physics at about 750 rigidbodies but gets over 1600 with Bullet before it drops.

Godot 3.1.1 GTX 1070 Intel Core i7-6700K 32GB RAM

But like @eon-s said, they have plans to improve Godot physics in the future, possibly add support for PhysX, or replace Bullet with PhysX.

Malkverbena commented 5 years ago

@NathanWarden Thats a big difference. I got 950 rigidbodies using Godot and 700 using Bullet. I happy if Godot physics wont's be dropped.

KoBeWi commented 3 years ago

I can confirm that there are plans for update/rewrite of Godot physics, scheduled for Godot 4.1. So I guess this can be closed.