Book Image

LibGDX Game Development By Example

By : James Cook
Book Image

LibGDX Game Development By Example

By: James Cook

Overview of this book

Table of Contents (18 chapters)
LibGDX Game Development By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 2. Let's Get These Snakes Out of This Book!

In this chapter, we will start making our first game with the LibGDX framework. We will make a little journey back to one of the very first popular mobile games, Snake. We will start out by looking at LibGDX's update cycle and how textures are handled. Then, we will dive into the world of game making by creating our Snake game!

The following will be covered in this chapter:

  • Why Snake?

  • The game update cycle

  • Introducing the snake

  • Making the snake move

  • Controlling the snake

  • Introducing the collision detection mechanism

  • Increasing the length of the snake once the apple is eaten