Game Programming with Unity and C#: A Complete Beginner's Guide, Second Edition

  • 9h 44m
  • Casey Hardman
  • Apress
  • 2024

Learn the essentials of the Unity game engine, the C# programming language, and the art of object-oriented programming. This book is aimed at beginners with no knowledge or experience in game development or programming.

Packed with examples, this Second Edition is up-to-date with the latest Unity standards and features as of 2023, and includes many adjustments to improve your experience. Starting with an introduction to Unity, you will learn the essentials of the engine: navigating the various windows, managing the objects that make up your game, and understanding the concepts that are fundamental to the engine. After that, you will gain a solid foundation in the concepts of object-oriented programming and the syntax of the C# language. Then the fun really begins, as you get hands-on experience building three playable example projects that drill you on the concepts you’ve learned until they stick.

Guided at each step by author Casey Hardman, you will outline and implement bare-bones, simple games designed to exercise your development skills: a top-down obstacle course, a tower defense game, and a 3D playground that demonstrates Unity's physics features. As you progress through the book, you'll put to use more and more of the features of C# and Unity, adding tools to your belt and strengthening you as a game developer. By the time you’ve completed the book, you will be empowered to strike out on your own and build the game mechanics of your choice.

What You Will Learn

  • Understand the fundamentals of object-oriented computer programming and the C# programming language
  • Leverage the features of Unity to implement game mechanics with reusable, clean, and elegant code
  • Design and implement your own mechanics and independently solve problems as they arise

Who This Book Is For

Beginners who have no prior experience with programming or game development, who would like to learn to create games with a solid foundation that prepares them to further develop their skills.

About the Author

Casey Hardman has been a programmer and hobbyist game developer for over 8 years. He found inspiration in the capacity for immersion and interactivity provided by games, and 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 programming and game design. He works with the Unity game engine, the Godot game engine, and Web development technologies.

In this Book

  • Introduction
  • Installation and Setup
  • Unity Basics
  • Manipulating the Scene
  • Parents and Their Children
  • Prefabs
  • Programming Primer
  • Code Blocks and Methods
  • Conditions
  • Working with Objects
  • Working with Scripts
  • Inheritance
  • Debugging
  • Obstacle Course Design and Outline
  • Player Movement
  • Death and Respawning
  • Basic Hazards
  • Walls and Goals
  • Patrolling Hazards
  • Wandering Hazards
  • Dashing
  • Designing Levels
  • Menus and UI
  • In-Game Pause Menu
  • Spike Traps
  • Obstacle Course Conclusion
  • Tower Defense Design and Outline
  • Camera Movement
  • Enemies and Projectiles
  • Towers and Targeting
  • Build Mode UI
  • Building and Selling
  • Play Mode Logic
  • Enemy Logic
  • More Tower Types
  • Tower Defense Conclusion
  • Physics Playground Design and Outline
  • Mouse-Aimed Camera
  • Advanced 3D Movement
  • Wall Jumping
  • Pulling and Pushing
  • Moving Platforms
  • Joints and Swings
  • Force Fields and Jump Pads
  • Conclusion
SHOW MORE
FREE ACCESS