Exploring Scene2D UI, TableLayout, and skins

LibGDX comes with a great feature set to easily create scene graphs. A scene graph is a hierarchically organized structure of objects similar to files and folders on a hard disk. In LibGDX, such objects are called actors. Actors can be nested to create logical groups. Grouping actors is a very useful feature, as modifications applied to a parent actor will also affect its child actors. Furthermore, each actor has its own local coordinate system, which makes it very easy to define relative offsets inside a group of actors, including position, angle of rotation, and scale.

Scene2D supports hit detection of rotated and scaled actors. LibGDX's flexible event system allows you to handle and route inputs as ...

Get Learning LibGDX Game Development - Second Edition 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.