Faster Physics: Part 3 — Tying Up Loose Ends
We left off after I had completed the Broadphase transplant. Broadphase collision detection was now fast, but we were still spending lots of time in the narrowphase, as well as in other various parts of the physics engine. It seemed like a good time to go back to stage 1. ...Read more
Faster Physics: Part 2 — Spatial Hashing
At this point I had run out of ideas for simple fixes, so the next step was to start ripping out parts of p2 and replacing them with my own. p2 tries to not make too many assumptions about your use case out of the box. It’s a jack-of-all-trades-master-of-none sort of deal, so it’s pretty easy to run up against its limitations. A quick peek at the profiler confirmed my suspicions that collision detection is... ...Read more
Faster Physics: Part 1 — Turning Knobs
Up until recently, the playfield in my pinball game had been pretty sparsely populated, and performance had been ”fine”. But then I started really fleshing out the table and adding a lot more objects, and that’s when my computer started to sound like a 747 preparing for takeoff. To save my laptop and my eardrums, I decided to do some performance improvements. ...Read more