Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning AndEngine

You're reading from   Learning AndEngine Design and create Android games with the simple but powerful tool AndEngine

Arrow left icon
Product type Paperback
Published in Sep 2014
Publisher
ISBN-13 9781783985968
Length 286 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Martin Varga Martin Varga
Author Profile Icon Martin Varga
Martin Varga
Arrow right icon
View More author details
Toc

The Box2D Debug Draw extension


When working with simple physics, one can easily imagine how the bodies look and where the collisions happen. However, with added complexity, when a problem arises, it is almost impossible to find out where it lies without visual aid. This is where the Debug Draw extension comes in. Most of the Box2D ports will have a functionality to visualize the bodies using outlines and colors.

Such a visualization typically looks something like this:

Adding Debug Draw to our AndEngine project

AndEngine has a Debug Draw extension as well. It was created by Nazgee, an AndEngine user and game programmer. It is an unofficial extension, but it works very well. It can be downloaded and added to any AndEngine project using the same method described in the Downloading the sources and Adding AndEngine to Eclipse IDE sections of Chapter 1, Setting Up an AndEngine Project, for the Box2D Physics Extension.

Note

Here's the link to the original repository of the Debug Draw extension:

https...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime