gogogo
Syndetics cover image
Image from Syndetics

Unity in action : multiplatform game development in C# / Joseph Hocking ; foreword by Jesse Schell.

By: Material type: TextTextPublisher: Shelter Island, NY : Manning Publications Co., [2022]Copyright date: ©2022Edition: Third editionDescription: xxvii, 386 pages : illustrations ; 24 cmContent type:
  • text
  • still image
Media type:
  • unmediated
Carrier type:
  • volume
ISBN:
  • 9781617299339
Subject(s): DDC classification:
  • 794.81526 23
Holdings
Item type Current library Call number Status Date due Barcode
Standard Loan Clonmel Library Main Collection 794.815 HOC (Browse shelf(Opens below)) Available 39002100612895

Enhanced descriptions from Syndetics:

Create your first 2D, 3D, and AR/VR games with the awesome Unity game platform. With this hands-on beginner's guide, you'll start building games fast!
In Unity in Action, Third Edition , you will learn how to: Create characters that run, jump, and bump into things Build 3D first-person shooters and third-person action games Construct 2D card games and side-scrolling platformers Script enemies with AI Improve game graphics by importing models and images Design an intuitive user interface for your games Play music and spatially-aware sound effects Connect your games to the internet for online play Deploy your games to desktop, mobile, and the web
Thousands of new game developers have chosen Joe Hocking's Unity in Action as their first step toward Unity mastery. This fully updated third edition comes packed with fully refreshed graphics, Unity's latest features, and coverage of the augmented and virtual reality toolkits. Using your existing coding skills, you'll write custom code instead of just clicking together premade scripts. You'll master the Unity toolset from the ground up, adding the skills you need to go from application coder to game developer.
Build your next game without sweating the low-level details. The Unity game engine handles the heavy lifting, so you can focus on game play, graphics, and user experience. With support for C#, a huge ecosystem of production-quality prebuilt assets, and a strong dev community, Unity will get your game idea off the drawing board and onto the screen! You can even use Unity for more than game development, with new tools for VR and augmented reality that are perfect for developing useful apps.

Previous edition: 2018.

Includes bibliographical references and index.

Table of contents provided by Syndetics

  • Foreword (p. xv)
  • Preface (p. xvii)
  • Acknowledgments (p. xix)
  • About this book (p. xxi)
  • About the author (p. xxv)
  • About the cover illustration (p. xxvi)
  • Part 1 First steps (p. 1)
  • 1 Getting to know Unity (p. 3)
  • 1.1 Why is Unity so great? (p. 4)
  • Unity's strengths and advantages (p. 4)
  • Downsides to be aware of (p. 6)
  • Example games built with Unity (p. 7)
  • 1.2 How to use Unity (p. 10)
  • Scene view, Game view, and the Toolbar (p. 12)
  • The mouse and keyboard (p. 14)
  • The Hierarchy view and the Inspector panel (p. 15)
  • The Project and Console tabs (p. 16)
  • 1.3 Getting up and running with Unity programming (p. 16)
  • Running code in Unity: Script components (p. 17)
  • Using Visual Studio, the included IDE (p. 18)
  • Printing to the console: Hello World! (p. 19)
  • 2 Building a demo that puts you in 3D space (p. 23)
  • 2.1 Before you start... (p. 24)
  • Planning the project (p. 24)
  • Understanding 3D coordinate space (p. 25)
  • 2.2 Begin the project: Place objects in the scene (p. 27)
  • The scenery: Floor, outer walls, and inner walls (p. 28)
  • Lights and cameras (p. 30)
  • The player's collider and viewpoint (p. 32)
  • 2.3 Make things move: A script that applies transforms (p. 33)
  • Visualizing how movement is programmed (p. 33)
  • Writing code to implement the diagram (p. 34)
  • Understanding local vs. global coordinate space (p. 35)
  • 2.4 Script component for looking around: MouseLook (p. 37)
  • Horizontal rotation that tracks mouse movement (p. 38)
  • Vertical rotation with limits (p. 39)
  • Horizontal and vertical rotation at the same time (p. 41)
  • 2.5 Keyboard input component: First-person controls (p. 44)
  • Responding to keypresses (p. 44)
  • Setting a rate of movement independent of the computer's speed (p. 45)
  • Moving the CharacterController for collision detection (p. 46)
  • Adjusting components for walking instead of flying (p. 47)
  • 3 Adding enemies and projectiles to the 3D game (p. 50)
  • 3.1 Shooting via raycasts (p. 51)
  • What is raycasting? (p. 51)
  • Using the ScreenPointToRay command for shooting (p. 52)
  • Adding visual indicators for aiming and hits (p. 54)
  • 3.2 Scripting reactive targets (p. 57)
  • Determining what was hit (p. 57)
  • Alerting the target that it was hit (p. 58)
  • 3.3 Basic wandering AI (p. 60)
  • Diagramming how basic AI works (p. 60)
  • "Seeing" obstacles with a raycast (p. 61)
  • Tracking the character's state (p. 62)
  • 3.4 Spawning enemy prefabs (p. 64)
  • What is a prefab? (p. 64)
  • Creating the enemy prefab (p. 65)
  • Instantiating from, an invisible SceneController (p. 65)
  • 3.5 Shooting by instantiating objects (p. 68)
  • Creating the projectile prefab (p. 68)
  • Shooting the projectile and colliding with a target (p. 70)
  • Damaging the player (p. 73)
  • 4 Developing graphics for your game (p. 75)
  • 4.1 Understanding art assets (p. 76)
  • 4.2 Building basic 3D scenery: Whiteboxing (p. 78)
  • Whiteboxing explained (p. 79)
  • Drawing a floor plan for the level (p. 79)
  • Laying out primitives according to the plan (p. 80)
  • 4.3 Texturing the scene with 2D images (p. 82)
  • Choosing a file format (p. 83)
  • Importing an image file (p. 84)
  • Applying the image (p. 85)
  • 4.4 Generating sky visuals by using texture images (p. 87)
  • What is a skybox? (p. 87)
  • Creating a new skybox material (p. 88)
  • 4.5 Working with custom 3D models (p. 90)
  • Which file format to choose? (p. 91)
  • Exporting and importing the model (p. 92)
  • 4.6 Creating effects by using particle systems (p. 95)
  • Adjusting parameters on the default effect (p. 96)
  • Applying a new texture for fire (p. 98)
  • Attaching particle effects to 3D objects (p. 99)
  • Part 2 Getting comfortable (p. 101)
  • 5 Building a Memory game using Unity's 2D functionality (p. 103)
  • 5.1 Setting up everything for 2D graphics (p. 104)
  • Preparing the project (p. 105)
  • Displaying 2D images (aka sprites) (p. 107)
  • Switching the camera to 2D mode (p. 108)
  • 5.2 Building a card object and making it react to clicks (p. 110)
  • Building the object out of sprites (p. 110)
  • Mouse input code (p. 111)
  • Revealing the card on a click (p. 112)
  • 5.3 Displaying the various card images (p. 113)
  • Loading images programmatically (p. 113)
  • Setting the image from an invisible SceneController (p. 114)
  • Instantiating a grid of cards (p. 116)
  • Shuffling the cards (p. 118)
  • 5.4 Making and scoring matches (p. 119)
  • Storing and comparing revealed cards (p. 120)
  • Hiding mismatched cards (p. 120)
  • Text display for the score (p. 121)
  • 5.5 Restart button (p. 123)
  • Programming a UIButton component by using SendMessage (p. 124)
  • Calling LoadScene from SceneController (p. 126)
  • 6 Creating a basic 2D platformer (p. 128)
  • 6.1 Setting up the graphics (p. 129)
  • Placing the scenery (p. 129)
  • Importing sprite sheets (p. 130)
  • 6.2 Moving the player left and right (p. 132)
  • Writing keyboard controls (p. 133)
  • Colliding with the block (p. 134)
  • 6.3 Playing the sprite's animation (p. 134)
  • Explaining the Mecanim animation system (p. 134)
  • Triggering animations from code (p. 136)
  • 6.4 Adding the ability to jump (p. 137)
  • Falling from gravity (p. 137)
  • Applying an upward impulse (p. 138)
  • Detecting the ground (p. 139)
  • 6.5 Additional features for a platform game (p. 140)
  • Unusual floors: Slopes and one-way platforms (p. 140)
  • Implementing moving platforms (p. 142)
  • Camera control (p. 145)
  • 7 Putting a GUI onto a game (p. 147)
  • 7.1 Before you start writing code... (p. 149)
  • Immediate mode GUI or advanced 2D interface? (p. 149)
  • Planning the layout (p. 150)
  • Importing UI images (p. 151)
  • 7.2 Setting up the GUI display (p. 151)
  • Creating a canvas for the interface (p. 151)
  • Buttons, images, and text labels (p. 153)
  • Controlling the position of UI elements (p. 156)
  • 7.3 Programming interactivity in the UI (p. 157)
  • Programming an invisible UIController (p. 158)
  • Creating a pop-up window (p. 160)
  • Setting values using sliders and input fields (p. 163)
  • 7.4 Updating the game by responding to events (p. 166)
  • Integrating an event system (p. 166)
  • Broadcasting and listening for events from the scene (p. 167)
  • Broadcasting and listening for events from the HUD (p. 168)
  • 8 Creating a third-person 3D game: Player movement and animation (p. 171)
  • 8.1 Adjusting the camera view for third-person (p. 173)
  • Importing a character to look at (p. 174)
  • Adding shadows to the scene (p. 175)
  • Orbiting the camera around the player character (p. 177)
  • 8.2 Programming camera-relative movement controls (p. 180)
  • Rotating the character-to face movement direction (p. 180)
  • Moving forward in that direction (p. 183)
  • 8.3 Implementing the jump action (p. 184)
  • Applying vertical speed and acceleration (p. 185)
  • Modifying the ground detection to handle edges and slopes (p. 186)
  • 8.4 Setting up animations on the player character (p. 190)
  • Defining animation clips in the imported model (p. 192)
  • Creating the animator controller for these animations (p. 194)
  • Writing code that operates the animator (p. 197)
  • 9 Adding interactive devices and items within the game (p. 200)
  • 9.1 Creating doors and other devices (p. 201)
  • Doors that open and close on a keypress (p. 201)
  • Checking distance and facing before opening the door (p. 203)
  • Operating a color-changing monitor (p. 205)
  • 9.2 Interacting with objects by bumping into them (p. 206)
  • Colliding with physics-enabled obstacles (p. 206)
  • Operating the door with a trigger object (p. 207)
  • Collecting items scattered around the level (p. 210)
  • 9.3 Managing inventory data and game state (p. 212)
  • Setting up player and inventory managers (p. 212)
  • Programming the game managers (p. 214)
  • Storing inventory in a collection object: List vs. Dictionary (p. 217)
  • 9.4 Inventory UI for using and equipping items (p. 220)
  • Displaying inventory items in the IT (p. 220)
  • Equipping a key to use on locked doors (p. 223)
  • Restoring the player's health by consuming health packs (p. 224)
  • Part 3 Strong finish (p. 227)
  • 10 Connecting your game to the internet (p. 229)
  • 10.1 Creating an outdoor scene (p. 231)
  • Generating sky visuals by using a skybox (p. 231)
  • Setting up an atmosphere that's controlled by code (p. 232)
  • 10.2 Downloading weather data from an internet service (p. 235)
  • Requesting HTTP data using coroutines (p. 238)
  • Parsing XML (p. 242)
  • Parsing JSON (p. 243)
  • Affecting the scene based on weather data (p. 246)
  • 10.3 Adding a networked billboard (p. 247)
  • Loading images from the internet (p. 247)
  • Displaying images on the billboard (p. 250)
  • Caching the downloaded image for reuse (p. 251)
  • 10.4 Posting data to a web server (p. 253)
  • Tracking current weather: Sending post requests (p. 254)
  • Server-side code in PHP (p. 255)
  • 11 Playing audio: Sound effects and music (p. 257)
  • 11.1 Importing sound effects (p. 258)
  • Supported file formats (p. 258)
  • Importing audio files (p. 260)
  • 11.2 Playing sound effects (p. 261)
  • Explaining what's involved: Audio clip vs. source vs. listener (p. 261)
  • Assigning a looping sound (p. 263)
  • Triggering sound effects from code (p. 264)
  • 11.3 Using the audio control interface (p. 265)
  • Setting up the central AudioManager (p. 265)
  • Volume control UI (p. 267)
  • Playing UI sounds (p. 271)
  • 11.4 Adding background music (p. 272)
  • Playing music loops (p. 272)
  • Controlling music volume separately (p. 276)
  • Fading between songs (p. 278)
  • 12 Putting the parts together into a complete game (p. 282)
  • 12.1 Building an action RPG by repurposing projects (p. 283)
  • Assembling assets and code from multiple projects (p. 284)
  • Programming point-and-click controls: Movement and devices (p. 286)
  • Replacing the old GUI with a new interface (p. 292)
  • 12.2 Developing the overarching game structure (p. 299)
  • Controlling mission flow and multiple levels (p. 299)
  • Computing a level by reaching the exit (p. 303)
  • Losing the level when caught by enemies (p. 305)
  • 12.3 Handling the player's progression through the game (p. 307)
  • Saving and loading the player's progress (p. 307)
  • Beating the game by completing three levels (p. 311)
  • 13 Deploying your game to players' devices (p. 314)
  • 13.1 Start by building for the desktop: Windows, Mac, and Linux (p. 317)
  • Building the application (p. 317)
  • Adjusting player settings: Setting the game's name and icon (p. 318)
  • Platform-dependent compilation (p. 319)
  • 13.2 Building for the web (p. 321)
  • Building the game embedded in a web page (p. 321)
  • Communicating with JavaScript in the browser (p. 322)
  • 13.3 Building for mobile: iOS and Android (p. 325)
  • Setting up the build tools (p. 326)
  • Texture compression (p. 331)
  • Developing plugins (p. 332)
  • 13.4 Developing XR (both VR and AR) (p. 341)
  • Supporting virtual reality headsets (p. 341)
  • AR Foundation for mobile Augmented Reality (p. 342)
  • Afterword (p. 349)
  • Appendix A Scene navigation and keyboard shortcuts (p. 353)
  • Appendix B External tools used alongside Unity (p. 356)
  • Appendix C Modeling a bench in Blender (p. 360)
  • Appendix D Online learning resources (p. 369)
  • Index (p. 373)

Author notes provided by Syndetics

Joe Hocking is a software engineer and Unity expert specializing in interactive media development.

Powered by Koha