Commit Graph

81 Commits

Author SHA1 Message Date
NotAlwaysTrue
b5b25a2ccb oops... 2026-04-30 22:12:12 +08:00
NotAlwaysTrue
25683dcf39 Reapply "OBT1.1.0 Merge branch 'dev_pte' into dev"
This reverts commit 046483b9da.
2026-04-30 21:59:54 +08:00
NotAlwaysTrue
02689d0d86 Refactor single-thread worker
Re-parallel Hull Update
Use new gap shaffle algorithm
2026-04-30 20:05:23 +08:00
NotAlwaysTrue
d16707a2f3 OBT/1.0.16
Fixed the GapList bug again to see if this will work

P L E A S E   W O R K
2026-02-13 15:02:17 +08:00
NotAlwaysTrue
740ace88f0 OBT/1.0.15
* Removed PF support again
Fixed Object reference not set to an instance of an object exception in EnemyAIController.cs UpdateLimbAttack()

* Reverted pervious fix on EnemyAIController bcuz the fix will not fix anything
Reduced MaxDegreeOfParallelism by 1 bcuz already a task there

* Re-removed all PF related stuff to fix issue
Removed all RUN_PHYSICS_IN_SEPARATE_THREAD related code because these codes are no longer functional
Removed a duplicated loop in GameScreen
Removed mulitple unnessary parallel operations

* Potentially fixed #44 and #43

* added a ToList for Gap.GapList
2026-02-09 15:34:07 +08:00
NotAlwaysTrue
8bfe8a2c37 OBT/1.0.14
Fixed parallelism count issue
Added SingleThreadWorker to handle single-thread related works
Fixed incorrect order when updating gaps
Potentially Fixed #39
2026-01-08 12:40:30 +08:00
NotAlwaysTrue
82d26b5bb8 OBT/1.0.11
Fixed a bug that caused the server to stop responding
Fixed an issue in gap.Update that may cause the server to crash
2025-12-30 17:41:50 +08:00
NotAlwaysTrue
85b71f1dd6 Revert a change made in 1.0.9 due to large-scale performence impact.
Note : This may cause server crash
2025-12-29 22:36:38 +08:00
NotAlwaysTrue
190c98d8f2 Fixed 2 issues
Fixed an issue causing gap.update crashes the game(engine issue)
Fixed an potential issue that on MacOS we cannot get core count and cause MaxDegreeOfParallelism will be set to 0. Now if we cant get that number we simply use a fixed 16 instead
2025-12-29 16:28:34 +08:00
Eero
046483b9da Revert "OBT1.1.0 Merge branch 'dev_pte' into dev"
This reverts commit 177cf89756, reversing
changes made to 42ba733cd4.
2025-12-29 11:18:11 +08:00
Eero
177cf89756 OBT1.1.0 Merge branch 'dev_pte' into dev 2025-12-29 11:15:41 +08:00
Eero
e167a34f32 Make entity lists thread-safe with copy-on-write wrappers
Replaced static entity lists (e.g., HullList, GapList, MapEntityList, etc.) with thread-safe copy-on-write wrappers to improve concurrency and prevent race conditions. Updated usages and related methods to support the new thread-safe collections, ensuring atomic operations and lock-free reads throughout the codebase.
2025-12-28 21:59:03 +08:00
Eero
f485583621 Unstable 0.2 Defer physics operations during parallel updates
Introduces a thread-safe queue for deferring physics operations (such as body creation and transforms) to the main thread, ensuring Farseer Physics is not accessed from parallel contexts. Updates Holdable, Item, MapEntity, and GameScreen to use the new PhysicsBodyQueue for safe physics operations during parallel updates, and refactors PhysicsBodyQueue to support general deferred physics actions.
2025-12-28 15:10:06 +08:00
Eero
49355fe32b Unstable Add thread-safe queue for deferred physics body creation
Introduces PhysicsBodyQueue to safely defer physics body creation to the main thread, addressing thread-safety issues with Farseer Physics during parallel updates. Updates LevelResource, TriggerComponent, BallastFloraBehavior, and MapEntity to use the queue for all physics body creation and refresh operations, ensuring they are processed outside of parallel loops. Also adds cleanup of the queue at round end.
2025-12-28 14:42:17 +08:00
NotAlwaysTrue
42af6f2ec0 Fixed #22 2025-12-28 13:02:31 +08:00
Eero
46595b1399 WIP Make collections thread-safe and add safe iteration
Replaced static lists and dictionaries with thread-safe ConcurrentDictionary or ThreadLocal collections for various item components and systems. Updated all relevant code to use snapshots (ToArray, ToList) for safe iteration, and added helper methods for marking and clearing changed connections. These changes improve thread safety and prevent potential concurrency issues in multi-threaded scenarios.
2025-12-28 04:59:56 +08:00
NotAlwaysTrue
a44d89f953 Revert "Revert back to 1.0.3" 2025-12-27 16:05:20 +08:00
NotAlwaysTrue
b35eee5561 Revert "OBT/1.0.4" 2025-12-27 15:32:16 +08:00
NotAlwaysTrue
7e899d900a Added ClientCount for PerformenceMonitor
Add a marker to help distinguish EP from other SV Executables
Fixed a "Failed to copy object. Source is null." introduced by last update
Uses dynamic ThreadCount instead of fixed 16
Re-Removed most PF support
Re-Parallelzed Level update and Character Update(a conflict warning will be issued
2025-12-27 13:19:36 +08:00
Eero
6032010847 Improve parallelization in map and game screen updates
Refactored update logic in MapEntity and GameScreen to use more granular and conditional parallelization, reducing unnecessary allocations and improving performance. Updates to hulls, structures, items, and physics bodies are now executed in parallel where safe, and item updates are only performed when necessary. Also parallelized submarine and physics body transform updates.
2025-12-26 21:04:07 +08:00
NotAlwaysTrue
e715fdc835 Fixed #10
Fixed #12
2025-12-26 01:16:05 +08:00
eero
5b823d8684 Clarify thread safety in update methods
Updated comments in GameScreen.cs to indicate that StatusEffect.UpdateAll and Character.UpdateAnimAll are not thread-safe and must be executed on the main thread. Also removed a non-English comment from MapEntity.cs for consistency.
2025-12-22 18:07:17 +08:00
eero
b146fa326d Refactor MapEntity.UpdateAll for improved parallelism
Rewrites MapEntity.UpdateAll to use more granular parallelism, reducing contention and improving performance by parallelizing hull, structure, and gap resets, while keeping order-dependent and non-thread-safe updates sequential. Updates GameScreen to pass ParallelOptions to UpdateAll.
2025-12-22 17:48:14 +08:00
NotAlwaysTrue
d98f9de5d4 Updated PM, uses 60s average to match message update time, modified message to display Server Running Time(Total Time Elapsed) in h:m:s.ms format
Readded perviously removed update interval condition
2025-12-22 00:24:33 +08:00
NotAlwaysTrue
f87e943a1a Move a lot of thing around to fix collection was modified.
Note: For now I can only adjust orders and cannot make some real thing. It will take time to check and refactor everything necessary.
2025-12-20 14:16:51 +08:00
NotAlwaysTrue
2f845b40ca Moved Item related stuff to the end of MapEntity.UpdateAll to avoid issues
Added a threadlock to avoid some issue(someday i will take care of)
Add a function that automatically log server performence every 60s
2025-12-20 00:08:42 +08:00
NotAlwaysTrue
fff157d5ca Added a Performence Monitor for debug
Many multi-threading work in ServerSource
2025-12-19 13:43:12 +08:00
Evil Factory
352625af28 Merge remote-tracking branch 'upstream/master' 2025-12-08 12:35:44 -03:00
Markus Isberg
598966f200 Release 1.11.4.1 (Winter Update) 2025-12-08 14:56:47 +00:00
Evil Factory
da13162c60 Merge branch 'master' of https://github.com/Regalis11/Barotrauma 2025-09-25 09:00:20 -03:00
Regalis11
b2d91cde7c Release 1.10.6.0 - Autumn Update 2025 Hotfix 1 2025-09-25 11:11:35 +03:00
EvilFactory
2368640841 Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2025-06-17 15:45:16 -03:00
Regalis11
ea5a2bc693 Release 1.9.7.0 - Summer Update 2025 2025-06-17 16:38:11 +03:00
EvilFactory
103871a4e9 Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2025-04-10 10:37:09 -03:00
Markus Isberg
a4a3427e4e Unstable 1.8.4.0 2025-03-12 12:56:27 +00:00
EvilFactory
e163f7ed73 Merge remote-tracking branch 'upstream/master' into develop 2024-06-18 12:19:13 -03:00
Regalis11
230d1b6e78 v1.5.7.0 (Summer Update) 2024-06-18 16:50:02 +03:00
EvilFactory
0a9ff43986 Merge remote-tracking branch 'upstream/master' into develop 2024-04-24 12:20:11 -03:00
Regalis11
ff1b8951a7 v1.4.4.1 (Blood in the Water Update) 2024-04-24 18:09:05 +03:00
EvilFactory
448e4cdfbb Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2023-12-14 11:56:39 -03:00
Regalis11
b91e85559d v1.2.6.0 (Winter Update) 2023-12-14 16:11:27 +02:00
Markus Isberg
fb5ea537bf Unstable 1.2.4.0 2023-11-30 13:53:00 +02:00
EvilFactory
9838cc59ee Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2023-10-19 12:18:30 -03:00
Markus Isberg
cf8f0de659 Unstable 1.1.14.0 2023-10-02 16:43:54 +03:00
EvilFactory
fd74c08a8f Removed GapUpdateInterval (no longer required) 2023-06-15 13:53:28 -03:00
EvilFactory
15daa64f66 Merge https://github.com/Regalis11/Barotrauma into develop 2023-06-15 12:13:50 -03:00
itchyOwl
83de72e3d2 v1.0.20.1 (summer patch) 2023-06-15 16:46:54 +03:00
EvilFactory
4a229c6427 Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop 2023-03-13 13:32:14 -03:00
Regalis11
bf73ddb6c3 v1.0.7.0 (Full Release) 2023-03-13 10:30:37 +02:00
Regalis11
2c5a7923b0 Faction Test v1.0.1.0 2023-02-16 15:01:28 +02:00