Libgdx Cross-platform Game Development Cookbook
eBook - ePub

Libgdx Cross-platform Game Development Cookbook

  1. 516 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Libgdx Cross-platform Game Development Cookbook

Book details
Book preview
Table of contents
Citations

About This Book

Libgdx is a very popular open source, cross-platform, Java-based game development framework that enables you to write your code once and deploy it to Windows, Mac, Linux, Android, iOS, and browsers.

Supported by code samples for each topic, this book will take you through the features of Libgdx, from the very basic aspects to the most advanced ones. Beginning with an overview of the framework and project creation, the book moves on to the 2D graphics API that enables you to create efficient and visually rich games. You will then explore input detection and audio and file handling, followed by details of how to make use of amazing features such as Box2D rigid body physics, lighting, and artifical intelligence techniques to name a few. You will also discover how to modify Libgdx to suit your needs and share your creation with the world.

Frequently asked questions

Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Libgdx Cross-platform Game Development Cookbook by David Saltares Marquez, Alberto Cejas Sanchez in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Science General. We have over one million books available in our catalogue for you to explore.

Information

Year
2014
ISBN
9781783287291
Edition
1

Libgdx Cross-platform Game Development Cookbook


Table of Contents

Libgdx Cross-platform Game Development Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Diving into Libgdx
Introduction
Setting up a cross-platform development environment
Getting ready
How to do itā€¦
Java Development Kit
Windows and Mac users
GNU/Linux users
Eclipse
Android SDK
Mac users
GNU/Linux users
All users
Eclipse plugins
XCode
Fixing character encoding and line endings
Making sure everything is in order
How it worksā€¦
There's moreā€¦
See also
Creating a cross-platform project
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
See also
Understanding the project structure and application life cycle
Getting ready
How to do itā€¦
Using logging to get to know the application life cycle
Starter classes and configuration
Desktop starter
Android starter
HTML starter
iOS starter
How it worksā€¦
There's moreā€¦
Living comfortably with ApplicationAdapter
Managing a multiscreen application with Game
See also
Updating and managing project dependencies
Getting ready
How to do itā€¦
Gradle build file primer
Updating existing dependencies
Adding Libgdx extensions
Bullet
Core
Desktop
Android
iOS
FreeTypeFont
Core
Desktop
Android
iOS
Controllers
Core
Desktop
Android
HTML5
Box2D
Core
Desktop
Android
iOS
HTML5
Tools
Core
Desktop
AI
Core
Android
HTML
Adding external repositories
Adding additional file dependencies
Managing GWT dependencies
There's moreā€¦
See also
Using source control on a Libgdx project with Git
Getting ready
How to do itā€¦
How it worksā€¦
Basic operations
Git branches
Gitignore files
There's moreā€¦
See also
Importing and running the Libgdx official demos
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
2. Working with 2D Graphics
Introduction
Texture rendering with SpriteBatch
Getting ready
How to do itā€¦
How it worksā€¦
2D rendering using 3D techniques
Coordinate system and camera setup
Assets location in Libgdx
Draw order
Texture filters
There's moreā€¦
See also
More effective rendering with regions and atlases
Getting ready
How to do itā€¦
Packing PNG files into an atlas
Rendering regions of an atlas
How it worksā€¦
Atlas file format
How SpriteBatch works
A note on texture size limitations
There's moreā€¦
See also
Taking advantage of Libgdx sprites
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Using bounds for collision detection
See also
Rendering sprite-sheet-based animations
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Using different play modes
Checking when an animation has finished
Handling a character with many animations
See also
Understanding orthographic cameras
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Rendering UI on top of the game world
Split screen
See also
Using ShapeRenderer for debug graphics
Getting ready
How to do itā€¦
Rendering lines
Rendering circles
Rendering rectangles
Rendering points
Rendering triangles
How it worksā€¦
There's moreā€¦
See also
Handling multiple screen sizes with viewports
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Getting the most out of Viewport
Working with two cameras and viewports
Floating elements
Build your own Viewport implementation
See also
3. Advanced 2D Graphics
Introduction
Achieving juicy effects with particles
Getting ready
How to do itā€¦
The basics of Particle Editor
Rendering particle effects with Libgdx
How it worksā€¦
There's moreā€¦
See also
Frame buffers and image composition
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Welcome to the world of shaders
Getting ready
How to do itā€¦
How it worksā€¦
Data types
Vertex attributes
Uniforms
OpenGL ES precision specifiers
There's moreā€¦
The sepia effect
Inverted colors
Passing parameters into shader programs
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Detecting shader compiler errors
More efficient uniform settings
2D depth of field shader
Getting ready
How to do itā€¦
There's moreā€¦
See also
Embedding a Libgdx window into a Java desktop application
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
See also
4. Detecting User Input
Introduction
Detecting user input via event polling
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Checking input availability
Showing the on-screen keyboard
Detecting user input via event listening
Getting ready
How to do itā€¦
Event polling versus event listening
How it worksā€¦
There's moreā€¦
Managing multiple listeners at once
Getting ready
How to do itā€¦
How it worksā€¦
See also
Detecting more complex gestures
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Gesture polling
Introducing the controllers API
Getting ready
How to do itā€¦
Including the controllers extension
Enumerating controllers
Controller state polling
Controller event listening
How it worksā€¦
There's moreā€¦
Controller mappings
Handling disconnections
See also
Input mapping for cr...

Table of contents

  1. Libgdx Cross-platform Game Development Cookbook