Contact Recycling
Contact recycling reuses one-shot contact manifolds across full time steps when two bodies have barely moved relative to each other, making narrow-phase contact generation nearly free for resting stacks or objects riding together. A conservative-advancement-style bound combining translation and small-angle rotation times max extent measures relative movement against a cached relative transform. The key addition is updating each contact point's separation from a cached base separation using current body rotations, with the normal and anchor directions held fixed in world space. This permits tolerances of several centimeters while improving stacking stability. The technique needs one-shot, cached manifolds, has since been adopted by Avian and Rapier, and may resemble a legacy PhysX contact cache path.
Related posts
- Box2D 3.2
Box2D easyNoviceBox2D 3.2 runs roughly three times faster than 3.1, with the speedup broken down by source: contact recycling (~40%), solver algorithm refinement (~20%), AVX2 runtime dispatch (~15%), solver optimization (~10%) and broad-phase optimization (~10%), which compound multiplicatively. Following Jolt, body positions now use double precision while heavy math stays single-precision, raising the usable world size from about 16km to 1000km with little performance or memory cost. The release also adds recording and replay for debugging, which lays groundwork for snapshot/restore features such as rewind and networking, plus a new dynamic character mover.
- Inscribed Spheres
Box2D hardMasterInscribed spheres give a cheap upper bound on the separation achievable along any axis in the separating axis test (SAT): n·d − (rA + rB), where d joins the sphere centers. That one dot product can rule out a polytope face before the O(N) support search. Box3D extends this to edges by projecting d onto each edge's Gauss map arc, using a branchless closed-form test to drop whole edges before the edge-pair stage. On 32-vertex hulls this culls 86% of face tests and 98% of edge pairs, cutting the Convex Pile narrow-phase time by 62%, and SAT becomes roughly competitive with GJK except on long, skinny shapes.
- Understanding Garbage Collection in JavaScriptCore From Scratch
WebKit hardMasterJavaScriptCore's garbage collector is non-compacting, generational and mostly concurrent, with heavy use of lock-free programming. The explanation starts from a naive stop-the-world generational collector and adds pieces one at a time until it reaches JSC's real design. Along the way it covers BlockDirectory-based allocators (CompleteSubspace, PreciseAllocation, IsoSubspace), why per-object metadata is split between an inlined cellState and outlined isNew/isMarked bitvectors, and how write barriers and remembered sets keep marking correct. For incremental and concurrent collection it adds remembered-set scheduling and Space-Time Scheduler mitigations, which address up to 5x memory blowup.
- Introducing Kaboom
Replit mediumAdeptKaboom is a JavaScript game library from Replit aimed at beginners and intermediate programmers. Game objects are built from composable components, which are plain functions returning objects with lifecycle hooks (add, update, draw) and methods merged into the object. String tags let you attach group behaviors and collision handlers, and helpers like addLevel turn ASCII-art maps into levels. A dedicated Replit environment adds sprite editing, asset management and debug tools such as bounding-box display, time scaling, pause and frame stepping.
- Behind the build: 2025's BFCM globe in a pinball machine 🌎🕹️
Shopify Engineering mediumAdeptShopify's 2025 BFCM live globe was embedded in a browser pinball game built with three.js and react-three-fiber, streaming real merchant orders via server-sent events and reacting to sales milestones and first sales. The team switched from Rapier 3D to Rapier 2D physics for mobile performance, faking ramps with sensors that toggle collider sets, and cut the physics step from 2ms to about 0.2ms even with six balls and continuous collision detection. Lighting was baked in Blender with MeshBasicMaterials. The 85 dynamic table lights are rendered via an emissive texture plus a mask texture encoding light IDs in the red channel. A shader plays 128x32 dot-matrix sprite sheets, and AR support took about 100 lines with @react-three/xr.