![Page 1: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/1.jpg)
1 Wiring Up
Getting started
Setting up the Java development environment
![Page 2: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/2.jpg)
Installing Eclipse
Setting up the Android development environment
![Page 3: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/3.jpg)
Installing the ADT plugin and linking Android SDK with Eclipse
![Page 4: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/4.jpg)
The LibGDX Gradle combo
Using the Gradle setup application
![Page 5: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/5.jpg)
A Hello World project
![Page 6: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/6.jpg)
Importing Gradle projects to Eclipse
![Page 7: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/7.jpg)
Running the project
![Page 8: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/8.jpg)
![Page 9: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/9.jpg)
![Page 10: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/10.jpg)
Exploring the project
Displaying Hello World
Running demos
Running tests
![Page 11: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/11.jpg)
The alternate LibGDX setup
![Page 12: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/12.jpg)
2 Let There be Graphics!
The Thrust Copter game
![Page 13: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/13.jpg)
A LibGDX app's life cycle
Creating the Thrust Copter project
![Page 14: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/14.jpg)
The Game Scene
![Page 15: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/15.jpg)
Populating the game scene
![Page 16: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/16.jpg)
Displaying the graphics
The final game scene
![Page 17: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/17.jpg)
Adding the plane animation
![Page 18: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/18.jpg)
Texture packing
![Page 19: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/19.jpg)
![Page 20: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/20.jpg)
Handling multiple screen sizes and aspect ratios
![Page 21: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/21.jpg)
3 Thou Shall Not Pass!
Piloting our plane
Navigating using touch input
![Page 22: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/22.jpg)
Adding the different game states
![Page 23: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/23.jpg)
![Page 24: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/24.jpg)
Adding the pillar rocks
Collision with the pillars
![Page 25: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/25.jpg)
Adding meteor rocks
Collision with the meteor rock
![Page 26: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/26.jpg)
![Page 27: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/27.jpg)
Making the game easier
![Page 28: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/28.jpg)
4 Bring in the extras!
Refactoring time
Creating a ThrustCopterScene class
![Page 29: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/29.jpg)
Creating our Game class instance
Using AssetManager
![Page 30: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/30.jpg)
Time for pickups
Using a pickup class
Adding pickup logic
Heads Up Display (HUD) UI
![Page 31: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/31.jpg)
Displaying text
Hiero – the BitmapFont creator tool
![Page 32: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/32.jpg)
![Page 33: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/33.jpg)
Special effects with particles
![Page 34: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/34.jpg)
![Page 35: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/35.jpg)
5 Scene 2 – The Menu
Introducing Scene2D
Adding a loading scene
![Page 36: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/36.jpg)
Adding the menu scene
![Page 37: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/37.jpg)
Creating scalable skins using 9-patch tool
![Page 38: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/38.jpg)
6 Physics with Box2D
LibGDX with Box2D
![Page 39: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/39.jpg)
Creating a Box2D world
Drawing the Box2D world
![Page 40: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/40.jpg)
Handling collisions
![Page 41: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/41.jpg)
Collision for pickups
![Page 42: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/42.jpg)
7 The Amazing World of 3D
Introducing the third dimension
Creating 3D content
![Page 43: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/43.jpg)
Playing with primitives
Rendering the ModelInstance classes
![Page 44: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/44.jpg)
Loading 3D models
Playing animations
Interacting with 3D objects
![Page 45: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/45.jpg)
3D frustum culling in LibGDX
3D particles with Flame
![Page 46: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/46.jpg)
![Page 47: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/47.jpg)
Using bullet physics
Creating the bullet world
Adding shadows
![Page 48: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/48.jpg)
8 Saving Our Data
Implementing a local leaderboard
Filesystems and access permissions
Saving and displaying scores
![Page 49: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/49.jpg)
Tile-based level design
Using Tiled
![Page 50: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/50.jpg)
![Page 51: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/51.jpg)
Loading TMX levels
![Page 52: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/52.jpg)
9 Finishing Our Android Game
Using Google's offerings
Implementing Google Analytics tracking
![Page 53: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/53.jpg)
Adding Google Mobile Ads
![Page 54: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/54.jpg)
Leaderboard and achievements using Google Play services
Linking BaseGameUtils
Wiring with code
![Page 55: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/55.jpg)
10 Time to Publish
Publishing the Android version
Preparing store listing
![Page 56: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/56.jpg)
Publishing the iOS version
Testing the build on a device
![Page 57: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/57.jpg)
Creating the IPA
![Page 58: Wiring Up - static.packt-cdn.com · Adding the pillar rocks Collision with the pillars . Adding meteor rocks Collision with the meteor ... Using Google's offerings ... Adding Google](https://reader034.vdocuments.us/reader034/viewer/2022042219/5ec5d4abd0d4452c1d766315/html5/thumbnails/58.jpg)
Some useful resources and links
Overlap2D