Introduction to Game Development Using C# and Monogame Part 1 ... The Basics | Charlie Chiarelli | Skillshare

Introduction to Game Development Using C# and Monogame Part 1 ... The Basics

Charlie Chiarelli, Experienced Online Educator

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
11 Lessons (1h 20m)
    • 1. Welcome

    • 2. Why MonoGame? ... Some Background

    • 3. What You Need

    • 4. Creating Your First Monogame Project

    • 5. Managing Content

    • 6. Displaying The Content... The Sprites

    • 7. Moving The Sprites

    • 8. The Velocity Vector

    • 9. Hitting The Wall !

    • 10. Drawing Text

    • 11. Adding Background Music and Sound Effects


About This Class


Video games are on our computers, our consoles and our phones! Lots of people play them and every year more people are making them. If you have ever played a computer game and thought, “I wonder how they do that?” or, better yet, “I want to make something like that,” then this course will get you started. Game development is what got many developers into programming. But how many of us actually ever learned how to create games? Creating games can be challenging, but it doesn’t have to be that way! MonoGame is a cross platform gaming framework based on Microsoft’s XNA framework that’s extremely easy to learn. Best of all, games you build with MonoGame will run on iOS, Android, Mac OS X, tvOS, Windows, Linux, PlayStation 4, and more—write once, play anywhere.

There’s no shortage of options when it comes to game development environments. From full-featured engines like Unity to comprehensive and complex multimedia APIs like DirectX, it can be hard to know where to start. MonoGame is a set of tools, with a level of complexity falling somewhere between a game engine and a grittier API like DirectX. It provides an easy-to-use content pipeline, and all the functionality required to create lightweight games that run on a wide variety of platforms. Best of all, MonoGame apps are written in pure C#, and you can distribute them quickly via the Microsoft Store or other similar distribution platforms.

This course assumes that you’ve done a little bit of  programming in C# but  all the material starts at the most basic level. That means that anyone should be able to join in and work their way through the material.

In Part 1 we cover

  • Learn to use the MonoGame Windows Project Template
  • Run your first MonoGame program
  • Understanding the underlying Template code
    • Directives (using)
    • Game1 Class
    • Instance Variables (SpriteBatch)
    • The Constructor ... Game1()
    • The Initialize Method
    • The LoadContent Method
    • The Update Method
    • The Draw Method
  • Set up the Pipeline Tool 
  • Learn to add assets to our project using the Pipeline Tool
    • images ... bmp, jpg, png (best)
    • audio ... wav , mp3
  • Organize content into folders 
  • Create a place to store the images (instance variable of type Texture2D)
  • Load the images into the instance variables
  • Draw the images using SpriteBatch (object used to do drawing)
    • using the Draw command
  • Introduce the concept motion in Monogame
  • Learn how to use the Vector2 class to create objects which indicate the sprite location of our images
  • Use the Update method to change our Sprite Location
  • Use the Draw Method to redisplay our sprite at its new location
  • Introduce the concept of velocity
    • we add a velocity instance variable from the Vector2 class which will be used to move our image , instead of using a constant
  • Introduce/Review some basic Vector addition concepts from mathematics
  • Discuss the screen constraints
    • where exactly (X location ) is the right and left walls
    • where exactly (Y location ) is the top and bottom walls
  • Create a program which has the image bounce off any part of the walls it encounters
  • Learn how to create a Sprite Font using the Pipeline Tool
    • Edit the Font (XML)
  • Use the Sprite Font to display a count of the number of wall collisions
    • Using the DrawString command
  • How to add sounds to your Mono Game Project
  • First we add directives 
    • using Microsoft.Xna.Framework.Media
    • using Microsoft.Xna.Framework.Audio
  • Next add instance variables of the Song and SoundEffect classes
  • Next we load the sounds
  • Lastly we Play the sounds at the desired location in the program 
    • Background music (songs) can be started  right at the beginning
      • mp3s work best with songs ...
        • but can use wavs ... need to force pipeline tool to change processor type from wav to song
      • can't play two songs at same time one will cancel out the other
    • SoundEffects are activated at a specified point in your game like hitting an object 
      • wavs are used for Sound Effects
      • multiple sound effects can play at the same time... can play over the background music 





  • --
  • Beginner
  • Intermediate
  • Advanced
  • All Levels
  • Beg/Int
  • Int/Adv


Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

Charlie Chiarelli

Experienced Online Educator

Hi, my name is Charlie Chiarelli. I'll be your teacher for this course. I will spend as much time as necessary to help you do the best you can. But, for you to succeed you must be willing to work .

I am a retired High school Computer Science and Mathematics Teacher from Canada. I taught for 35 years, I have a BMath degree from the University of Waterloo.

I was a frequent speaker at educational conferences (ECOO) and seminars . Most recently my talks focused on E-Learning and the...

See full profile

Report class