Obfuscating the packaged JAR

Another consideration is the security of your game executable to prevent people, or at the least, make the process more difficult for the player to exploit your game code. A common technique used in the industry is to rename class member variables and class names, or obfuscate the compiled bytecode of the distribution JARs. There is a tool I have used in the past for obfuscating Android-based games, but can also be applied to the desktop version of your game. Proguard (v5.2.1) still seems to be the golden standard because it is configurable, relatively effective, and open source. The main website for Proguard is http://proguard.sourceforge.net/.

The following steps demonstrate how to use Proguard:

  1. Navigate to where the ...

Get Mastering LibGDX Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.