Free Sample
+ Collection

Learning Libgdx Game Development

Andreas Oehlke

Are your games limited to one platform? Use our practical guide to libGDX and before long you’ll be developing games that run across multiple platforms, enjoying an increased audience and revenue.
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781782166047
Paperback388 pages

About This Book

  • Create a libGDX multi-platform game from start to finish
  • Learn about the key features of libGDX that will ease and speed up your development cycles
  • Write your game code once and run it on a multitude of platforms using libGDX
  • An easy-to-follow guide that will help you develop games in libGDX successfully

Who This Book Is For

This book is great for Indie and existing game developers, as well as those who want to get started with game development using libGDX. Java game knowledge of game development basics is recommended.

Table of Contents

Chapter 1: Introduction to Libgdx and Project Setup
Diving into Libgdx
Features of Libgdx 0.97
Getting in touch with the community
Prerequisites for installing and configuring
Creating a new application
Kicking your game to life
Key to success lies in planning
Game project – Canyon Bunny
Chapter 2: Cross-platform Development – Build Once, Deploy Anywhere
The demo application – how the projects work together
Libgdx's Application Life-Cycle and Interface
Starter Classes
The demo application – time for code
Chapter 3: Configuring the Game
Setting up the Canyon Bunny project
Using a class diagram for Canyon Bunny
Laying foundations
Putting it all together
Chapter 4: Gathering Resources
Setting a custom Android application icon
Creating texture atlases
Loading and tracking assets
Organizing assets
Testing assets
Handling level data
Chapter 5: Making a Scene
Creating game objects
Implementing the level loader
Assembling the game world
Implementing the game GUI
Chapter 6: Adding the Actors
Implementing the actor game objects
Completing the level loader
Adding the game logic
Chapter 7: Menus and Options
Managing multiple screens
Exploring Scene2D (UI), TableLayout, and skins
Using Libgdx's scene graph for the menu UI
Building the scene for the menu screen
Building the Options window
Chapter 8: Special Effects
Creating complex effects with particle systems
Adding a dust particle effect to the player character
Moving the clouds
Smoothing with Linear interpolation (Lerp)
Adding parallax scrolling to the mountains in the background
Enhancing the game screen's GUI
Chapter 9: Screen Transitions
Adding the screen transition capability
Chapter 10: Managing Music and Sound Effects
Playing back music and sound effects
Accessing the audio device directly
Using sound generators
Adding music and sounds to Canyon Bunny
Chapter 11: Advanced Programming Techniques
Simulating physics with Box2D
Working with shaders in Libgdx
Adding alternative input controls
Chapter 12: Animations
Manipulating actors through actions
Animating the menu screen
Using sequences of images for animations
Animating the game screen

What You Will Learn

  • Learn about libGDX and prepare your system for multi-platform game development
  • Speed up your overall productivity with the awesome JVM Code Hot Swapping feature
  • Create a project setup and test the base code required for game building
  • Use Scene2D to create and organize complex menu structures
  • Use the texture packer to automate the creation of texture atlases
  • Replace the default launcher icon with your own app icon
  • Manage and play audio files and add special effects to a game to improve its look and feel
  • Create and use texture atlases for optimized sprite rendering

In Detail

Game development is a field of interdisciplinary skills, which also makes it a very complex topic in many respects. One decision that usually needs to be made at the beginning of a game development processis to define the kind of computer system or platform the game will be developed for. This does not pose any problems in general but as soon as the game should also be able to run on multiple platforms it will become a developer’s nightmare to maintain several distinct copies of the same game. This is where the libGDX multi-platform game development framework comes to the rescue!

"Learning Libgdx Game Development" is a practical, hands-on guide that provides you with all the information you need to know about the libGDX framework as well as game development in general so you can start developing your own games for multiple platforms. You will gradually acquire deeper knowledge of both, libGDX and game development while you work through twelve easy-to-follow chapters.

"Learning Libgdx Game Development" will walk you through a complete game development cycle by creating an example game that is extended with new features over several chapters. These chapters handle specific topics such as organizing resources, managing game scenes and transitions, actors, a menu system, using an advanced physics engine and many more. The chapters are filled with screenshots and/or diagrams to facilitate comprehension.

"Learning Libgdx Game Development" is the book for you if you want to learn how to write your game code once and run it on a multitude of platforms using libGDX.


Read More