Select Page

Introduction to Object-Oriented Programming and Quality Code

In this module we will learn how to create our own Classes. We will concentrate on the principles of OOP – inheritance, abstraction, encapsulation and polymorphism. We will learn how to write quality code and follow some basic principles and design patterns so that our code is easy to read, extend and use.

Many additional features of .Net will be introduced – delegates, events, extension methods, generic classes, LINQ, lambda expressions, anonymous types etc…

On the gaming side we will make a Monopoly clone using the MonoGame engine.

This module is probably the most important one on your way to becoming a game developer.

EXERCISES

Take a look at the lectures for this course.

1. Introduction to the OOP & Quality Code

We will introduce the module structure – examination, homework, teamwork projects. We will also look at the different lectures and explain briefly the material that we will cover.

2. Exception Handling

Exception handling is an essential part to every large project. We will learn how to throw and handle exceptions without explaining the situations in which we use them. That will become clear in the next lecture.

3. Defining Classes Part 1

We will create our first classes with a simple “game”. We will look at constructors, properties, fields and methods. We will learn the basics of Quality Code and try to follow them inside the project. The use of exceptions will be explained as well.

4. Defining Classes Part 2

We will make our code from last time look even better with StyleCop. After that we will delve deeper into defining our own classes. We will create generic classes, override operators, indexers etc.

5. Extension Methods, Anonymous Types, Delegates, Events, LINQ and Lambda expressions

This is the coolest lecture ever. Many new features in C# will be introduced. Some of them may not become clear the first you see them, but after some time you will get used to them. Linq and Lambda are a very quick, efficient and easy way to manipulate collections of information. I am sure if you switch to another language, you will miss them.

6. OOP Principles - Inheritance, Abstraction, Encapsulation

We will look at the first three out of four fundamental principles of OOP – abstraction, inheritance and encapsulation. Those are key to creating quality projects and save yourself from copy-pasting code in your classes.

7. OOP Principles - Polymorphism

Due to a technical problem, the video of this lecture will be uploaded in the near future.

8. Workshop 1: Hacking Wordz! - Introduction to Graph Theory

One of the coolest workshops so far! We will create our own generic graph. We will implement the Depth-First-Search Algorithm. We will use a modified version of the DFS to find all paths in a graph. With the use of the latter we will hack the Wordz! game (O! Dumi in Bulgarian).

9. Quality Code

In this lecture we will take a look at most of the principles and rules to make your code self-documenting, easy to read and extend.

10. Design Patterns

We will take a look and explain some very basic design patterns with examples.

11. Introduction to MonoGame XNA - Spacecraft Wars Game

Spacecraft wars was given as an exam task in the first course. This is how to implement it in MonoGame. We will explain how to manage the Content Pipeline in MonoGame, how to add, draw sprites, how to update your game and so on… Just an introduction to MonoGame stuff.

12. Making MVC Monopoly with MonoGame

In this lecture we will make our own Monopoly clone (not a 100% functional). The main idea is to introduce the MVC architecture in game development, along with the state machine pattern. Monopoly is created with MonoGame but using the MVC architecture you can easily change the renderer (engine) and keep most of the code the same.