O'Reilly logo

Libgdx Cross-platform Game Development Cookbook by Alberto Cejas Sánchez, David Saltares Márquez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using ShapeRenderer for debug graphics

As your project grows in size and complexity, more bugs and glitches will appear. Regardless of how brilliant you are, this is inevitable. Traditional debugging techniques such as logging and stepping through code instructions are extremely helpful, but sometimes they are not the best when it comes to detecting issues in visually rich real-time applications, such as video games. This is especially true when you have many game objects on screen, which could lead to conditional breakpoints hell.

Sometimes it is a lot easier just to render some extra information on top of the game world. When you think your entities are not drawn at the right places, why not add a grid showing the world axis and units? Maybe ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required