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
Libgdx Cross-platform Game Development Cookbook

You're reading from   Libgdx Cross-platform Game Development Cookbook Harness LibGDX to create cross-platform 2D games with more than 75 practical recipes covering everything from AI to building LibGDX Bitmap fonts

Arrow left icon
Product type Paperback
Published in Oct 2014
Publisher
ISBN-13 9781783287291
Length 516 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (15) Chapters Close

Preface 1. Diving into Libgdx FREE CHAPTER 2. Working with 2D Graphics 3. Advanced 2D Graphics 4. Detecting User Input 5. Audio and File I/O 6. Font Rendering 7. Asset Management 8. User Interfaces with Scene2D 9. The 2D Maps API 10. Rigid Body Physics with Box2D 11. Third-party Libraries and Extras 12. Performance and Optimizations 13. Giving Back Index

Preface

Libgdx is a powerful Java-based open source cross-platform game framework. It allows developers to target Windows, Mac, Linux, Android, iOS, and HTML5 with a single codebase, sparing them the hassle of dealing with low-level, platform-specific details.

Preface

For more information, please refer to http://libgdx.badlogicgames.com/.

Through a clean and simple API, Libgdx offers a vast set of features, which are as follows:

  • Low-level OpenGL access: This includes vertex arrays, meshes, framebuffers, shaders, and immediate mode renderer
  • 2D graphics: This includes bitmaps, texture atlases, particles, scene graph, user interface, and maps
  • 3D graphics: This includes model loading, lighting, decal batching, particles, and so on
  • Audio: This includes streaming music, sound effects (MP3, WAV, and OGG), pitch control, and direct access to recording devices
  • Input: This includes keyboard, mouse, touch, accelerometer, compass, and controller events as well as gesture detection
  • Math and physics: This includes matrices, vectors, shapes, interpolators, frustum, intersection utilities, and full Box2D and Bullet physics JNI wrappers
  • File I/O: This includes cross-platform file access, preferences storage, XML, and JSON parsing
  • Utilities: This includes fast custom collections and easy multiresolution handling
  • Tools: This includes project creation, particle editor, bitmap font generator, and texture packer

Libgdx is incredibly fast, thanks to the use of JNI wrappers and heavy emphasis on avoiding garbage collection. This becomes crucial when deploying on mobile devices and browsers. Its framework nature allows you to choose which components to use as it does not enforce a single way of working like most engines do.

The community behind the framework is large, welcoming, and always willing to provide support. The GitHub repository shows how active the project is, with many commits every day, constant releases, and rich documentation. For more information, refer to https://github.com/libgdx/libgdx.

Thanks to its permissive Apache 2.0 license, Libgdx can be used for both commercial and noncommercial projects without having to necessarily disclose the source. According to AppBrain, 1.44 percent of all the Android applications (both games and nongames) are built on top of it, which reinforces its flexibility and ease of use. For more information, refer to http://appbrain.com/stats/libraries/details/libgdx/libgdx.

This book provides excellent coverage of the aforementioned systems focusing on 2D game development. Each chapter covers a set of related features through a series of recipes. A recipe explains with simple steps how to carry out a particular task with Libgdx such as rendering a texture on the screen. The practical approach will give you a very good insight on how things actually work, preparing you to use this technology on real-life projects.

After reading through the recipes in this book, you will have a solid understanding of how all the systems in Libgdx work and how to better leverage them in order to implement your games. The good practices exposed here will give you an edge to produce clean and efficient code.

lock icon The rest of the chapter is locked
Next Section arrow right
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 ₹800/month. Cancel anytime