Welcome to the start of your adventure into game programming with Unity. This book is designed to teach you how to program video games from the ground up, while still engaging you with plenty of hands-on experience. It’s not focused on completing ambitious projects, and it’s not about fancy graphics. We’re learning how to program and how to use the Unity engine. Once you have a solid understanding of these integral topics, you can expand your knowledge and make more and more complicated and impressive games.
All of the software we’ll be using is cross-platform. This book will mostly stick to Windows-based terminology and examples, but you can still follow through with other major operating systems, like Mac or Linux, with little or no extra trouble.
As for system requirements, any modern computer purchased within the last 6 years or so should have little difficulty running the software we’ll be working with. Since we aren’t fiddling with high-end graphics or computing long-winded algorithms, the example projects we develop should run fine on most systems. If you have concerns, the official and most up-to-date system requirements for Unity can be found at the official website here:
https://unity3d.com/unity/system-requirements
In Chapters 1–12, we’ll begin with a primer for the essential concepts of the Unity game engine itself and get all our tools set up and ready for action. Then, we’ll get into the nitty-gritty details of programming, and we’ll start to actually write code ourselves.
In the remainder of the book, we’ll tackle individual game projects one at a time, making playable projects that you can add to later if you please. This is where you’ll get much of your hands-on experience. We’ll implement actual game mechanics, which is what you’re really after as a game programmer, right?
Game Project 1, “Obstacle Course” (Chapters 13–25), will be a top-down obstacle course where the player moves their character with WASD or the arrow keys to avoid touching hazards of various forms: patrolling and wandering hazards, traveling projectiles, and spike traps in the floor. We’ll get practice with basic movement and rotation, setting up levels, working with fundamental Unity concepts like prefabs and scripting, and setting up UI.
Game Project 2, “Tower Defense” (Chapters 26–32), will be the basis of a simple "tower defense" game, where the player places defensive structures on the playing field. Enemies will navigate from one side of the field to the other, and the player’s defenses will attempt to fend them off. We’ll explore basic pathfinding (how the enemies navigate around arbitrary obstacles) and further expand on fundamental programming concepts.
Game Project 3, “Physics Playground” (Chapters 33–41), will be a 3D physics playground with first- and third-person camera support for a player character with more intricate mouse-aimed movement, jumping, wall jumping, and gravity systems. We’ll explore the possibilities of Unity physics, from detecting objects with raycasts to setting up joints and Rigidbodies.
is a hobbyist game developer, who found inspiration in the capacity for immersion and interactivity provided by games. His area of focus is the Unity game engine. He has nurtured a passion for video games since he was a child. In his early teens, this interest led him on a journey into the world of game design and programming. He is self-taught through a variety of personal projects, some small and some lofty. He has been a regular contributor on various online game development platforms and spends far too much time in front of the computer.
has been building software professionally for more than 25 years and has served at just about every position in the SDLC. He has served as President/CEO, VP of Product Development, CTO, Software Architect, Developer, and Scrum Master/Product Manager. He believes that building good software is an art and is passionate about correctly architected software, efficient development processes, documentation, reducing technical debt, organization, and productivity. He specializes in building Unity, web, and mobile applications focused on gamification. You can find out more about Robert at his website, www.robertlair.com .
18.226.187.24