In Pro Unity Game Development with C#, Alan Thorn, author of Learn Unity for 2D Game Development and experienced game developer, takes you through the complete C# workflow for developing a cross-platform first person shooter in Unity. C# is the most popular programming language for experienced Unity
Pro unity game development with C#
โ Scribed by Thorn, Alan
- Publisher
- Apress
- Year
- 2014
- Tongue
- English
- Leaves
- 335
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
InPro Unity Game Development with C#, Alan Thorn, author ofLearn Unity for 2D Game Developmentand experienced game developer, takes you through the complete C# workflow for developing a cross-platform first person shooter in Unity. C# is the most popular programming language for experienced Unity developers, helping them get the most out of what Unity offers. If you're already using C# with Unity and you want to take the next step in becoming an experienced, professional-level game developer, this is the book you need.Whether you are a student, an indie developer, or a season game dev professional, you'll find helpful C# examples of how to build intelligent enemies, create event systems and GUIs, develop save-game states, and lots more.
You'll understand and apply powerful programming concepts such as singleton classes, component based design, resolution independence, delegates, and event driven programming.
By the end of the book, you will have a complete first person shooter game up and running with Unity. Plus you'll be equipped with the know-how and techniques needed to deploy your own professional-grade C# games.
If you already know a bit of C# and you want to improve your Unity skills, this is just the right book for you.
โฆ Table of Contents
Contents at a Glance......Page 3
Contents......Page 327
About the Author......Page 333
About the TechnicalReviewer......Page 334
Acknowledgments......Page 335
Introduction......Page 4
Chapter 1: Designing and Preparing......Page 7
Game Overview......Page 8
Game in Depth......Page 10
Developing the Design: Looking Ahead......Page 16
Tip #1: Interface Layout......Page 18
Tip #2: Dual-Monitors......Page 20
Tip #3: Be Organized......Page 21
Tip #4: Show Project Wizard on Start-up......Page 27
Tip #5: Use FBX Meshes......Page 28
Tip #6: Disable Ambient Lighting......Page 30
Tip #7: Use Root GameObjects......Page 31
Tip #8: Incremental Backups......Page 32
Tip #9: Batch Renaming......Page 33
Tip #10: Showing Empty Objects in the Editor......Page 37
Tip #11: Use the Stats Panel......Page 39
Tip #12: Testing Resolution and Aspect Ratio......Page 40
Conclusion......Page 41
Step 1: Create Folders......Page 42
Step 2: Importing Textures and Meshes......Page 43
Step 3: FBX Meshes and Scale Factor......Page 45
Step 4: Configuring Meshes......Page 47
Step 5: Planning and Configuring Textures......Page 51
Step 6: Building Sprites......Page 56
Step 7: Importing Audio......Page 59
Step 8: Create Prefabs......Page 60
Step 9: Scene Building......Page 66
Step 10: Lighting and Lightmapping......Page 69
Step 11: Building a Navigation Mesh......Page 78
Conclusion......Page 85
Chapter 3: Event Handling......Page 86
Events and Responses......Page 87
Event Handling......Page 88
Planning Event Handling......Page 89
Planning a Dedicated Event-Handling System......Page 92
Getting Started with NotificationsManager......Page 94
Keeping Track of Notifications with .NET Dictionaries......Page 97
Generic Classes and C#......Page 100
Registering As a Listener......Page 101
Posting Notifications......Page 103
SendMessage and BroadcastMessage......Page 104
Removing Listeners......Page 106
Removing Redundancies......Page 107
Completing NotificationsManager......Page 108
Working with the NotificationsManager......Page 110
Conclusion......Page 116
Chapter 4: Power-Ups and Singletons......Page 118
Creating the Cash Power-Up......Page 119
Power-Ups and Billboards......Page 120
Billboards and Cached Transforms......Page 122
Billboards and Rotation......Page 123
Billboards and Bobbing......Page 126
Coroutines......Page 127
Power-Up Motion with Coroutines and deltaTime......Page 130
Exploring deltaTime......Page 132
Completing Power-Up Bobbing......Page 133
Power-Up Collision......Page 134
Handling Collision Events: Getting Started......Page 137
Collisions and Responses......Page 138
Introducing the GameManager......Page 140
GameManager and Singletons......Page 141
GameManager and Event Handling......Page 144
Completing the Cash Power-Up......Page 146
Making a Prefab from the Completed Power-Up......Page 147
Creating Other Prefabs......Page 149
Conclusion......Page 150
Character Controllers and the First Person Controller......Page 151
Multiplatform Development......Page 154
Beginning the Universal First Person Controller......Page 156
Platform Dependent Compilation......Page 161
Head Bobbing and Sine Waves......Page 162
First-Person Capsule Mesh......Page 166
Handling Cash Collection......Page 167
Life and Death: Getting Started......Page 170
Making Death: Scripting with Mecanim......Page 173
Implementing Health......Page 175
Health and Damage: Procedural Textures......Page 178
GUIs......Page 179
Conclusion......Page 181
Weapons Overview......Page 182
Object Orientation: Classes and Instances......Page 183
Object Orientation: Inheritance......Page 184
Animations, Frames, and Prefabs......Page 187
Cameras: Layers and Rendering......Page 191
Cameras: Orthographic Size......Page 197
Weapon Implementation: Punching......Page 199
Physics and Damage Dealing......Page 202
Weapon Changing and Polymorphism......Page 204
Completing the Punch and Gun Weapons......Page 210
Conclusion......Page 218
Meet the Bad Guys......Page 219
Starting the Enemy Drone Prefab......Page 221
Coding Enemy Damage......Page 224
Improving Damage Dealing: Feedback......Page 227
Enemies, Intelligence, and Philosophical Zombies......Page 232
Finite State Machines (FSMs)......Page 234
Changing Between States......Page 235
Preparing for State Implementation......Page 238
The Patrol State......Page 241
Refining the Patrol State......Page 244
The Chase and Attack States......Page 248
Adding More Enemy Types......Page 255
Summary......Page 256
GUIs in Games......Page 257
Getting Started with GUIs......Page 258
Resolution Dependence and Independence......Page 260
Main Menu and Aspect Ratio......Page 265
Testing the Main Menu......Page 269
Adding Buttons to the Main Menu......Page 271
Handling Button Presses......Page 274
HUD: Ammo and Health Statuses......Page 276
Summary......Page 281
Persistent Data: PlayerPrefs, Binary Data, and More......Page 283
Player Preferences Class......Page 284
File-Based Persistence......Page 285
Saving with XML......Page 286
Getting Started with XML: Serialization......Page 289
Loading from and Saving to an XML File......Page 291
Completing the GameManager Class......Page 292
Completing the PlayerController Class......Page 297
Completing the Enemy Class......Page 299
Testing Save and Load Functionality......Page 301
Summary......Page 303
Chapter 10: Refinements and Improvements......Page 304
Level Changing......Page 305
Interfaces......Page 307
Delegates......Page 310
Ternary Operator......Page 312
Automatic Properties......Page 313
Private Does Not Mean Inaccessible......Page 314
goto is C# Teleportation......Page 315
Static is Omnipresent......Page 316
Summary......Page 317
Index......Page 319
๐ SIMILAR VOLUMES
In Pro Unity Game Development with C#, Alan Thorn, author of Learn Unity for 2D Game Development and experienced game developer, takes you through the complete C# workflow for developing a cross-platform first person shooter in Unity. C# is the most popular programming language for experienced Unity
Master realistic animations and graphics, particle systems, game AI and physics, sprites and VR development with Unity 2017 About This Book Create professional grade games with realistic animation and graphics, particle systems and game physics with Unity 2017 Unleash the power of C# scripting to
Follow a walkthrough of the Unity Engine and learn important 2D-centric lessons in scripting, working with image assets, animations, cameras, collision detection, and state management. In addition to the fundamentals, you'll learn best practices, helpful game-architectural patterns, and how to custo
Follow a walkthrough of the Unity Engine and learn important 2D-centric lessons in scripting, working with image assets, animations, cameras, collision detection, and state management. In addition to the fundamentals, you'll learn best practices, helpful game-architectural patterns, and how to custo