Learn advanced C# tips and techniques to make professional-grade games with UnityAbout This BookPacked with hands-on tasks and real-world scenarios that will help you apply C# conceptsLearn how to work with event-driven programming, regular expressions, customized rendering, AI, and lots moreEasy-to-follow structure and language, which will help you understand advanced ideasWho This Book Is ForMastering Unity Scripting is an advanced book intended for students, educators, and professionals familiar with the Unity basics as well as the basics of scripting. Whether you've been using Unity for a short time or are an experienced user, this book has something important and valuable to offer to help you improve your game development workflow.
What You Will LearnUnderstand core C# concepts, such as class inheritance, interfaces, singletons, and static objectsImplement effective Artificial Intelligence for NPCsWork with event-driven programming to optimize your codeDevelop solid debugging and diagnostic techniquesGet to know the Mono Framework and Linq in practical contextsCustomize the rendering functionality for postprocess effectsCode line of sight, view testing, and other useful algorithmsImprove the quality of your code with the help of concepts such as attributesIn DetailThis book is an easy-to-follow guide that introduces you to advanced tips and techniques to code Unity games in C#. Using practical and hands-on examples across ten comprehensive chapters, you'll learn how C# can be applied creatively to build professional-grade games that sell.
You will be able to create impressive Artificial Intelligence for enemy characters, customize camera rendering for postprocess effects, and improve scene management by understanding component-based architecture. In addition, you will have an in-depth look at the .NET classes used to increase program reliability, see how to process datasets such as CSV files, and understand how to run advanced queries on data. By the end of this book, you'll become a powerful Unity developer, equipped with plenty of tools and techniques to quickly and effectively develop merchantable games.
An insight on how to learn coding or general understanding of coding. A very curious read on my part and overall a very memorable memory on to code in Unity. Did a few times for Artifact beta. Didn't pan out as expected but really test someone's patience and strength to muster through it all.
Packt Publishing released a new book on Unity scripting in February of this year. Entitled “Mastering Unity Scripting” it was written by Alan Thorn who has authored several other books on Unity and UDK. Like most Packt Publishing titles this book includes the book’s files and a PDF of the colored images from the book that you can download from their website. This is an advanced book using Unity’s version of C# and it certainly helps to have completed a few Unity tutorials. That being said the first two chapters of the book are C# refreshers and cover the basics of creating a project. The book then reviews C# all the way through classes and polymorphism. Chapter three covers Singletons which are ways of making an object persist throughout all of the levels and parts of your game. Singletons are the GameManager, HighScoreManager, and the SaveGameManager of your game. This chapter also discusses many other facets of game objects including when to update and change them. Chapter four discusses event-driven programming and how to use this method for optimizing your game. Essentially the updating of game objects is removed from the Update function of your class and placing them into new classes that are driven by the events of the game. This seems to be a useful technique for all but the smallest of games. Chapter five is all about cameras, using multiple ones, their placement and working with line of sight issues. Chapter six talks about working with MonoDevelop the IDE that comes with Unity. MonoDevelop has useful features that Unity programmers can use build extra functionality into their games. The IDE also allows you to use regular expressions and LINQ (querying of databases) in Unity. Chapter seven demonstrates how to create artificial intelligence in Unity. The whole idea of artificial intelligence is to have enemies appear to make intelligent decisions based on what the player does. I really enjoyed this chapter as it has clear examples of using Finite State Machines (FSM) to make NPC characters appear to be intelligent. Chapter eight discusses ways of adding functionality to the Unity editor. Unity’s editor allows you to do many things and the asset store allows you to purchase the ability to do many more. Sometimes it’s easier to just program these abilities on your own. One of the nice examples that’s included in this chapter is setting up your game so that you can localize it into many different languages. Chapters nine covers Unity 2D objects and textures. Specifically, setting up a skybox where clouds are rotating is explained through an example that is provided. Examples are also given for setting up an asset database and setting up a scrolling texture for your game. Chapter ten discusses setting up source control, specifically Git, for your game. Creating save game files and resource files is also explained. These features are important to most games, so it is wonderful that this is explained here. Overall I enjoyed “Mastering Unity Scripting” and would recommend that everyone purchases this book. It is a great reference book that explains how to code in Unity many different aspects of game design that most game creators will need at some point in their game development career. Alan Thorn’s website is at http://www.alanthorn.net/.