Comments (9)
if this game engine never test with a multiplayer mode or multi room mode.
When you offer multiple rooms for players to use, you generally run multiple Godot processes, each hosting their own server. Hosting multiple rooms in the same process makes parallel resource usage harder (if not impossible), so it's not recommended.
Container orchestration solutions like Kubernetes can be handy for this at a large scale (though at a smaller scale, they can be overkill).
Thank you for your help! The method is effective. After testing, splitting each world3d into an independent process can effectively improve the FPS. However, the memory consumption has also increased significantly.
Based on the tests, with the multi-process approach, seven rooms already used up 88% of my memory (32G). While in the single-process multi-room scenario, with 20-50 rooms, the memory usage did not see a significant increase and was maintained around 20% of (32G). Is there a compromise approach?
from godot.
if this game engine never test with a multiplayer mode or multi room mode.
When you offer multiple rooms for players to use, you generally run multiple Godot processes, each hosting their own server. Hosting multiple rooms in the same process makes parallel resource usage harder (if not impossible), so it's not recommended.
Container orchestration solutions like Kubernetes can be handy for this at a large scale (though at a smaller scale, they can be overkill).
from godot.
The purpose of sharing different world3d processes is to ensure that the server can unify monitor the progress of different rooms. While they are completely independent world3d, so there is no need to share or compete for content. I think the best way is that Godot provides a parameter that allows me to set the interval at which different windows trigger the process and physicsprocess, and they do not need to compete for high efficiency running with each other.
from godot.
I'm still unable to resolve the second issue mentioned - when the character moves and collides with walls, with 10 rooms and 10 characters in each room for a total of 100 characters, as long as there are continuous collisions with walls, the fps will remain below 10. However, if I remove the call to move_and_slide, the fps returns to normal (only leaving the animations and attack detection etc).
I think the performance issue in 3d is definitely caused by severe bugs in the move_and_slide method.
At least collisions should be cached and not repeatedly calculated when a character moves to an area that has already been passed through before to avoid duplicate collisions.
Especially in some irregular scenes, like terrains created by the heterrain plugin, it would be more severe. Entering corners of walls alone would cause fps to drop below 10 (recovering if move_and_slide is not called).
this test with godot4.3.dev6
from godot.
https://github.com/Gamepro5/Custom_CharacterBody3D_Movement_System
This approach seems to improve performance
from godot.
@yythlj Are the colliders made of cubes or are they more complex? How did you create them?
from godot.
@Zireael07
@Calinou
no they just is the normal box shape and run on the headless mode.
I sincerely apologize, this was my mistake. I ran 10 rooms with 10 players each in a same process and use different world3d.
When I changed it to run each room in its own process, with 20 processes total, the FPS increased to 60. The only downside is the memory usage increased.
However, this does greatly bother me, because there are many scenes that contain static objects that never change (such as platforms, floors, etc.). But due to needing to run in multiple processes, the memory consumption is quite large.
Having static objects like floors and platforms duplicated across each process does waste memory, since they never change or need to be simulated independently.
In networked multiplayer games, it is very common for the Godot server to need to run multiple identical instances of the same scene, as is the case here.
thanks
from godot.
the answer is never create multi window on the server, use different process instead
from godot.
um...memory use too much.the 20 process only start up 5
(32G windows)
if in the same process,the memory just a llite when 10 room
from godot.
Related Issues (20)
- Semingly random crash HOT 3
- Point gaps between tiles in a gridmap ... the cause may be an error in the rendering server for surfaces with compression HOT 4
- Dev 6: Double clicking on variable names followed by assignment or compare operators, includes the right side value HOT 4
- SSR, SSAO, DOF far blur and DOF near blur, seem to disable sky contribution. HOT 3
- godot focus is not working correctly
- For scripts, Godot treats paths as case-insensitive in attach script window, but case-sensitive when running the project. HOT 4
- SpotLight3D shadows exhibit flickering when moved around. HOT 8
- Godot window changing style bug HOT 1
- Editor Viewport Settings is Forgetful! (Not saved in any manner) HOT 6
- One-click deploy to web visible in new projects (without export setup) HOT 2
- Godot crashes HOT 2
- Scaling RichTextLabel does not update hint tooltip text popup location
- Older versions of SCons are no longer supported HOT 3
- Duplicate input events on TabContainer _gui_input() and _input()
- Godot 3.6 Beta 5 does not bake 3D models via merge_meshes HOT 1
- [4.3] Editor renders pixelated on macOS + external display HOT 2
- SSR and SSAO seem to stop working when transparent background is enabled. HOT 1
- ContextMenu `Copy Error` is off in `MSBuild` Panel
- Godot C# exports crash on launch if solution/project/assembly names don't match HOT 2
- [Source Generator] Unable to disable multiple source generators using `GodotDisabledSourceGenerators` property HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.