Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
LibGDX Game Development Essentials
Table of Contents
LibGDX Game Development Essentials
Credits
About the Author
Acknowledgments
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. Wiring Up
Getting started
Setting up the Java development environment
Installing Eclipse
Setting up the Android development environment
Installing the ADT plugin and linking the Android SDK with Eclipse
Installing the LibGDX support plugins
Setting up GWT
Installing the RoboVM plugin
Installing the Gradle plugin
The LibGDX Gradle combo
Using the Gradle setup application
A Hello World project
Importing Gradle projects to Eclipse
Running the project
Exploring the project
Displaying the Hello World text
Running demos
Running tests
The alternate LibGDX setup
Summary
2. Let There Be Graphics!
The ThrustCopter game
A LibGDX app's life cycle
Creating the Thrust Copter project
Planning art assets
The game scene
Populating the game scene
Displaying the graphics
The final game scene
Adding the plane animation
Moving the plane
The code so far
Texture packing
The revised code
Handling multiple screen sizes and aspect ratios
Summary
3. Thou Shall Not Pass!
Piloting our plane
Navigating using touch input
Dealing with other input methods
Polling keyboard keys
Accessing accelerometer data
Event handling for inputs
Using the InputAdapter class
Capturing gestures
Game controllers controller
Adding the different game states
Adding the pillar rocks
Collision with the pillars
Adding meteor rocks
Collision with the meteor rock
Making the game easier
Playing with audio
Adding sound effects
Summary
4. Bring in the Extras!
Refactoring time
Creating a ThrustCopterScene class
Creating our Game class instance
More refactoring
Using AssetManager
Time for pickups
Using a pickup class
Adding pickup logic
Heads Up Display (HUD) UI
Displaying text
Hiero – the BitmapFont creator tool
Special effects with particles
Pooling particle effects
Summary
5. Scene 2 – the Menu
Introducing Scene2D
The stage for actors
Actors and their actions
Widgets
Adding a loading scene
Investigating the LoadingScreen class
Adding the menu scene
Creating scalable skins using the 9-patch tool
Handling the Android back button
Summary
6. Physics with Box2D
The incredible world of Box2D
LibGDX with Box2D
Creating a Box2D world
Drawing the Box2D world
Simulating the Box2D world
Fixing the time step
Box2D rigid bodies
Interactions in the Box2D world
Linking the Box2D and game worlds
Detecting collisions
Box2D version of Thrust Copter
Creating and placing objects
Creating obstacles
Drawing the scene
Handling collisions
Ignoring collisions with shield
Collision for pickups
Summary
7. The Amazing World of 3D
Introducing the third dimension
Creating 3D content
The PerspectiveCamera class
Converting 3D files to G3DB
Playing with primitives
Rendering the ModelInstance classes
Loading 3D models
Playing animations
Interacting with 3D objects
3D frustum culling in LibGDX
3D particles with Flame
Using bullet physics
Creating the bullet world
Adding rigid bodies
Collision detection
Adding shadows
Summary
8. Saving Our Data
Persisting game preferences
Saving and loading sound preferences
Implementing a local leaderboard
Filesystems and access permissions
Reading and writing files
The leaderboard
Saving and displaying scores
Tile-based level design
Using Tiled
Loading TMX levels
Summary
9. Finishing Our Android Game
Using Google's offerings
Interfacing platform-specific code
Implementing Google Analytics tracking
Adding tracker configuration files
Adding Google Mobile Ads
Leaderboards and achievements using Google Play services
Linking BaseGameUtils
Wiring with code
Famous third-party alternatives
Flurry for analytics
Ads from InMobi
Swarm – the all-in-one package
Creating icons
Summary
10. Time to Publish
Publishing the Android version
Preparing the store listing
Preparing to release the APK
Publishing the desktop version
Publishing the Web version
Publishing the iOS version
First steps at the developer portal
Preparing the iOS project
Testing the build on a device
Creating the IPA
Some useful resources and links
Overlap2D
Working with Overlap2D
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →