I’m starting a new project in LibGdx and had to go refresh my memory on how to do it. The thing is, when the project is complete, LibGdx says to go to File> Import> General> Existing project, and the badlogic YouTube video said to go to File> Import> Gradle> Existing Gradle project. I already made a project without the big Gradle G and everything runs perfectly. I’m afraid somthing might not work in the future, is the Gradle part really necessary?
Gradle is simply a build automation tool that has gotten a lot bigger lately. You don’t need it, though if you know nothing about build tools you might want to use gradle so you have a simple tutorial to follow.
Also, does anyone have a good AssetLoader class for LibGdx? Mine isn’t efficient enough to load multiple sprites.
static void load(String assetPath) {
t = new Texture(Gdx.files.internal(assetPath));
t.setFilter(TextureFilter.Linear, TextureFilter.Linear);
s = new Sprite(t);
}
You should look into AssetManager, TextureAtlas, and Skin.
Besides looking at the online documentation, how do I look at the class code in a library?
Assuming you have the sources attached (you should if you followed setup instructions or used the tool) then you just click the names in eclipse.
(* ok, you click the Class/Interface/Enum icon next to the name in the content assit popup)