Building a 3D Game with LibGDX 1785288415, 9781785288418

LibGDX is a hugely popular open source, cross-platform, Java-based game development framework built for the demands of c

1,116 197 2MB

English Pages 227 Year 2016

Report DMCA / Copyright

DOWNLOAD FILE

Building a 3D Game with LibGDX
 1785288415, 9781785288418

Table of contents :
Cover
Copyright
Credits
About the Author
Table of Contents
Preface
Chapter 1: Setting Up Your Development Environment
LibGDX 3D API overview
Downloading IntelliJ IDEA Community Edition
LibGDX project setup
Basic use of IntelliJ IDEA with LibGDX
Running the Android app
Running the desktop app
Summary
Chapter 2: An Extra Dimension
Camera techniques
Drawing a cube
Translation
Rotation
Scaling
Summary
Chapter 3: Working toward a Prototype
Creating our world
Creating our structure
Game screen
A simple playground
Game world
Adding visuals
Introduction to Ashley
Components
Model component
Systems and Ashley's engine
Render system
Adding physics and collisions
Bullet Physics and Bullet system
Creating a scene
Movable characters
Player component
Player system
Adding enemies
Enemy component
Status component
Enemy system
Enemy collision
Making our player able to shoot
Scene2D
Default skin for Scene2D
Health bar
Crosshair
Displaying scores
Pausing the game
Game over widget
Screens
Main menu screen
Leaderboards screen and the Settings class
Summary
Chapter 4: Preparing Visuals
Setting up Blender
Downloading and installing Blender
Blender's (very) basics
Move gizmo
Scale gizmo
Rotation gizmo
Sketching
Game asset pipeline in Blender
Modeling
UV mapping
Texturing
First steps to animation – rigging
Animation
Exporting
Summary
Chapter 5: Starting to Look Like an Actual Game
Models usable and ready to deploy with LibGDX
Downloading Fbx-Conv
Command-line usage
Options/flags:
Adding our own gun model
Converting our gun model file
Importing the model, finally!
Adding our own static arena
Creating our model
Importing to our game and getting the collision bounds
Enemy models!
Getting models from the Internet
Preparing for more than one animation
Run animation
Death animation and system
Improving the spawn function
Adding a SkyDome
Getting the model
Implementing
Shadows and lights
Adding a directional shadow with a light
Summary
Chapter 6: Spicing Up the Game
3D particles and LibGDX 3D particle editor
Particle effect types
Emitter properties
Saving and importing
Adding the particle effect and a material attribute
Mobile performance
Testing on Android
Performance improvements on the enemy model
Performance improvements and frustum culling
UI tweening
Online leaderboards and the .NET API
Analog sticks on mobile and platform recognition
Summary
Chapter 7: Final Words
Deploying to platforms
Running and deploying on desktop
Running and deploying on Android
Troubleshooting common problems
Gradle
Antivirus
IntelliJ
What's missing from our game?
More platforms
Loading screen and loading feature
About section
Splash screen
UI customization and screen transitions
Game design
Attack system
Shaders and shadows across all platforms
Shooting lasers
Positional audio
Publishing
Ads
Social networks
Summary
Index

Polecaj historie