Lesson 65 - Series Wrap

Tutorial Series: Introduction to Unity with C# Series

Previous Article


Transcript

Alright, well that's a wrap on introduction the Unity with C#. It feels like we accomplished a lot, and I certainly hope that you feel like you've learned a lot. If you've been following along each step of the way, congratulations, you're in pretty rare company I think, and that kind of persistence, drive and dedication is, I would say the most important factor in learning game dev, or just about learning anything for that matter. And I think that's what will set you apart and I have no doubt that you're equipped to move on to any kind of element that you set your mind to. So, when you think about it we went on quite a journey. If you were new to coding and game development when you started this series, look at how far you've come in how how much you've learned in a relatively short period of time. You should be quite proud of yourself.

My hope is that, if nothing else, that you've come to find that this subject matter in general, coding and game development, isn't nearly as daunting as it may first appeared. Yes. Things will still be murky. You'll have to remind yourself how this or that works, you'll have to Google things that you think you probably should already know, and you'll keep exploring new ideas as you move forward. Just takes time and experience before everything cements and you feel confident in the subject matter in general. That's natural, but hopefully you get a sense of the basic sort of problem solving simplicity that makes up the heart of game development. How you just sort of boil down big problems into tinier, more manageable sets of problems and then sort of tackle them one by one.

So anyways, now that you have a budding interest in coding and game design, you might be curious as to where to go from here. In terms of C# concepts, I think we covered most of the important ones in this series, but if you want to dig deeper it's worth looking into these somewhat more advanced concepts. Advanced being a relative term, things are only as advanced relative to the foundation from which to understand them, but now I'm quite sure you have the foundations in your belt to go into these topics. So first off delegates and events. When we looked at events briefly. I mentioned delegates as a way to store a reference to a method inside a variable. This is extremely useful, especially when paired with events, which basically call these methods stuffed into those delegates when some actual event happens in your game. So both of these concepts are quite useful within unity.

You have anonymous methods. When you understand delegates, you will most often start to use them as input parameters for other methods. Anonymous methods basically lets you insert a variable method into another method. So anonymous methods also allow you to define this variable method in the method call itself, in the method's argument in other words, rather than outside of it like you would define ordinary methods. There is lambda expressions, which sounds kind of interesting, and it is. Lambda expressions is sort of an iteration on anonymous methods. In a lot of ways, it's a simplification of anonymous methods that offers very lean and flexible syntax. You'll see a lot of lambda expressions where there is some sort of database structure, right? So wherever information is stored off in a database like SQL, or sequel for example. So not necessarily important for general Unity development, but it's pretty neat and not too terribly difficult to wrap your head around once you understand anonymous methods.

Anonymous types. It's another topic you might want to look into. These let you kind of create classes on the fly without requiring a predefined class definition or blueprint. This probably isn't something you'll make great use of in Unity. Maybe if you're getting into procedural design. It's worth knowing. There's interfaces. We just recently looked at abstract classes a bit in C# where you're effectively defining a contract of sorts, in which all inheriting classes must abide by this contract. In other words, each inheriting class must include a version of whichever method or property is marked as abstract. Well, interfaces are an iteration on this idea where you can simply define this contract external to the class and have any class inherit from it that requires those contract terms to be fulfilled. So interfaces are a bit more flexible than abstract classes. You'll probably see them a lot more than abstract classes. They're typically marked with an I at the front of the name, as sort of a naming convention, you know a non-formal naming conventions. So IEnumerable for example is a very common interface type. So yeah, very useful for things like polymorphism, and you'll see it used in Unity fairly often.

There's extension methods, so extension methods are created in a static class that are meant to extend another class, which is typically sealed. And so you're unable to directly modify it. So for example, you can't edit the String class in C#, but if you created a string or its sorry, a static class with an extension method that takes in a string, you can effectively create a method that is accessible to any string in your application, almost as if you created a method in the String class. There's LINQ, that's how it's spelled. So for those of you're familiar with database stuff like SQL or sequel, LINQ was introduced in LINQ as kind of an adaptation of SQL type syntax. You'll notice LINQ wherever you see syntax like where, or as, stuff like that. So you'll see some basic LINQ being used quite often. You'll want take a look at LINQ.

So I should also say that you should learn these concepts in order because some of these topics iterate on a previous topic. So for example, delegates. They lead to events and anonymous methods, and anonymous methods lead to lambda expressions. Alright? So try to keep order in mind when looking at these topics. So if you're turned off by all these things to learn, understand that at the heart of it, programming is a tool kit. It's a set of tools and it's up to you if you want to use any particular tool for any particular task. Understanding the fundamentals, by contrast, is a lot more important than knowing what every possible tool actually does and how it works. So try to keep that in mind.

So anyways that's C#. I may be a bit biased, but I think the best instructor in this space is Bob Tabor. I learned a lot of C# through Bob's lessons, so I highly recommend all of his lesson material for expanding your knowledge of C#. You can of course find the seizure videos on LearnVisualStudio.NET, and now also Developer University, which is the new site that he's developing. And I'm having a bit of a hand in that. Excited about Developer University, check that out at DevU.com. So for digging deeper into the guts of C#, I would recommend his Core C# Fundamentals series.

As for Unity, there are a lot of areas both big and small left to explore in Unity. In fact, we sort of just scratched the surface. If you want to dig deeper, you may want to start off by looking at co-routines. Co-routines are really handy for allowing looping behavior within the Update() loop. I wanted to cover co-routines, but I felt in the end we just didn't have enough time to really do that topic justice. But it's a very useful topic to get into and understand you may want to understand interfaces a bit before you go into co-routines. So yeah the use of co-routines is, if you remember, we have to sort of think creatively whenever handling behavior in the Update() loop. And co-routines just sort of, well they're a method that can suspend its state in between update calls and then resume from where it left off in the previous update call. So very useful in the looping behavior of Unity in many situations.

There's the event system, the Unity event system. Unity has its own event system that isn't necessarily exactly like the C# event system, although it's built on it I'm guessing. And you don't necessarily need to understand C# events to understand Unity events, but it definitely helps to have a better understanding of the purpose and mechanics of how events work in general. So learn a bit about C# events and then maybe pick up on Unity events. There's 3D design. I had a fair amount of people ask me about 3D game design and were hoping to see a little bit that in this course. Well Unity itself is actually a 3D game engine. Even the games we produced were strictly speaking in 3D.you can prove it to yourself by just switching the camera mode. So in a way you already understand some 3D design simply by having taken these lessons. Of course, it's not quite that simple but I think you'll be able to move from 2D principles to 3D principles quite easily, rather than if you try to learn 3D from the very start, right?

So now beyond those topics of interest. You might literally be interested in where to go from here to find more information. Well if you want to continue learning more about Unity and C#, there are a lot of materials out there available to you. Unfortunately I can't really recommend any one resource. It really comes down to what you want to achieve, what kind of game you want to create, what topic you want to dive into next. But I will mention that you should definitely sign up for the Unity forum. It's a very active community of people discussing a range of topics and they come from a range of backgrounds. People just like you, people who are relative beginners absolute beginners, people who are pros have been doing this forever, and everything in between. So if you have a particular problem, for example that you like to solve. Chances are that you can search the form for an answer as it's almost certain that somebody has already asked the same question that you have and got answered. Or else post your questions, someone will probably be able to help you. They're very friendly in the Unity Forum. Unlike some forums, not to name names.

So yeah that's a good place to start for getting more information on Unity and scripting advice. Anything you want to know about Unity and game development, using Unity alright. So as for me you might ask, what will I be up to next? Who knows? Maybe I'll end up creating an intermediate/advanced series for Unity. A lot of that depends on the success of this series. I would certainly love to produce more content if it was up to me. But yeah, basically we'll see how this course is going and how it's done and go from there. If you enjoyed the series and like to see me produce more of these, either more Unity stuff, C# or other tutorial series, the best way for that to happen is if people find and watch this series. So if you have the time and opportunity, you think that this series is worthy of your endorsement, please tell people about it. Really appreciate if you tell your friends and colleagues, maybe post a link on a web page, tweet about it.

It can be surprisingly difficult to get the word out so even a little bit goes a long way. I would appreciate it very much if you passed on the information. Speaking of tweeting, I would love to hear from you. You can follow me on Twitter @Steven_Nikolic. I always like to see what other people come up with and produce, especially if I helped out in some small way. And of course, if you make a game I would definitely want try that out. Send that my way. So yeah, again, thanks for staying with me through all this. I quite literally could not have done all this without your support a special thanks goes out to all of you have actually taken the time to give me feedback on the course it really meant a lot. Alright, so in concluding, good luck. Keep going and above all have fun.


Related Articles in this Tutorial:

Lesson 1 - Who This Course is For

Lesson 2 - What to Expect from this Course

Lesson 3 - Installation and Getting Started

Lesson 4 - Starting the First Project

Lesson 5 - Prototype Workflow

Lesson 6 - Basic Code Review

Lesson 7 - Game Loop Primer

Lesson 8 - Prototyping Continued

Lesson 9 - C# Fundamentals and Hello World

Lesson 10 - Variables and Operations

Lesson 11 - Variables and Operations Continued

Lesson 12 - Floats, Bools and Casting

Lesson 13 - If Statement Conditionals

Lesson 14 - If Statements Continued

Lesson 15 - Complex Evaluations and States

Lesson 16 - Code Syntax vs. Style

Lesson 17 - Variable Scope

Lesson 18 - Object-Oriented Programming Intro

Lesson 19 - OOP, Access Modifiers, Instantiation

Lesson 20 - Object Containment and Method Returns

Lesson 21 - "Has-A" Object Containment

Lesson 22 - "Is-A" Inheritance Containment

Lesson 23 - Static Fields and Methods

Lesson 24 - Method Inputs and Returns

Lesson 25 - Reference vs. Value Types

Lesson 26 - Introduction to Polymorphism

Lesson 27 - Navigating the Unity API

Lesson 28 - Applying What You've Learned and Refactoring

Lesson 29 - Constructors, Local Variables in the Update Method

Lesson 30 - Collecting Collectibles, Items and Powerups

Lesson 31 - Spawning and Managing Prefab Powerups

Lesson 32 - Implementing Powerup State Logic

Lesson 33 - Displaying Text, OnGUI, Method Overloading

Lesson 34 - Referencing Instantiated GameObjects, Parenting

Lesson 35 - Understanding the Lerp Method

Lesson 36 - Creating Pseudo Animations in Code

Lesson 37 - Understanding Generic Classes and Methods

Lesson 38 - Animations Using SpriteSheets and Animator

Lesson 39 - Working with Arrays and Loops

Lesson 40 - Debugging Unity Projects with Visual Studio

Lesson 41 - Camera Movement and LateUpdate

Lesson 42 - Playing Audio Clips

Lesson 43 - Routing Audio, Mixers and Effects

Lesson 44 - Adding Scoring Mechanics and Enhancements

Lesson 45 - Scene Loading and Game Over Manager

Lesson 46 - Understanding Properties

Lesson 47 - Controller Mapping and Input Manager

Lesson 48 - Understanding Enums

Lesson 49 - Dealing with Null References

Lesson 50 - Handling Variable Framerates with time.DeltaTime

Lesson 51 - Preparing the Project for Final Build

Lesson 52 - Final Build and Project Settings

Lesson 53 - Introduction to the Unity Physics Engine

Lesson 54 - Understanding FixedUpdate vs. Update

Lesson 55 - Movement Using Physics

Lesson 56 - Attack Script and Collision Events with OnCollisionEnter2D

Lesson 57 - Projectiles and Stomping Attack

Lesson 58 - Parallax Background and Scrolling Camera

Lesson 59 - Infinitely Tiling Background Sprites

Lesson 60 - OOP Enemy Classes

Lesson 61 - OOP Enemy Classes Continued

Lesson 62 - Trigger Colliders and Causing Damage

Lesson 63 - Multi-Dimensional Arrays and Procedural Platforms

Lesson 64 - Finishing Touches

Lesson 65 - Series Wrap


Comments

Please login or register to add a comment