Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Other Sellers on Amazon
+ $3.99 shipping
+ Free Shipping
+ $3.99 shipping
2D Game Collision Detection: An introduction to clashing geometry in games Paperback – October 2, 2012
"Rebound" by Kwame Alexander
Don't miss best-selling author Kwame Alexander's "Rebound," a new companion novel to his Newbery Award-winner, "The Crossover,"" illustrated with striking graphic novel panels. Pre-order today
Frequently bought together
Customers who bought this item also bought
Customers who viewed this item also viewed
About the Author
Thomas Schwarzl is a professional developer, game designer and humble digital artist. Since 2001 he works in several game development areas like programming, game design, 2D graphics and 3D modeling. But by far his favorite occupation is cranking out code while sipping steaming coffee. He resides in the Alps, right in the heart of Austria.
If you buy a new print edition of this book (or purchased one in the past), you can buy the Kindle Edition for FREE. Print edition purchase must be sold by Amazon. Learn more.
For thousands of qualifying books, your past, present, and future print-edition purchases now lets you buy the Kindle edition for $2.99 or less. (Textbooks available for $9.99 or less.)
Author interviews, book reviews, editors picks, and more. Read it now
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
By focusing on the math (geometry and trig) in addition to the code, this is ideal for a University course when there is an expectation that students learn more than simply "application". It's also a great reference book for a coder's bookshelf.
This is not a complete book on "game physics", but only on the most difficult aspect of a physics engine, collision detection. So, if you to quickly add physics to your 2D game, just download one of the open-source physics engines. But if you're actually hoping to strip away the magic and learn something, this is a nice and succinct book covering the topics of 2D collision detection.
When you're ready for 3D and want a stop-by-step on how to build a 3D game engine. Check out "Game Physics Engine Development" by Ian Millington.
Initially I was irritated about the short length of the book. But after reading the first few chapters, the concise writing style made it clear that it's long enough.
The book starts with explaining the basics of 2D vector math like addition, scaling, dot product, projection, etc. The next chapter introduces different collision shapes like circles, rectangles, lines and so on. Then comes the chapter I was most interested in: how collisions between different shapes are determined. It covers every possible combination of shapes, even the somewhat senseless point-point collision.
One thing I was missing were polygons. In 3D everything seems to be some kind of "3D polygon". Thus I've expected the same goes for 2D.
The book goes on with describing collision detection of moving objects, how to make up sprites with multiple shapes and some optimization advice for programming in general.
I found the code, set up in the book, was easy to integrate into my own game. There is a link in the appendix to download the full code.
The algorithms presented are well explained and easy to grasp. Just the functions for oriented rectangles are a little complex. But I think that's due to their nature of arbitrary rotation.
In a nutshell:
"2D Game Collision Detection" is a must for everybody who wants to implement 2D collisions, especially if you have no clue how collision detection is done. The concepts are well explained by many code examples and illustrations. As said, it was way easier to start with this book than to work through all the articles (mainly on 3D) I've found online. This book simply sums it all up into one guide.
The algoritms proposed in the book for doing Rect-Rect and Circle-Rect collision detection are way simpler than the ones I was using on my engine. And for reference, my previous algoritms were taken from "The Windows Game Programming Gurus" by Andre LaMothe.
The only thing I miss in the book is colision detection with polygons, the book covers point, line, circle, rectangle, oriented-rectangle and agregated geometries, but does not cover polygons.