PacktLib: Learning Libgdx Game Development

Learning Libgdx Game Development

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

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

Summary

Cross-platform Development – Build Once, Deploy Anywhere

The demo application – how the projects work together

Backends

Modules

Libgdx's Application Life-Cycle and Interface

Starter Classes

The demo application – time for code

Summary

Configuring the Game

Setting up the Canyon Bunny project

Using a class diagram for Canyon Bunny

Laying foundations

Putting it all together

Summary

Gathering Resources

Setting a custom Android application icon

Creating texture atlases

Loading and tracking assets

Organizing assets

Testing assets

Handling level data

Summary

Making a Scene

Creating game objects

Implementing the level loader

Assembling the game world

Implementing the game GUI

Summary

Adding the Actors

Implementing the actor game objects

Completing the level loader

Adding the game logic

Summary

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

Summary

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

Summary

Screen Transitions

Adding the screen transition capability

Summary

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

Summary

Advanced Programming Techniques

Simulating physics with Box2D

Working with shaders in Libgdx

Adding alternative input controls

Summary

Animations

Manipulating actors through actions

Animating the menu screen

Using sequences of images for animations

Animating the game screen

Summary

Index