21世纪以来,虚拟现实技术得到了高速的发展,这门学科涉及计算机图形学、多媒体技术、传感技术、人工智能等多个领域,具有很强的交叉性。虚拟现实技术被认为是21世纪发展为迅速的、对人们的工作生活有着重要影响的计算机技术之一,在教育、医疗、娱乐、军事、建筑、规划等众多领域中有着非常广泛的应用前景。本书详细介绍了虚拟现实应用的基本原理及其在游戏和桌面应用程序中的应用。
		
	
  Micheal Lanham is a solutions architect with petro WEB and currently resides in Calgary, Alberta in Canada. In his current role he develops integrated GIS applications with advanced spatial search capabilities. He has worked as a professional and amateur game developer building deskt0p and mobile games for over 15 years. In 2007, Micheal was introduced to Unity 3D and has been an avid fan and developer ever since.
	Preface
	
	Chapter 1: Getting Started
	Real-world adventure games
	Location-based
	Augmented Reality
	Adventure games
	Introducing Foody GO
	Source code
	Getting into mobile development with Unity
	Downloading and installing Unity
	Setting up for Android development
	Installing the Android SDK
	Connecting to your Android device
	Setting up for lOS development
	Getting started with Unity
	Creating the game project
	Building and deploying the game
	Building and deploying to Android
	Building and deploying to iOS
	Summary
	
	Chapter 2: Mapping the Player's Location
	GIS fundamentals
	Mapping
	GPS fundamentals
	Google Maps
	Adding a map
	Creating the map tile
	Laying the tiles
	Understanding the code
	Setting up services
	Setting up CUDLR
	Debugging with CUDLR
	Setting up the GPS service
	Summary
	
	Chapter 3: Making the Avatar
	Importing standard Unity assets
	Adding a character
	Switching the camera
	Cross-platform input
	Fixing the input
	GPS location service
	Map tile parameters
	GPS simulation settings
	Character GPS compass controller
	Swapping out the character
	Summary
	
	Chapter 4: Spawning the Catch
	Creating a new monster service
	Understanding distance in mapping
	GPS accuracy
	Checking for monsters
	Projecting coordinates to 3D world space
	Adding monsters to the map
	Tracking the monsters in the UI
	Summary
	
	Chapter 5: Catching the Prey in AR
	Scene management
	Introducing the Game Manager
	Loading a scene
	Updating touch input
	Colliders and rigidbody physics
	Building the AR Catch scene
	Using the camera as our scene backdrop
	Adding the catching ball
	Throwing the ball
	Checking for collisions
	Particle effects for feedback
	Catching the monster
	Summary
	
	Chapter 6: Storing the Catch
	Inventory system
	Saving the game state
	Setting up services
	Reviewing code
	Monster CRUD operations
	Updating the Catch scene
	Creating the Inventory scene
	Adding the menu buttons
	Bringing the game together
	Mobile development woes
	Summary
	
	Chapter 7: Creating the AR World
	Getting back to the map
	The Singleton
	Introducing the Google Places API
	Using JSON
	Setting up the Google Places API service
	Creating the markers
	Optimizing the search
	Summary
	
	Chapter 8: Interacting with an AR World
	The Places scene
	Google Street View as a backdrop
	Slideshow with the Google Places API photos
	Adding UI interaction for selling
	The game mechanics of selling
	Updating the database
	Connecting the pieces
	Summary
	
	Chapter 9: Finishing the Game
	Outstanding development tasks
	Missing development skills
	Cleaning up assets
	Releasing the game
	Problems with location-based games
	Location-based multiplayer game
	Firebase as a multiplayer platform
	Other location-based game ideas
	The future of the genre
	Summary
	
	Chapter 10: Troubleshooting
	Console window
	Compiler errors and warnings
	Debugging
	Remote debugging
	Advanced debugging
	Logging
	CUDLR
	Unity Analytics
	Issues and solutions by Chapter
	Summary
	
	Index