Libgdx is truly awesome and it will probably suit your needs perfectly. However, some people might need extra behavior or a slightly different API.
The first thing you should try is to add the desired functionality on top of an official stable Libgdx release. Were that to prove impossible, you would have to modify Libgdx itself to make it behave the way you want.
Throughout this recipe, you will learn how to grab Libgdx's repository, make changes to it, and use it for your game.
You will need a Git client to clone the Libgdx repository. We discussed that topic in the Using source control on a Libgdx project with Git recipe of Chapter 1, Diving into Libgdx.
Libgdx uses Apache Ant, which is an open source Java-based build system, very much like Gradle. You can grab the latest binary distribution from http://ant.apache.org/bindownload.cgi.
Download the latest one, unzip it in the folder of your choice, and add the bin
subfolder to your PATH
environment variable.
The Libgdx project itself still uses Eclipse projects; it is recommended you have that IDE installed on your machine. Refer to the Setting up a cross-platform development environment recipe in Chapter 1, Diving into Libgdx, for more details.
Everything should be ready now. Follow these steps in order to work from Libgdx sources:
[email protected]:libgdx/libgdx.git
. You can either use SourceTree, the Git client of your choice, or plain old Git.ant -f fetch.xml
ant
gdx
gdx-backend-lwjgl
gdx
and gdx-backend-android
gdx-backend-gwt
gdx-backend-robovm
By making your game depend on Libgdx sources, you can make changes to the core and see them reflected on the game right away. Additionally, you can still keep pulling changes from the main repository to stay up to date. Naturally, this has the downsides of requiring you to be extra careful and a bit more cumbersome.
3.139.67.5