In this series of videos, you'll learn how to develop a video game project using Unity 5, with Agile development practices in mind.
In Tier 1, we’re going to touch on Unity’s programming fundamentals to quickly deliver a prototype. For that, we’re going to be developing a 2D space shooter. All the sprites, the sounds and other assets are provided, so that we can focus on programming.
This training is for anyone who wants to learn object oriented programming for video games. It has introduction chapters that people familiar with Unity can skip. All the programming basics are covered, and we touch on all major features of Unity. The training focuses on programming, and uses a 2D game project to keep things simple and stay away from fancy graphics features that already are well documented. Whether you know programming or not, whether you're new to Unity or already have some experience, this training will give you the good practices and help you organise yourself in the chaos of a video game project.
I'm a self-taught developer myself. I work with Unity since 2011, and was very lucky to meet with mentors who taught me a great deal about Object Oriented Programming. That's a lot to learn about when your background is not in engineering, though, I figured that if I could do it, anyone can.
I started to put this training course together a while back for a Master Class held with Unity, and decided to take it way beyond that, as I realised many developers were self-taught programmers, ex artist or designer, looking for that true programming knowledge.
I wanted to emphasise on Agile practices, while this is not an Agile training in itself, because of the huge demand for Agile programmers. Agile Development really is a mindset that you cannot push. From a programmer’s perspective, it’s mostly about letting go of your desire for completeness and architecture awesomeness, and willing to deliver playable software as early as possible. The responsibility given to programmers brings a lot of stress, with which comes the need to foresee, plan and control development. Then any change in the plan becomes a trouble.
Team confidence is key to Agile Development, and confidence comes with knowledge.
The more you know, the more you trust yourself, and the less you doubt.
The less you fear change, the less complex and overthought you need to make your code, and the sooner you deliver a prototype.
This training aims at empowering programmers with enough knowledge to be confident in their capability to react to design changes and always deliver the most business value in the time they’re given.
Now, Agile Development isn’t just about prototyping, and we’ll also touch on Performances, Scalability and Reusability of the code, which is also key to maintain a project.
I really wanted this training to go beyond the usual academic training course. It does have a good share of theory, but everything is put into practice. Its course is well planned and offers a smooth learning curve, while its delivery is more like a live coding session in which I share what comes to my mind as to why I do things along with tips and tricks.
A quick overview of main windows of Unity Editor, and key concepts of a Unity Project.
In this video, we'll create a new Unity project, add some Game Objects, import Assets and add Components to use them.
In this video, we'll point out the differences in the Editor between a 2D and a 3D project, and will manually switch the project from 3D to 2D.
In this video, we'll set the Build and Player options, and switch the target platform to iOS or Android.
Now that the project is set up, we'll start building our first scene with Sprites.
Let's create some Prefabs for objects that we want to use throughout the project.
In this video, we'll create a Simple Ship Controller, to control the movement of the Space Ship with the keyboard.
Now that we can control the Space Ship with the keyboard, let's add touch controls for touch screen devices.
We're going to handle multi-platform using pre-compiler instructions.
We're going test touch controls using Unity Remote
And we're going to build and test the first build on the device.
As we need the Space Ship, and other flying objects, to wrap around screen edges, we're going to develop a component that makes an object stay within a given area.
To better visualise the game area, let's develop a Game Area object with Editor Gizmos.
Let's make a new component to adjust the GameArea so that it fits the Main Camera.
We'll touch on finding the Main Camera and adjusting the GameArea to its size.
We'll learn on tying components together.
Sometimes, scripts don't execute in the expected order.
We'll learn on changing Script Execution Order, and adjusting the code so that both scripts work.
In this video we'll touch on instantiating asteroids, using a reference prefab object, a rate and a total number.
We're going to do it with the knowledge gathered so far, and then with a more appropriate approach using Coroutines.
As we want to spawn Black Holes at random positions, we're going to add some feature to our Game Area component to get random coordinates within a given area.
To make sure the black holes don't appear to close to the space ship, we're going to find the player using its tag, and then relocate the location if it's too close to it.
We're also going to use some of Unity's visual debug features to check on our vector maths.
We're going to use colliders and rigidbody components to add secondary motion to asteroids and the spaceship, and we'll update the ship controller to take advantage of it.
Now that asteroids use physics, we're going to assign their rigidbodies a random direction and initial velocity when they appear.
We're going to use Unity's Animator State Machines to drive black holes sprite animation as they spawn asteroids.
We now want to make the black hole a prefab itself.
We'll have to use an Accessor to find the Main Game Area.
In this video, we're going to have an overview of common Design Patterns.
We'll handle collisions to apply damage to the spaceship.
We'll use SendMessage to handle components communication.
We're going to use MonoDevelop's Code Templates to quickly add Properties.
We'll add a non mono-behaviour static class to manage game data and states.
In this video, we're going to use triggers to add repair kits and extra lives items.
We'll also add AudioSources to playback an AudioClip when an item is picked up.
We'll use Coroutines again to let the Audio playback finish before destroying the object.
In this video, we're going to add Lives count and plan for Game Over state.
We'll use the Debugger to inspect values in MonoDevelop.
We're now going to develop the Weapon and Projectile components.
We're going to put objects on layers to manage collisions matrix.
We'll add a Firing action to both keyboard and touch device inputs.
We'll adjust the Physics to ignore collisions between the spaceship and the missiles.
We'll use Invoke to repeatdly fire missiles.
We now need to destroy Asteroids when they collide with missiles.
We're also going to increment a score and high score variables that we'll first add to the GameManager.
Then we'll use PlayerPrefs to store highscore value.
We're going to begin adding UI Texts for the score, the highscore and number of lives.
Then we'll set up the UI Canvas to preview the layout as on the target platform.
We'll adjust UI elements layout using their anchors and pivot points.
And we'll import a font and use it to customise the texts.
We're going to add and adjust a UI Slider.
We'll use sprites and set the sprite borders to change their appearance when stretching.
Then we'll change UI elements rendering order.
And we'll parent UI Elements to control them as Groups.
We're going to use C# Events to update the UI elements with values from the Game Manager when they change.
We'll format text with values.
We'll make the damage bar change colour as it goes from 0 to 100.
We're going to add breakpoints and attach MonoDevelop to the Editor to debug.
We're going to use the CallStack to trace issues to their root.
We're going to add a Pause button and a Pause Menu.
We'll ass a Game State property to the Game Manager.
We'll use UI events to change Game State.
We'll use C# events to catch Game Over state.
We're going to use Timescale to freeze gameplay while on pause.
We're now going to add a Background Music.
Using Audio Mixer, we'll adjust music and sfx audio levels independently.
We're going to add sliders to the Pause Menu.
We're also going to add a PlayerSettings class to gather and manage the player settings.
We'll expose Audio Mixer parameters to scripting.
We'll add an AudioManager class to deal with audio values.
We're going to develop a type extension to convert Linear values to Logarithmic Values.
To finish our prototype, we're going to add a Restart button.
We'll use automatic layout for the Resume and Restart buttons.
We'll simply and quickly restart the game by relaoding the scene using Scene Management, and resetting Game data.
Coach and Consultant - Design & Development, Business, Training
[ English ]
With a strong technical expertise and a taste for design, I've had the opportunity to lead teams of creative people through development of innovative projects.
I'm passionate about learning and training, I started giving training early and have been involved in training certification programs. When you work in this industry, sharing your knowledge is not only a duty, it's the opportunity to learn even more.
I'm a self-taught developer myself. I work with Unity since 2011, and was very lucky to meet with mentors who taught me a great deal about OOP. That's a lot to learn about when your background is not in engineering, though, I figured that if I could do it, anyone can.
[ Français ]
Je suis passionné par l’apprentissage et l’enseignement. J’ai donné mes premières formations très tôt et me suis impliqué dans les programmes de certifications de grands éditeurs. Quand on travaille dans cette industrie, partager ses connaissances est plus qu’un devoir, c’est aussi le meilleur moyen d’apprendre d’avantage.
Je suis développeur autodidacte. Je travaille avec Unity depuis 2011 et j’ai eu la chance de rencontrer d’excellents mentors qui m’ont beaucoup appris sur la programmation objet.
C’est beaucoup de choses à apprendre lorsque vous n’avez pas un parcours d’ingénieur. Cependant, si j’y suis parvenu, n’importe qui peut en faire autant.