
Learning LibGDX Game Development - Second Edition
Beschreibung
Alle Preise
Weitere Details
Weitere Ausgaben
Inhalt
- Intro
- Learning LibGDX Game Development Second Edition
- Table of Contents
- Learning LibGDX Game Development Second Edition
- 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. Introduction to LibGDX and Project Setup
- Diving into LibGDX
- Features of LibGDX 1.2.0
- Graphics
- Audio
- Input handling
- File I/O and storage
- Math and physics
- Utilities
- Tools
- Getting in touch with the community
- Prerequisites to install and configure LibGDX
- Java Development Kit
- Eclipse - Integrated Development Environment
- Downloading LibGDX
- Installing Android SDK
- Running Eclipse and installing plugins
- Creating a new application
- Using the old setup tool
- Using the Gradle-based setup
- gdx-setup versus gdx-setup-ui
- Kicking your game to life
- Key to success lies in planning
- Game project - Canyon Bunny
- Description of the game
- Summary
- 2. Cross-platform Development - Build Once, Deploy Anywhere
- The demo application - how the projects work together
- LibGDX backends
- Lightweight Java Game Library
- Android
- WebGL
- RoboVM (iOS backend)
- LibGDX core modules
- The application module
- Logging
- Shutting down gracefully
- Persisting data
- Querying the Android API level
- Querying the platform type
- Querying the memory usage
- Multithreading
- The graphics module
- Querying delta time
- Querying display size
- Querying the frames per second (FPS) counter
- The audio module
- Sound playback
- Music streaming
- The input module
- Reading the keyboard/touch/mouse input
- Reading the accelerometer
- Starting and canceling vibrator
- Catching Android's soft keys
- The files module
- Getting an internal file handle
- Getting an external file handle
- The network module
- HTTP requests
- Client/server sockets
- Opening a URI in a web browser
- LibGDX's application life cycle and interface
- Starter classes
- Running the demo application on a desktop
- Running the demo application on Android
- Running the demo application in a WebGL-capable web browser
- Running the demo application on an iOS device
- The demo application - time for code
- Inspecting an example code of the demo application
- The create() method
- The render() method
- The dispose() method
- Having fun with the debugger and Code Hot Swapping
- Summary
- 3. Configuring the Game
- Setting up the Canyon Bunny project
- Using a class diagram for Canyon Bunny
- Laying foundations
- Implementing the Constants class
- Implementing the CanyonBunnyMain class
- Implementing the WorldController class
- Implementing the WorldRenderer class
- Putting it all together
- Building the game loop
- Adding the test sprites
- Adding the game world's debug controls
- Adding the CameraHelper class
- Adding the camera debug controls using CameraHelper
- Summary
- 4. Gathering Resources
- Setting up a custom Android application icon
- Setting up a custom iOS application icon
- Creating the texture atlases
- Loading and tracking assets
- Organizing the assets
- Testing the assets
- Handling level data
- Summary
- 5. Making a Scene
- Creating game objects
- The rock object
- The mountains object
- The water overlay object
- The clouds object
- Implementing the level loader
- Assembling the game world
- Implementing the game GUI
- The GUI score
- The GUI extra lives
- The GUI FPS counter
- Rendering the GUI
- Summary
- 6. Adding the Actors
- Implementing the actor game objects
- Creating the gold coin object
- Creating the feather object
- Creating the bunny head object
- Updating the rock object
- Completing the level loader
- Adding the game logic
- Adding collision detection
- Losing lives, game over, and fixing the camera
- Adding the game over text and the feather icon to the GUI
- Summary
- 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
- Adding the background layer
- Adding the objects layer
- Adding the logos layer
- Adding the controls layer
- Adding the Options window layer
- Building the Options window
- Using the game settings
- Summary
- 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)
- Letting the rocks float on the water
- Adding parallax scrolling to the mountains in the background
- Enhancing the game screen's GUI
- Event - player lost a life
- Event - score increased
- Summary
- 9. Screen Transitions
- Adding the screen transition capability
- Implementing the transition effects
- Knowing about interpolation algorithms
- Creating a fade transition effect
- Creating a slide transition effect
- Creating a slice transition effect
- Summary
- 10. Managing the Music and Sound Effects
- Playing back the music and sound effects
- Exploring the Sound interface
- Exploring the Music interface
- Accessing the audio device directly
- Exploring the AudioDevice interface
- Exploring the AudioRecorder interface
- Using sound generators
- The sfxr generator
- The cfxr generator
- The bfxr generator
- Adding music and sounds to Canyon Bunny
- Summary
- 11. Advanced Programming Techniques
- Simulating physics with Box2D
- Exploring the concepts of Box2D
- Understanding the rigid bodies
- Choosing the body types
- Using shapes
- Using fixtures
- Simulating physics in the world
- Physics body editor
- Adding Box2D
- Adding Box2D dependency in Gradle
- For non-Gradle users
- Preparing Canyon Bunny for raining carrots
- Adding the new assets
- Adding the carrot game object
- Adding the goal game object
- Extending the level
- Letting it rain carrots
- Working with shaders in LibGDX
- Creating a monochrome filter shader program
- Using the monochrome filter shader program in Canyon Bunny
- Adding alternative input controls
- Summary
- 12. Animations
- Manipulating actors through actions
- Actions for manipulating actors
- Controlling the order and time of execution
- Animating the menu screen
- Animating the gold coins and bunny head actors
- Animating the menu buttons and options window
- Using sequences of images for animations
- Packing animations using TexturePacker
- Choosing between animation play modes
- Animating the game screen
- Defining and preparing new animations
- Animating the gold coin game object
- Animating the bunny head game object
- Summary
- 13. Basic 3D Programming
- Light sources
- Environment and materials
- Basic 3D using LibGDX
- The project setup
- The camera
- Model and ModelInstances
- The ModelBatch class
- The environment
- Loading a model
- Model formats and the FBX converter
- 3D frustum culling
- Ray picking
- Summary
- 14. Bullet Physics
- About Bullet Physics
- A few basic concepts
- Understanding rigid bodies
- Static, dynamic, and kinematic rigid bodies
- Collision shapes
- MotionStates
- Simulating physics
- Learning Bullet with LibGDX
- Setting up a project
- Creating a basic 3D scene
- Initializing Bullet
- Creating a dynamics world
- A custom MotionState class
- A simple ContactListener class
- Adding some rigid bodies
- Stepping the world
- Ray casting in Bullet
- A simple test game
- Having fun with shadows
- Summary
- Index
Systemvoraussetzungen
Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
- Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).
- Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions oder die App PocketBook (siehe E-Book Hilfe).
- E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)
Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet – also für „fließenden” Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an.
Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.
Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.
Dateiformat: PDF
Kopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
- Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).
- Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions oder die App PocketBook (siehe E-Book Hilfe).
- E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)
Das Dateiformat PDF zeigt auf jeder Hardware eine Buchseite stets identisch an. Daher ist eine PDF auch für ein komplexes Layout geeignet, wie es bei Lehr- und Fachbüchern verwendet wird (Bilder, Tabellen, Spalten, Fußnoten). Bei kleinen Displays von E-Readern oder Smartphones sind PDF leider eher nervig, weil zu viel Scrollen notwendig ist.
Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.
Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.