godotengine / godot-demo-projects

Demonstration and Template Projects
https://godotengine.org
MIT License
5.88k stars 1.64k forks source link

High Perf Optimization Demo, showing batch 3d object workflow from Script #373

Open jasonswearingen opened 4 years ago

jasonswearingen commented 4 years ago

Describe the project you are working on: C# Async Job System for high performance. (development taking place here)

Describe the problem or limitation you are having in your project: Lack of information showing the highest performance way of creating 3d objects, moving them, and applying physics.

Describe how this feature / enhancement will help you overcome this problem or limitation: A demo showing the highest possible efficiency for batch 3d object creation, movement, and physics would be a great reference for me, and anyone else looking to write a high performance game in C# or GDScript.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:

A worker thread that creates 100 cubes, moves them around randomly, and haves them bounce off of eachother.

Describe implementation detail for your proposal (in code), if possible: Needs someone familiar with core features (espcially VisualServer and Physics) to make a demo.

Care taken to verify race conditions don't occur. Maybe this can be verified by a seperate demo where a single object moves in a pre-determined loop, and the previous position is validated in code and visually.

jasonswearingen commented 4 years ago

additional backstory on how this could help devs understand the engine: https://godotengine.org/qa/58614/multithreaded-architecture-practice-interact-physics-async

jasonswearingen commented 4 years ago

also, if there isn't a "batch 3d object workflow", that's okay, but please create some tutorial/sample showing what the most computationally efficient workflow for per-frame updates is.

Calinou commented 1 year ago

The Bullet Shower demo from Godot 2.x was readded in 3.x and 4.0: https://github.com/godotengine/godot-demo-projects/tree/master/2d/bullet_shower

A similar demo could be added to 3D, but using low-level servers won't improve performance as much as you'd think until something like https://github.com/godotengine/godot-proposals/issues/2380 is implemented (also for 2D).