LibGDX comes with a Scene2D GUI module, which allows you to easily create your GUIs and customize them with Skin
instances. However, most beginners struggle with a problem: the GUI comes without a default skin, which makes it difficult
to test it.
One could argue that it's the right approach, as it keeps framework's core jar
smaller - but when you're trying to
learn a new thing, something is generally better than nothing.
This repository contains something.
You've probably stumbled upon the default LibGDX skin, which was originally created to test Scene2D API in the official LibGDX repository. It's alright, if you want to test things out - but by the time you're making an actual LibGDX application, you're probably better off with something less programmer-art-ish.
This repository collects free skins collected or contributed by various users. Most can be used free of charge.
Note that some of the included skins might be out of date or incompatible with the latest LibGDX releases. However,
most skins include the raw resources and links to the original uploads in the README
files - if you're interested
in a particular skin, make sure you're using up-to-date assets. This repository includes duplicates the skin files
for two reasons: original uploads might expire (or be moved) and it's very convenient to download them all at once
to try each one out.
If you're learning Scene2D API, make sure to check out these resources.
Texture Packer GUI allows to create texture atlases from multiple images. It provides a graphical interface for the official texture packer tool.
IntelliJ LibGDX plugin adds multiple useful LibGDX code inspections and editors for Scene2D-related files (atlases, skins, fonts).
VisUI library extends Scene2D with custom widgets and some default skins. Even if you don't like its default theme (or flat design in general), consider including this library for its useful new actors.
Skin Composer is a graphical application that allows you to create and edit
custom Scene2D
skins.
gdx-liftoff
application allows to create LibGDX projects. Additionally
to most features provided by the official setup application, it allows to include other JVM languages, more third-party
libraries and generate code with one of predefined project templates.
- Official Scene2D article.
Scene2D UI and
Table
pages are worth your time as well. - Official
Skin
article. - Official texture packer and
Hiero tool articles, both of which are useful when preparing
Skin
assets. - Official ninepatches article might help you understand how to make skins that look well when resized.
- This article is an amazing introduction into LibGDX GUI tools.
- GamesFromScratch blog includes a multi-part Scene2D tutorial.
- Pimentoso Software blog contains a simple Scene2D tutorial.
- The KTX libraries contain Kotlin utilities for building
Scene2D styles and widgets. Its
ktx-style
module can be a great alternative to error-prone.json
skin files, and the powerful Scene2D DSL fromktx-scene2d
replaces the overly verbose Java GUI building code. - The USL library allows you to create Skin JSON files thanks to its simplified,
less boilerplate-ish and more powerful syntax.
.usl
files are meant be compiled to LibGDX.json
skin definitions before deploying the application - there is no runtime overhead.
- Do NOT use graphical texture packer, unless dealing
with legacy LibGDX version: it is not up-to-date and can produce corrupt atlases due to its texture packer version.
You're much better off setting up a Gradle task using the latest
gdx-tools
to pack your atlases (see official texture packer article for more info how to do this) or using the new Texture Packer GUI. - gdx-skineditor is a graphical tool that allows to create
Skin
files. It is not actively maintained, seems to be missing a few features and is known to crash. Use Skin Composer instead.
Maintainer will gladly accept any pull requests with additional resources - not only new skins, but also useful links and texts. Helping with keeping skin files up-to-date is also appreciated: don't hesitate to leave an issue or create a pull request if any resources are outdated.
LibGDX team created their own similar community-driven project featuring live preview, but it seems to contain far less resources overall. Consider uploading your assets to their repository as well.