Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering LibGDX Game Development

You're reading from   Mastering LibGDX Game Development Leverage the power of LibGDX to create a fully functional, customizable RPG game for your own commercial title

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781785289361
Length 420 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Patrick Hoey Patrick Hoey
Author Profile Icon Patrick Hoey
Patrick Hoey
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. As the Prophecy Foretold, a Hero is Born 2. Welcome to the Land of BludBourne FREE CHAPTER 3. It's Pretty Lonely in BludBourne… 4. Where Do I Put My Stuff? 5. Time to Breathe Some Life into This Town 6. So Many Quests, So Little Time… 7. Time to Show These Monsters Who's the Boss 8. Oh, No! Looks Like Drama! 9. Time to Set the Mood 10. Prophecy Fulfilled, Our Hero Awaits the Next Adventure Index

Inventory and HUD layouts with skins

By the end of this chapter, you will have a functional UI that will display the player's current status and an interactive inventory where the player can drag and drop their items around the inventory slots, stack like items to conserve space, and equip certain items such as armor and weapons.

The following screenshot demonstrates that end result (Figure 1):

Inventory and HUD layouts with skins

Figure 1

PlayerHUD with Scene2D

We need to set the ground work in order to develop a UI with LibGDX. The first item that we need to tackle in this chapter is the UI toolkit that comes with LibGDX, Scene2D, and how we can use the tools provided to start creating the in-game UI. The Scene2D library in LibGDX conceptually is a scene graph that can contain hierarchies of widgets. This library contains classes for building game menus, HUD overlays, tools, and other UIs. Scene2D also includes helper classes for laying out and drawing widgets and also handling input.

In our game, the player will need...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime