Multiple Worlds/Engines randomly "freezing"
See original GitHub issueI’m currently working on a multiplayer game, each server has multi-world support. For each world, I have to create a Matter World
, Engine
, and Runner
(nothing in the documentation says I can run multiple World
s with the same Engine
).
Randomly, either the Engine
or the Runner
for all of the worlds completely stops working, freezing physics on the server-side. There is no pattern, it just happens. The problem does not resolve itself until the server is completely restarted.
For context, there are roughly 10 - 12 worlds running simultaneously per server, each world can have anywhere from 10 to 100 entities (projectiles and players) at a time.
Is there a limit to how many Engine
s I can have running concurrently without Matter breaking?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Windows 10 is randomly freezing up multiple times a day.
Windows 10 is randomly freezing up multiple times a day. ... 1) Here are the fixes that work most for Windows 10 Freezing:...
Read more >How to Fix the Windows 10 Freezes Randomly Issue - TechLoris
Eight different methods to try when your computer freezes randomly. Easy to follow steps with pictures will get your computer running ...
Read more >Windows 10 Freezes Randomly Fix! PC Freezes ... - YouTube
Windows 10 Freezes Randomly Fix! ✓ PC Freezes While Playing Games | PC Keeps Freezing ! | 2022Fix "Windows 10 Freezing Problem" |...
Read more >Why my computer keeps freezing and how to fix it
Let's first discover why computer freezes happen. Too many software products are running in the background. Every program that is running on ...
Read more >5 Ways to Fix Microsoft Word If It Keeps Freezing When It Saves
If your Microsoft Word document is corrupted, it might cause Word to freeze when saving. Here's how to troubleshoot the issue.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nope, I think I’ve fixed everything. I resolved some other performance issues (like relying on getters) that had nothing to do with Matter. Thank you!
I fixed the issue by using a separate engine update loop from the game loop (just a
setInterval
running at 60 fps) for each world.My game loop runs at 50ms (all worlds and entities are updated, entity update packets are sent every 50ms), but I can’t seem to run
Engine.update
every 50ms, even when specifying50
as thedelta
. The updates don’t scale with the delta and the Engine move 3x faster than real-time, it only works at 60 fps.Also, to clarify, there was no resource leakage and minimal CPU usage when using the
Runner
.