Unity in Action
eBook - ePub

Unity in Action

Multiplatform game development in C#

  1. 400 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Unity in Action

Multiplatform game development in C#

About this book

Summary Manning's bestselling and highly recommended Unity book has been fully revised! Unity in Action, Second Edition teaches you to write and deploy games with the Unity game development platform. You'll master the Unity toolset from the ground up, adding the skills you need to go from application coder to game developer.Foreword by Jesse Schell, author of The Art of Game DesignPurchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology Build your next game without sweating the low-level details. The Unity game development platform handles the heavy lifting, so you can focus on game play, graphics, and user experience. With support for C# programming, a huge ecosystem of production-quality prebuilt assets, and a strong dev community, Unity can get your next great game idea off the drawing board and onto the screen! About the Book Unity in Action, Second Edition teaches you to write and deploy games with Unity. As you explore the many interesting examples, you'll get hands-on practice with Unity's intuitive workflow tools and state-of-the-art rendering engine. This practical guide exposes every aspect of the game dev process, from the initial groundwork to creating custom AI scripts and building easy-to-read UIs. And because you asked for it, this totally revised Second Edition includes a new chapter on building 2D platformers with Unity's expanded 2D toolkit. What's Inside

  • Revised for new best practices, updates, and more!
  • 2D and 3D games
  • Characters that run, jump, and bump into things
  • Connect your games to the internet


About the Reader You need to know C# or a similar language. No game development knowledge is assumed. About the Author Joe Hocking is a software engineer and Unity expert specializing in interactive media development. Table of Contents

PART 1 - First steps

  • Getting to know Unity
  • Building a demo that puts you in 3D space
  • Adding enemies and projectiles to the 3D game
  • Developing graphics for your game

PART 2 - Getting comfortable

  • Building a Memory game using Unity's 2D functionality
  • Creating a basic 2D Platformer
  • Putting a GUI onto a game
  • Creating a third-person 3D game: player movement and animation
  • Adding interactive devices and items within the game

PART 3 - Strong finish

  • Connecting your game to the internet
  • Playing audio: sound effects and music
  • Putting the parts together into a complete game
  • Deploying your game to players' devices

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Unity in Action by Joseph Hocking in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Games. We have over one million books available in our catalogue for you to explore.

Information

Part 1
First steps

It’s time to take your first steps in using Unity. If you don’t know anything about Unity, that’s okay! I’m going to start by explaining what Unity is, including the fundamentals of how to program games in it. Then we’ll walk through a tutorial about developing a simple game in Unity. This first project will teach you a number of specific game development techniques, as well as giving you a good overview of how the process works.
Onward to chapter 1!

1
Getting to know Unity

This chapter covers
  • What makes Unity a great choice
  • Operating the Unity editor
  • Programming in Unity
  • Comparing C# and JavaScript
If you’re anything like me, you’ve had developing a video game on your mind for a long time. But it’s a big jump from playing games to making them. Numerous game development tools have appeared over the years, and we’re going to discuss one of the most recent and most powerful of these tools. Unity is a professional-quality game engine used to create video games targeting a variety of platforms. Not only is it a professional development tool used daily by thousands of seasoned game developers, it’s also one of the most accessible modern tools for novice game developers. Until recently, a newcomer to game development would face lots of imposing barriers right from the start, but Unity makes it easy to start learning these skills.
Because you’re reading this book, chances are you’re curious about computer technology and you’ve either developed games with other tools or built other kinds of software, such as desktop applications or websites. Creating a video game isn’t fundamentally different from writing any other kind of software; it’s mostly a difference of degree. For example, a video game is a lot more interactive than most websites, and thus involves very different sorts of code, but the skills and processes involved in creating both are similar. If you’ve already cleared the first hurdle on your path to learning game development, having learned the fundamentals of programming software, then your next step is to pick up some game development tools and translate that programming knowledge into the realm of gaming. Unity is a great choice of game development environment to work with.

A warning about terminology

This book is about programming in Unity and is therefore primarily of interest to coders. Although many other resources discuss other aspects of game development and Unity, this is a book where programming takes front and center.
Incidentally, note that the word developer may have an unfamiliar meaning in the context of game development: developer is a synonym for programmer in disciplines like web development, but in game development the word developer often refers to anyone who works on a game, with programmer being a specific role within that. Other kinds of game developers are artists and designers, but this book focuses on programming.
To start, go to www.unity3d.com to download the software. This book uses Unity 2017.1, which is the latest version as of this writing. The URL is a leftover from Unity’s original focus on 3D games; support for 3D games remains strong, but Unity works great for 2D games as well, and this book covers both. Indeed, even when demonstrated on a 3D demo, many topics (saving data, playing audio, and so on) apply to both. Meanwhile, although there are also paid versions, the base version is free. Everything in this book works in the free version, and none of it requires the paid versions of Unity, which differ mainly in commercial licensing terms.

1.1 Why is Unity so great?

Let’s take a closer look at that description from the beginning of the chapter: Unity is a professional-quality game engine used to create video games targeting a variety of platforms. That’s a fairly straightforward answer to the straightforward question: “What is Unity?” But, what exactly does that answer mean, and why is Unity so great?

1.1.1 Unity's strengths and advantages

Game engines provide a plethora of features that are useful across many different games. A game implemented using a particular engine will get all those features, while adding custom art assets and gameplay code specific to that game. Unity has physics simulation, normal maps, screen space ambient occlusion (SSAO), dynamic shadows . . . and the list goes on. Many game engi...

Table of contents

  1. Praise for the First Edition
  2. Titlepage
  3. Copyright
  4. foreword
  5. preface
  6. acknowledgments
  7. about this book
  8. about the author
  9. about the cover illustration
  10. Part 1: First steps
  11. Part 2: Getting comfortable
  12. Part 3: Strong finish
  13. afterword
  14. Appendix A: Scene navigation and keyboard shortcuts
  15. Appendix B: External tools used alongside Unity
  16. Appendix C: Modeling a bench in Blender
  17. Appendix D: Online learning resources
  18. Index