4.85 out of 5
4.85
23 reviews on Udemy

Step-By-Step: Create Games Using C# and Windows Forms

Project-based Learning: How to create simple games using C# without frameworks or 3rd party libraries
Instructor:
Pavol Almasi
2,207 students enrolled
English [Auto-generated]
You will gain a good grasp of 2D coordinate system
You will be able to manipulate and work with 2D arrays
You will understand how 2D arrays relate to 2D world
You will be able to create a basic path finding algorithm using loops and recursion
You wil understand how to draw objects
You will be able to create a game loop based on Timer tick
You will be able to simulate a simple animation
Tou will be ready to tacke more complex games

Do you know basic C# concepts, and know your way around loops, conditional statements, arrays, and very basics of object oriented programming, but never really had a chance to incorporate any of it into a game project?. If that describes you, then this is a course for you.

Full disclosure: we won’t be creating any earth shattering games. What we ARE going to be doing is LEARNING how to use with C# in game projects, and how to THINK like a game programmer. 

The goal of this course is three fold

  • First, is to show you how things work

  • Second, help you understand how things work under the hood.

  • And third, to drill the basics so that they become a second nature to you.

This course concentrates solely on creating game logic and algorithms in C#.

We will use Windows Forms as the game board and we’ll use events to code the application logic to. This way, we won’t get distracted with million other little things that come into play when you try to learn the game programming and a framework such as Unity at the same time. Like I said, the goal here is to LEARN the basics, and to RETAIN the knowledge. What good is it for a beginner to game programming to watch someone build a complex game when three quarter of the stuff presented goes right over your head? Not in this course. 

If you go through this course, and if you code along, I am absolutely sure that at the end, you will have great foundation to build on, and you will be able to move to more sofisticated applications and coding styles.

The course consists of four games, and more will be added later if there’s enough interest. 

The first is a Hungry Snake game.

It’s a great game to use to learn basics of drawing on the board, dynamic animated movement, collision, score keeping, dynamic changes to the game, key press events and more. You’ll be surprised how little code is needed, yet at the same time, how much of all the mentioned concepts you will understand at the end of this section.

Second is a Bubble Breaker game.

We’ll get into details of defining a path for a selection triggered by a player’s mouse click. I will show you both loop and recursive solution. We’ll learn how to draw bubbles and paint them using gradient colors. You’ll understand how 2D arrays relate to 2D x and y coordinates. We’ll go into details of Graphics class of C#. We will make the game dynamic and allow for variety of bubble sizes and number of bubbles on the form. We will learn more about mouse events and how to branch the game logic based on user clicks. We will enhance the game with keeping the historical scores in a text file and allowing player to enter his/her score into the file. And in the process, you will not only learn game programming, but become a master of arrays, loops, and Enums. 

Third is Pong game. (added June 2018)

A simple game that everyone is familiar with. But, we will go deeper, and I will show – and explain – how to move objects on the form, how to change direction of the movement upon detecting a collision, how to manipulate the speed of an object, how to generate new objects and keep track of their position in real time and much more!

Third is Brick Breaker (Arkanoid clone) game. (added August 2018)

A classic game with a little twist. Our version of the game features randomly placed bricks of random colors and sizes. We will also bounce the ball off the paddle based on what part of the paddle intersects with the ball – left part will bounce the ball to the left, right part to the right, and middle part straight up. Our scoring system will be based on brick colors and as the game progresses, the speed of the ball and paddle increases. And everything will be coded using OOP principles.

This whole course is designed as follow along course. Meaning, you are encouraged to code along with me. Everything is on the video, there are no code snippets being magically pasted into the Visual Studio. Also, I don’t want you to just learn the concepts and then forget them a week later. I want you to remember and retain what you learn in this course. 

And let’s face it – that is possible only when you code along. 

And one more thing that makes or breaks learning to program – using what you learn, and using it frequently. Therefore, I code even the repetitive things from scratch and I don’t simply just refer you to previous lessons. But that means, that some parts may feel slow and repetitive. However, if you actually code along, I guarantee you will learn, and also REMEMBER what you learned

But, If you prefer more instructional videos, that show everything once and move faster, then this course is NOT for you. Please keep that in mind before purchasing the course. I encourage you to watch some of the sample videos so you get a feel for the course structure, topic difficulty, and my teaching style.

Now, I made the videos short and to the point. Most videos are only around 5 minutes long. That is deliberate, so each video is a small learning step that is easy to follow.

Alright, there’s a lot of coding to be done. So let’s code some games!

Introduction

1
Intro To Course

Hungry Snake Game

1
Hungry Snake Game in Action (Introduction)
2
Coordinate System
3
Setting Up The Form
4
Setting Up Variables
5
Initializing Variables
6
Painting The Walls
7
Painting The Snake
8
Painting The Bonuses
9
Setting Up Snake Directions
10
Snake Movement - Theory
11
Snake Movement - Removing Last Body Piece
12
Snake Movement - Getting Updated Coordinates For The Snake
13
Snake Movement - Change Direction Of The Head
14
Snake Movement - Check Collision With The Walls
15
Snake Movement - Check Collision With Snake's Body
16
Snake Movement - Check Collision With Bonus Field
17
Snake Movement - Draw Snake's Head In Updated Coordinates
18
Running And Testing

Bubble Breaker Game

1
Bubble Breaker Game in Action (Introduction)
2
Setting Up the Game Board
3
Setting Up All Variables
4
Initializing Variables And Game Board
5
Populating Game Board With Bubbles
6
Getting Colors For Each Bubble
7
Painting Bubbles
8
2D Coordinate System vs 2D Arrays
9
Adjusting Bubble Settings
10
Understanding Game Requirements
11
MouseDown Event
12
Main Game Method
13
Removing Bubbles From The Form
14
De-Selecting Bubbles
15
Checking For Game Over Conditions
16
Displaying Label with the Score
17
Path Finding - Selecting Bubbles of the Same Color - Theory
18
Path Finding - Loop Solution - Setting Up Variables
19
Path Finding - Loop Solution - Selecting Bubbles Above
20
Path Finding - Loop Solution - Selecting Bubbles Below
21
Path Finding - Loop Solution - Selecting Left Bubbles
22
Path Finding - Loop Solution - Selecting Right Bubbles
23
Path Finding - Loop Solution - Retracing Previous Steps
24
Path Finding - Recursive Solution
25
Moving Bubbles Down - Theory
26
Moving Bubbles Down - Code
27
Moving Bubbles Down - Replacing Removed Bubbles With Background
28
Moving Bubbles Down - Move Bubbles Right
29
Generate More Bubbles
30
Painting Outline Around Selection - Theory
31
Painting Outline Around Selection - Left Outline
32
Painting Outline Around Selection - Right Outline
33
Painting Outline Around Selection - Top Outline
34
Painting Outline Around Selection - Bottom Outline
35
Running and Testing the Game Algorithm
36
Keeping Scores - Creating Score Class
37
Keeping Scores - Reading Scores From Text File
38
Keeping Scores - Get Top 3 Scores
39
Keeping Scores - Get Player's Position Among All Scores
40
Keeping Scores - Final Message To Display After Each Game
41
Keeping Scores - Writing Score Into Text File
42
Keeping Scores - Game Over Messages
43
Keeping Scores - Finalizing The Game Board
44
Keeping Scores - Entering Player's Name
45
Final Tests

Pong Game

1
Pong Game in Action (Introduction)
2
Creating the Form
3
Creating Variables
4
Initializing Variables
5
Positioning Elements on the Form
6
KeyPress Events
7
Theory - Moving the Ball
8
Theory - Moving the Paddle
9
Theory - Ball and Paddle Collision
10
Theory - Scoring Points
11
Timer Tick Event - Computer Paddle Movement
12
Timer Tick Event - Scoring Points
13
Timer Tick Event - Bouncing Ball Vertically
14
Timer Tick Event - Bouncing Ball Off the Paddles
15
Timer Tick Event - Moving Player Paddle
16
Timer Tick Event - Game Over
17
Testing and Debugging Our Pong Game
18
Game Modification - Ball Class
19
Game Modification - Creating Ball Objects
20
Game Modification - Moving Each Ball On the Form
21
Game Modification - Collision With Paddle & Creating New Instance of Ball Object
22
Game Modification - Final Testing and Debugging

Arkanoid Brick Breaker Game

1
Brick Breaker in Action (Introduction)
2
Creating The Form Objects
3
Score Class
4
Brick Class - Properties and Constructor
5
Brick Class - Getting All Bricks On The Form
6
Brick Class - Checking For Overlaping Bricks
7
Brick Class - Randomly Positioning Bricks On The Form
8
Brick Class - Generating Colors For Bricks
9
Brick Class - Instantiating Brick Objects
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.9
4.9 out of 5
23 Ratings

Detailed Rating

Stars 5
16
Stars 4
6
Stars 3
1
Stars 2
0
Stars 1
0
257f54339b88962ff86c26422844622c
30-Day Money-Back Guarantee

Includes

9 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion