
Real-Time Collision Detection
by Christer Ericson · first published 2004
38mentions
23recommended by
27HN commenters
2011–2025first – last mentioned
85% recommend15% neutral
Why HN recommends it
Readable reference on practical collision detection for games and physics engines, with C++ code and spatial data structures that apply to 3D work generally; suits programmers implementing their own collision.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








…with some really good practical examples if I remember right. Great book, I used to refer to it as 3D "data structures" book which is very much in theme with this thread. [1] https://www.amazon.com/Real-Time-Collision-Detection-Interac...
on “Ask HN: What are some cool but obscure data structures you know about?” ↗Christer Ericson's book "Real-time Collision Detection" covers all this and much, much more in a very readable (IMO) fashion. The companion website for the book is at http://realtimecollisiondetection.net/ and the blog on that site can be just as invaluable…
on “How I implemented 2D collision detection in Pistol Slut” ↗…introductions. Some of that might be hindsight bias on my part; I'm curious what others think who first learned the subject from the third edition. I also want to give a shout-out to Christer Ericson's Real-Time Collision Detection book. It's full of clear explanations and practical, hard-earned knowledge that you can't get anywhere else. Plus, the accompanying code is robust and well written, a far cry from the usual crap that…
on “Gorgeous Unreal Engine 4 brings direct programming, indirect lighting” ↗Christer Ericson's 'Real Time Collision Detection' is a killer reference on the topic, and he used to run a super interesting blog [1] on various mathy things related to game development. [1] http://realtimecollisiondetection.net/blog/
on “Collision Detection, Part 2” ↗…who writes lots of performance critical stuff in C++ I would combine this with something like Aho: "Foundations of computer science" and Loudon: "Mastering algorithm with C" and for perfomance Ericson: "Real time collision detection" and Agner Fog's excellent optimization resources (http://www.agner.org/optimize/). This book helps to bring out the view that isomorphism is the superpower of applied computer science - once we identify…
on “The Algorithm Design Manual” ↗Christer Ericson and Gino van den Bergen both have solid and pretty accessible books on collision detection. Christer's Real Time Collision Detection, in particular, is really digestible in bits and pieces as needed for various applications (and he provides code for each example which rocks).
on “Ncollide – 2D and 3D collision detection library” ↗…solve the swept sphere. In fact so much of what is on shadertoy looks very familiar to video game 'game physics' programmers because a lot of it is related to collision detection. See the Orange book on real-time collision detection (Christer Ericson) for a lot of good code.
on “Ask HN: What piece of code/codebase blew your mind when you saw it?” ↗…http://www.amazon.com/Game-Coding-Complete-Third-McShaffry/d... Those two will clean up most of the biggest newbie mistakes, especially the Gregory one. I also suggest this book for collision detection: http://www.amazon.com/Real-Time-Collision-Detection-Interact... However, I haven't found the book that can adequately explain integrating collision into the rest of the game. It's a tricky subject which I'm still learning and might write about someday.
on “Ask HN: (html5) game development books for a seasoned programmer?” ↗The quality of most such articles really is extremely low. Apart from a few books from experts like the Ericson "Real-Time Collision Detection," and the codebase for open source engines, public knowledge about this stuff is basically missing from the Web. At least these days there are good books. Ten years ago, AFAIK, your best options for…
on “3D Theory - Collision Detection” ↗…you dig a bit deeper into it, you'll find that the hard part is collision detection/response. A nice intro is the two tutorials at http://www.metanetsoftware.com/technique.html. An in-depth reference is Real-Time Collision Detection by Christer Ericson. A community related to this is http://www.bulletphysics.org/Bullet/phpBB3/.
on “Tearable Cloth Simulation in JavaScript” ↗…equation. These books discuss performant (and sometimes complex) C++ code - in the domain of computer graphics. http://www.amazon.com/Physically-Based-Rendering-Second-Edit... http://www.amazon.com/Real-Time-Collision-Detection-Interact... About how to use the new threading standard: https://www.manning.com/books/c-plus-plus-concurrency-in-act...
on “Writing high-performance servers in modern C++” ↗Along similar lines Real-Time Collision Detection[1] is a tour-de-force in spatial partitioning algorithms. It's basically data-structures for 2D/3D along with some really good coverage of common floating point numerical issues and cache friendly algorithms.…
on “A dive into spatial search algorithms” ↗I would also add Real-Time Rendering[2] and Real-Time Collision Detection[3] to the list of absolutely essential game development books. [1]https://www.amazon.com/Engine-Architecture-Third-Jason-Grego... [2]https://www.amazon.com/Real-Time-Rendering-Fourth-Tomas-Aken... [3]https://www.amazon.com/Real-Time-Collision-Detection-Interac...
on “Ask HN: What are the best textbooks in your field of expertise?” ↗Real-time collision detection (Real-Time Collision Detection (The Morgan Kaufmann Series in Interactive 3-D Technology) https://www.amazon.com/dp/1558607323/ref=cm_sw_r_cp_apa_i_bR...) also deserves a spot on this list.
on “Programming Books You Wish You Read Earlier” ↗Yup, so much truth here. Take a look at Real-time Collision Detection[1]. I takes a great look at both algorithmic complexity and cache awareness. That's how it should be done. [1] https://www.amazon.com/dp/1558607323
on “New Grad vs. Senior Dev” ↗