
This video in an introduction to the course. You will learn who I am and what you can expect from the course.
Learn about the course structure
You can download the resources for all the basic and object oriented videos here. Video 1.1 will explain how to open and use the resources.
You will have to download the Ultimate_Csharp_Unity.zip file. When you have downloaded the file you will need to unzip the inScope folder.
The inScope folder contains all the projects for the basic and object oriented part of this course.
Each project is named after the videos. Project 01_01 is the project from video 1.1 and so forth.
The file will be updated when new videos are added.
Install and configure Visual Studio for the C# and Unity course, choosing the Community edition and .NET desktop development, then create a first console project and explore Unity integration options.
Create a new console project, explore the solution explorer and startup project, then write your first code using the console class and the write line method to display text.
Learn to build your first C# console program by using Console.WriteLine and Console.Write, manage the startup project, and pause with Console.ReadLine while exploring clearing the screen.
Master how to comment code, define scopes, and read the error list in C# and Unity, including namespaces, classes, and main functions, to debug effectively.
Learn how to declare and use string variables in C#, assign values, and display dynamic text in the console using concatenation and simple formatting, including a mailing label example.
Capture user input with Console.ReadLine, store it in a string, and display a personalized welcome or character sheet in a beginner C# and Unity project.
Explore numeric datatypes in C sharp, focusing on int and float, and learn how they differ from strings for arithmetic, division, and precision in game development.
Learn how to control program flow in your c# and unity projects by deciding where code runs and what gets executed, gaining greater control over your game's logic.
Learn flow control with if statements in C# to run code under specific conditions, using booleans, string comparisons, and console input for simple attack or run commands.
Explore the flow of if statements and the role of else statements. Use console input and convert input to an integer to test age-based conditions like 18 or older.
Explore how to use if statements with multiple conditions and else if in C# to implement a health and damage system, including intervals and a warning system.
Explore or logic in C# if statements with keys and doors, learn random number generation, and tackle an even/odd challenge without using the modulo operator.
Learn how switch cases replace if statements in C# by converting a string-based animal sound program, understanding switch structure, break behavior, and default handling, plus a character creator exercise.
Learn for loops in c#, including counter initialization, condition, and increment, counting zero to nine, plus continue and break, with a practical combat simulator challenge.
Explore while loops, which run while a boolean condition is true, and practice counting up or down with break and do-while to avoid infinite loops and ensure one execution.
Explore nested loops by placing one loop inside another to build a coordinate grid, using x and y values to generate a game board and print coordinates with console output.
Learn how to use arrays in C# to store multiple values, instantiate and index string arrays, and loop through them with for and foreach while handling length and bounds.
Master converting data types, such as string to integer, and explore enumeration to create your own data types in the datatypes introduction.
Define an enum as a custom data type, use it for weekday values, cast user input to the enum, and drive a simple north-south-east-west position grid.
Demystify type conversions in C#, compare memory usage between byte and int, and master implicit and explicit casts, parsing pitfalls, overflow, and checked versus unchecked behavior.
Understand methods and how they differ from functions in scripting an object, while receiving encouragement as you begin practical learning for game development with C# and Unity.
Explore how methods and functions relate in C# and learn to build static void functions for console programs, including welcome messages, get input, and line numbering.
Explore how parameters pass input to functions, enabling reusable code that produces different results based on supplied values like numbers, names, and ages.
Master return types by building a function that adds two floats and returns the value, and a boolean checker for odd or even, with console.write line output.
Learn to return multiple values from a single method in C# using out and ref parameters, understand value types versus references, and preview newer C# techniques for multi-value returns.
Learn to return multiple values from a method using value tuples in C# 7, replacing out parameters. Access via item1 and item2 or by name and print the results.
Master method overloading in C# by creating add and subtract methods for integers and floats. See how parameter types determine overloads and how to refactor inputs into reusable ask methods.
Build a complete hangman game in C# and Unity by selecting a random word from an array, displaying underscores, handling letter input, revealing guesses, and tracking lives.
Enter the object oriented introduction and begin creating objects used in games, making this section highly useful and rewarding as you progress through the course.
Learn how to define a class in C#, create a tank class as a blueprint, instantiate objects, and understand data fields, constructors, and methods to structure a simple game.
Explains data fields, access modifiers, and properties in C# for Unity, demonstrating encapsulation with private fields and public getters, plus a read-only isAlive property and a damage system.
Explore methods and constructors in C#, distinguish between methods and properties, and implement private and public access, constructor overloading, and gameplay classes for a player and enemy.
Explore how the static keyword creates class-level members shared by all instances, showing the difference from instance methods and the consequences for health in a Unity enemy game.
Explore inheritance by building an animal hierarchy with a bird and a tiger, using a shared animal superclass to eat and sleep, and have a fish inherit swimming.
Learn inheritance with a base animal class, protected and private fields, and read-only exposure of hunger via a public property. Implement an energy attribute and actions that manage energy.
Explore virtual methods and overrides in a base animal class, enabling specialized move and eat behavior for tiger, fish, and bird while tracking hunger and energy.
Learn how abstract classes prevent instantiation, use abstract and virtual methods, and implement subclass-specific make sound for animals like tiger, bird, and fish.
Learn how base constructors work in a superclass-subclass setup, passing energy, agility, stamina, and intellect from tiger, bird, and fish constructors to the animal base constructor.
Learn how polymorphism lets runtime objects of subclasses be treated as a superclass, using a single animal actions method to manage tiger, fish, and bird in C# and Unity.
Learn how to define and use interfaces in C#, including naming conventions, implementing interface members in classes, and using interface polymorphism to treat diverse objects as flyable or eatable.
Implement interfaces for drinkable and edible items in a simple item hierarchy. Manage a 10-slot inventory with potions and apples to alter health and manner via eat and drink.
Explore collections in C# and Unity, learn how to organize game objects for inventories and shops, compare advantages and disadvantages, and focus on the collections you'll use to build games.
Learn lists in c# using system collections generic to create, add, and access items, including printing and sorting. Practice safe removal and iterating with foreach on custom objects.
Develop a C# high-score list with add, remove, and view options. Use a static list of high-score objects and random scores for demonstration, plus ranking for display.
Learn how dictionaries map keys to values, using hash tables for fast lookups, and compare them to lists to understand uniqueness, access, and efficiency in C#.
Create animated game in Windows Forms to learn how games work, then prepare for Unity by modeling with UML. Download the sprite zip and UML PDA file to guide you.
Learn to set up a Windows Forms project in C#, load a sprite from assets, render it on screen with paint and a graphics context, and handle inverted coordinate system.
Explore the game object base class, its private sprite and graphics, a constructor loading the sprite, and update/draw methods; use a position field to place objects.
The lecture introduces the game world class that manages all game objects—creation, updating, and deletion—and shows building a simple loop with a timer, graphics, background color, and world size.
Learn to move the player using keyboard input and implement frame rate independent movement. Explore double buffering with a back buffer to prevent blinking and ensure smooth rendering.
This lecture introduces a transform class that manages a game object's position, rotation, and scale with a vector, mimicking Unity, and includes get/set position methods and a static world size.
Explore the component pattern in Unity, building game objects from interchangeable components like transform, sprite renderer, and collision box via a component dictionary. Learn Awake, Start, and Update lifecycles.
Build a sprite renderer component that decouples drawing from game objects, using graphics, a sprite, and a rectangle, and updates to render each frame.
Create a player component that inherits from component to manage movement, health, and power-ups via a sprite renderer, using awake, start, and update to initialize and render at screen center.
In this lecture we will add movement to the player.
Learn to implement delta time with a static time class to achieve frame rate independent movement. Calculate delta time from frame times and apply it to velocity.
Add an enemy by inheriting from component with a sprite renderer, managed via a game objects list using awake, start, and update, and scale with a scale factor.
Add a speed field and a move method to drive the enemy downward, update position, and use screen bounce to respawn off-screen at a random x, accounting for sprite size.
Add a laser weapon to the player in Unity by creating a Laser class with sprite, speed, and direction, then implement shoot, spawn, visibility-based destruction, and cooldown logic.
Learn to implement collision detection in Unity by adding a collider, handling collision events with delegates, maintaining a shared colliders list, and destroying enemies when hit by lasers.
Learn to destroy game objects by implementing a virtual destroy method for components and cleanly removing colliders, while handling enemy resets and random positions from the game world.
Limit the player's vertical movement by adding a screen limits method checked each frame to keep the sprite within the screen, and implement screen warp to reappear on opposite side.
Create a background class with a sprite renderer, start position, and move and reset logic to render a moving background; implement sprite render ordering for proper layering.
Create an infinite scrolling starry background by duplicating panels, cycling them in a queue, and implementing a background element with random speed and off-screen reset.
Learn to build a sprite-based animation system by creating an animated component that swaps sprites from a dictionary of animations using a time lapse and current index.
Add an explosion by organizing sprites, wiring an animation done delegate in the animator, and spawning an explosion component that self-destructs after the animation finishes.
Create a static life manager to track player lives, manage UI elements and x offset, render the life UI in the top left, and provide add life and remove life.
Learn to remove a life when the player collides with an enemy by adding a collider, wiring a collision handler, and updating the game manager and UI lives.
Reset the player to its spawn position on enemy collision with a reset method, adjust sprite bounds to prevent jumps, and explode and remove the player when lives reach zero.
Implement a game over screen and a restart button, connect them to the game manager to restart the game, reset objects, hide the restart button, and reset lives and offsets.
Learn to implement a visible player score by updating a score variable and score label in the game manager, resetting on restart and increasing when enemies are defeated.
Implement a supply crate that drops from enemies on death, spawns at the enemy position, and uses a collider for player collection with a sprite renderer and explosion.
Create shield pickup from supply crates with a 50/50 chance to grant a shield or a life; shield attaches to the player and blocks damage until removed by enemies.
Implement immortality in the player by adding duration, cooldown, and blink logic; update collision handling, sprite visibility, and a dedicated immortality method, preparing to transition to Unity.
This course is all you need, if you want to learn how to create games in Unity. You can’t create games in unity without knowing how to code, that’s why we will spend the first part of the course learning how to code C#.
IMPORTANT!
This course will teach you best practices and teach you how to program. In this course you will not only learn how to do things, but also why we do things.
No prior knowledge is required because you will learn everything you need to know right here! When you are done with this course, you will be able to take your own game ideas and bring them to life in Unity.
The course is divided into 3 main sections:
Section 1 – Basic programming
In this section we will get to know our tools and get a basic understanding of C#. We will end the section by creating our very first complete game in the console.
Section 2 – Object oriented programming
In this section you will learn about classes and objects. These are the building blocks of every game. When you are done with this section you will know everything you need to know about C# before we dive into the world of Unity.
We will end this section by creating our very own complete game with animated sprites, without using any game engine or frame work. We will use all the knowledge that we have acquired in section 1 and 2 to create this game.
Section 3 – Unity
In this section we will learn about the Unity game engine and editor. Because we have learned everything we need to know about C# in the previous section, we will be able to focus all our efforts on Unity.
We will end this section by creating a complete game in Unity.