14

The Journey Continues

If you started this book as a complete newcomer to the world of programming, congratulations on your achievement! If you came in knowing a bit about Unity or another scripting language, guess what? Congratulations to you as well. If you began with all the topics and concepts we covered already firmly solidified in your head, you guessed it: congratulations. There is no such thing as an insignificant learning experience, no matter how much or how little you may think you came away with. Revel in the time you spent learning something new, even if it only turned out to be a new keyword.

As you reach the end of this journey, it’s important to look back at the skills you’ve acquired along the way. As with all instructional content, there’s always more to learn and explore, so this chapter will focus on cementing the following topics and giving you resources for your next adventure:

  • Diving deeper
  • Object-oriented programming and beyond
  • Design patterns
  • Approaching Unity projects
  • C# and Unity resources
  • Unity certifications
  • Next steps and future learning

Diving deeper

While we’ve done a good amount of work with variables, types, methods, and classes throughout this book, there are still areas of C# that were left unexplored.

Learning a new skill shouldn’t be a simple bombardment of information without context; it should be a careful stack of bricks, one on top of the other, each building on the foundational knowledge already acquired.

Here are some of the concepts you’ll want to look into as you progress in your programming journey, regardless of whether it’s with Unity or diving into .NET with C#:

  • Optional and dynamic variables
  • Debugging approaches
  • Concurrent programming
  • Networking and RESTful APIs
  • Recursion and reflection
  • Design patterns
  • Functional programming

As you revisit the code we’ve written throughout this book, don’t just think about what we accomplished, but also about how the different parts of our project work together. Our code is modular, meaning actions and logic are self-contained. Our code is flexible because we’ve used Object-Oriented Programming (OOP) techniques, which makes it easy to improve and update. Our code is clean and doesn’t repeat, making it readable to anyone who looks at it down the line, even if that’s us.

The takeaway here is that digesting basic concepts takes time. Things don’t always sink in on the first try, and the “Aha!” moments don’t always come when you expect. The key is to keep learning new things, but always with one eye on your foundation.

Let’s take our own advice and revisit the tenets of OOP in the next section.

Remembering your object-oriented programming

OOP is a vast field of expertise, and its mastery requires not only study but also time spent applying its principles to real-life software development.

With all the foundational information you learned in this book, it might seem like a mountain you’re just better off not even attempting to climb. However, when you feel that way, take a step back and revisit these key concepts from Chapter 5Working with Classes, Structs, and OOP:

  • Classes are blueprints for objects you want to create in code
  • They can contain properties, methods, and events
  • They use constructors to define how they are instantiated
  • Instantiating objects from a class blueprint creates a unique instance of that class
  • Classes are reference types, meaning when the reference is copied it’s not a new instance
  • Structs are value types, meaning when the struct is copied a brand-new instance is created
  • Classes can use inheritance to share common behavior and data with subclasses
  • Classes use access modifiers to encapsulate their data and behaviors
  • Classes can be composed of other class or struct types
  • Polymorphism allows subclasses to be treated the same as their parent class
  • Polymorphism also allows subclass behaviors to be changed without affecting the parent class

Once you’ve mastered OOP, there are other programming paradigms to explore, such as functional and reactive programming. A simple online search will get you going in the right direction.

Design patterns primer

Before we wrap up the book, I want to talk about a concept that will play a huge part in your programming career: design patterns. Googling design patterns or software programming patterns will give you a host of definitions and examples, which can be overwhelming if you’ve never encountered them before. Let’s simplify the term and define a design pattern as follows:

A template for solving programming problems or situations that you’ll run into on a regular basis during any kind of application development. These are not hardcoded solutions—they’re more like tested guidelines and best practices that can be adapted to fit a specific situation.

There’s a lot of history behind how design patterns became an integral part of the programming lexicon, but that excavation is up to you.

If this concept strikes a chord with your programming brain, start with the book Design Patterns: Elements of Reusable Object-Oriented Software and its authors, the Gang of Four: Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides.

This barely scratches the surface of what design patterns can do in real-world programming situations. I highly encourage you to dig into their history and application—they’ll be one of your best resources going forward.

Next, even though the goal of this book has been to teach you C#, we can’t forget about everything we’ve learned about Unity.

Approaching Unity projects

Even though Unity is a 3D game engine, it still has to follow the principles set down by the code it’s built on. When you think of your game, remember that the GameObjects, components, and systems you see on screen are just visual representations of classes and data; they’re not magical or unknown—they’re the result of taking the programming foundations you’ve learned in this book to their advanced conclusion.

Everything in Unity is an object, but that doesn’t mean all C# classes have to work within the engine’s MonoBehaviour framework. Don’t be limited to thinking only about in-game mechanics; branch out and define your data or behavior the way your project needs. 

Lastly, always ask yourself how you can best separate code out into pieces of functionality instead of creating huge, bloated, thousand-line classes. Related code should be responsible for its behavior and stored together. That means creating separate MonoBehaviour classes and attaching them to the GameObjects they affect. I said it at the beginning of this book, and I’ll say it again: programming is more a mindset and contextual framework than syntax memorization. Keep training your brain to think like a programmer and eventually, you won’t be able to see the world any differently.

Unity features we didn’t cover

We managed to briefly cover many of Unity’s core features in Chapter 6Getting Your Hands Dirty with Unity, but there is still so much more the engine has to offer. These topics aren’t in any particular order of importance, but if you’re going forward with Unity development, you’ll want to have at least a passing familiarity with the following:

  • Shaders and effects
  • Scriptable objects
  • Editor extension scripting
  • Non-programmatic UI
  • ProBuilder and Terrain tools
  • PlayerPrefs and saving data
  • Model rigging
  • Animator states and transitions

You should also go back and dive into Lighting, Navigation, Particle Effects, and Animation features in the editor.

Next steps

Now that you have a basic level of literacy in the C# language, you’re ready to seek out additional skills and syntax. This most commonly takes the form of online communities, tutorial sites, and YouTube videos, but it can also include textbooks, such as this one. Transitioning from being a reader to an active member of the software development community can be tough, especially with the abundance of options out there, so I’ve laid out some of my favorite C# and Unity resources to get you started.

C# resources

When I’m developing games or applications in C#, I always have the Microsoft documentation open in a window I can get to easily. If I can’t find an answer to a specific question or problem, I’ll start checking out the community sites I use most often:

Since most of my C# questions relate to Unity, I tend to gravitate toward those kinds of resources, which I’ve laid out in the next section.

Unity resources

The best Unity learning resources are at the source; video tutorials, articles, free assets, and documentation are all available from https://unity3d.com.

However, if you’re looking for community answers or a specific solution to a programming problem, give the following sites a visit:

There is also a huge video tutorial community on YouTube if that’s more your speed; here are my top four:

The Packt library also has a wide variety of books and videos on Unity, game development, and C#, available at https://www.packtpub.com/all-products.

Unity certifications

Unity now offers various levels of certification for programmers and artists that will lend a certain amount of credibility and empirical skill ranking to your resume. These are great if you’re trying to break into the game industry as a self-taught or non-computer science major, and they come in the following flavors:

  • Certified User:
    • Programmer
    • Artist
    • VR Developer
  • Certified Associate:
    • Game Developer
    • Programmer
    • Artist
  • Certified Professional:
    • Programmer
    • Artist
  • Certified Expert:
    • Programmer

Unity also provides preparatory courses in-house and through third-party providers to help you get ready for the various certifications. You can find all the information at https://certification.unity.com.

Never let a certification, or the lack of one, define your work or what you put out into the world. Your last hero’s trial is to join the development community and start making your mark.

Hero’s trial—putting something out into the world

The last task I’ll offer you in this book is probably the hardest, but also the most rewarding. Your assignment is to take your C# and Unity knowledge and create something to put out into the software- or game-development communities. Whether it’s a small game prototype or a full-scale mobile game, get your code out there in the following ways:

Whatever your passion project is, put it out into the world.

Summary

You might be tempted to think that this marks the end of your programming journey, but you couldn’t be more wrong. There is no end to learning, only a beginning. We set out to understand the building blocks of programming, the basics of the C# language, and how to transfer that knowledge into meaningful behaviors in Unity. If you’ve gotten to this last page, I’m confident you’ve achieved those goals, and you should be too.

One last word of advice that I wish someone had told me when I first started: you’re a programmer if you say you are. There will be plenty of people in the community that will tell you that you’re an amateur, that you lack the experience necessary to be considered a “real” programmer, or, better yet, that you need some kind of intangible professional stamp of approval. That’s false: you’re a programmer if you practice thinking like one regularly, aim to solve problems with efficiency and clean code, and love the act of learning new things. Own that identity; it’ll make your journey one hell of a ride.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.14.118