Welcome to NPC Programming, the third course in Unity's Gameplay Programming Specialization!
This course is exam preparation for Unity's Expert Gameplay Programmer Certification Exam. This course will challenge you with a series of realistic programming problems in Unity video-game projects, inspired by one or more of the topics covered in the Expert Gameplay Programmer Exam. Throughout this course, you will work on a 3D “Dual-Stick Survivor” game project. This will help you practice programming NPCs within games, including scripting NPC logic and behavior, navigation and pathfinding, raycasting, and NPC spawning and placement.
This is an advanced-level course, intended for industry game developers or very experienced Unity enthusiasts who are looking to “level-up” their gameplay programming and implementation strategies. To succeed in this courses, you should have at least 2-3 years of experience developing games with Unity. You should be familiar with the full-game lifecycle (working from early concept to launch), creating and working with Prefabs, understanding game asset and animation pipelines, and have some experience with Unity Services. You should also have advanced programming skills, particularly in the C# language.

Рецензии

Filled StarFilled StarFilled StarFilled StarHalf Faded Star

4.1 (оценок: 16)

5 stars

9 ratings

4 stars

3 ratings

3 stars

2 ratings

1 star

2 ratings

Из урока

NPC Spawning & Placement

NPCs are often the most interesting problem to solve in any game, and the issue of when and where to spawn them is a top priority. A wrong solution to this issue can hamper gameplay by making things boring or too difficult, not to mention tax the system resources of your target platform. This week you’ll be spawning NPCs into your game after evaluating where and how often they should be appearing. Analyzing what will best support gameplay and what the target platform can sustain are critical.

Преподаватели

Unity Technologies

Dustin Carroll

Senior Technical Artist & Adjunct Instructor

Текст видео

Much like any other game object that you can choose to load at scene or spawn during runtime, NPCs are no different. You have to make some choices as to what will be there or what will be spawned by a script. Now depending on your game, this is going to affect your choice. If you plan on having a lot of enemies coming and going, spawning them is probably going make a lot of sense and you probably going to want to use a pool. However, if you have singular enemies maybe a big boss in the middle who is only ever going to be one of, put them directly into the scene could potentially make sense. The other thing to consider is whether you're reusing a stage, but spawning different enemies or encountering different bosses. Now, if you plan on having your player re-enter a scene but expect to encounter different enemies or perhaps a different boss, maybe in response to something that it in-game, spawning your NPCs and your boss dynamically is definitely something you're going to have to consider. Now, the cost of instantiation of course comes into play again. If you're going to be spawning a whole bunch of NPCs or destroying a whole bunch of NPCs in a short amount of time, the cost of instantiation or garbage collection is going to be kind of high. In this case, you're going to want to have to build a pool of enemies and use that. The cost of having something in the pool is a lot less than the cost of instantiating or garbage collecting over a short amount of time.