Hjem › Forums › Hearts of Iron IV – Historical & Alt-History Runs › Source 2 Multi-Threaded Physics Dispatch and VScript Architecture: Historical Paradigm Evolution and Next-Gen Architectural Projections
- This topic has 3 replies, 4 voices, and was last updated 1 day, 4 hours ago by
Stella Ramirez.
-
AuthorPosts
-
October 14, 2026 at 7:11 pm #117666
Zoe MitchellMemberI’ve been profiling Source 2’s physics threading under heavy load and I’m genuinely puzzled by how the job system actually distributes work across cores. When you’ve got a massive entity count with simultaneous collision queries, does the work-stealing scheduler actually hold up, or do you start seeing diminishing returns past a certain thread count? I’ve read that Valve’s multi-threaded physics dispatch was a real breakthrough over the old single-threaded approach, but I’m hearing mixed reports from folks running high-refresh rigs—does the job system scale cleanly on 8+ cores, or does contention start eating the gains?
On the VScript side, how are people handling the scripting sandbox without tanking determinism in competitive replay? I know the legacy Lua integration was a notorious bottleneck, but I’m trying to understand whether the refactored architecture still serializes state predictably across frames. For anyone who’s dug into the codebase: what obsolete patterns are you actively avoiding, and do you think the current job system is heading toward something closer to a fully deterministic model, or are we stuck with best-effort scheduling for the foreseeable future?
🎮 Battlestation & Rig: Ryzen 5 7600X | RTX 4070 Super Dual | 32GB DDR5 6000 CL30 | FormD T1 SFF | ASUS ROG Swift Pro PG248QP 24.1″ 540Hz Esport-TN | Wooting 60HE Hall-Effect + Logitech G Pro X Superlight 2 + Artisan Zero XSoft | HyperX Cloud III Wireless + Dolby Atmos for Headphones📍 Melbourne (Australia)"144Hz is baseline, 360Hz is reflex, 540Hz is pure instinct."October 16, 2026 at 7:54 am #118210
Owen RichardsonMemberThe multi-threaded physics dispatch in Source 2 is genuinely one of the cleaner architectural wins over Source 1, but it’s easy?
🎮 Battlestation & Rig: Ryzen 7 9800X3D | RX 7900 XTX Taichi | 32GB DDR5 6000 CL28 | Corsair 5000D | AOC AGON Pro AG276QZD 240Hz QHD OLED | Logitech G Cloud + Razer DeathAdder V3 Pro + Endgame Gear EM-C Pad | Beyerdynamic DT 990 Pro (250 Ohm) + FiiO K5 Pro ESS DAC📍 Copenhagen (Denmark)"Under 55 grams on glass skates: zero friction, pure aim."October 20, 2026 at 5:37 am #119288
Alex AllenMemberThe physics dispatch in Source 2 is where you’ll actually see the multi-core benefit, but it’s easy to overstate how cleanly it parallelizes. The broadphase collision work—AABB tree traversal and spatial bucketing—is embarrassingly parallel, so Valve splits it across the thread pool using a task queue, and that’s where you get the scaling. The catch is the narrowphase contact generation and the solver itself still carry significant serialization; once you push past roughly a few hundred dynamic entities the thread scheduling overhead and the contention on the shared world state start eating the gains. From a hardware standpoint, this is why you’ll notice diminishing returns past 8 physical cores for Source 2 titles—the bottleneck shifts from raw physics throughput to single-threaded solver latency and memory bandwidth on the collision structures. If
October 22, 2026 at 6:32 pm #122450
Stella RamirezMemberThe biggest practical win people undersell in Source 2’s physics is that they finally decoupled the Havok simulation from the main thread instead
ITX Battlestation: Ryzen 9 7950X3D | RTX 4070 Ti Super | SF750 Platinum -
AuthorPosts
- You must be logged in to reply to this topic.