Book Image

Libgdx Cross-platform Game Development Cookbook

Book Image

Libgdx Cross-platform Game Development Cookbook

Overview of this book

Table of Contents (20 chapters)
Libgdx Cross-platform Game Development Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Releasing your Libgdx game on desktop


Fantastic! You have just finished your awesome Libgdx game and want to release it to Windows, GNU/Linux, and Mac users.

You could pack your project into a JAR file and distribute it, although it is far from optimal. First of all, your users will need to have a JRE; otherwise, they will not be able to run the game. Moreover, if their JRE is not compatible with the game's JAR archive, it may crash or cause all sorts of problems. Finally, you might not want your users to know that you are using Java.

The best way to go about distributing Libgdx games on desktop platforms is by packing your game with a JRE of your choice into a platform-specific binary. That way you will make sure it works without any surprises.

In this recipe, you will learn how to make a platform-specific binary of your Libgdx game.

Getting ready

We will be using Packr, an open source tool that does exactly what we need. Packr was created by Mario Zechner (author of Libgdx) and is maintained...