Skip to content

Riemers2DXNAoverview

Simon (Darkside) Jackson edited this page Sep 11, 2020 · 10 revisions

2D MonoGame Tutorial for C# overview

This part of the site shows you how easy it is to get a 2D MonoGame program up and running! This tutorial is aimed at people who would to start game programming in MonoGame and see some nice results in the shortest possible time. To this end, MonoGame is an ideal programming environment. Using C# as programming language, the code looks very much like Java, so anyone having some notions of Java should be able to start right away. Even more, this tutorial is written in such a way that anyone who has any programming experience should be able to completely understand and complete it!

Each chapter of this series starts by explaining a 2D game programming concept, which is then put to practice by adding the code to our project. This helps you gradually building up your MonoGame skills, and in the end, you will have created a complete 2D game!

The game we will create looks pretty simple, but don’t be mistaken: at the end of the series you’ll know enough to create almost any 2D game!

Below I have listed some of the concepts you’ll learn in this series of tutorials:

  • Installing MonoGame and opening your first MonoGame project
  • Rendering 2D images to the screen
  • Scaling, rotating and positioning 2D images
  • Keyboard input
  • Playing sound effects in MonoGame
  • Per-pixel texture manipulations
  • Random terrain slope generation
  • Alpha blending
  • Collision detection (the most complex case is covered: per-pixel transformed)
  • And even a complete 2D particle engine for the explosions!

During this series you will need to download the following resources: This section will be updated once the entire series has been uploaded!

Below you can find some screenshots of this series of 2D MonoGame Tutorials. The code is written in such a way that you can easily adjust the resolution. For an example of a larger screenshot, click here.

Example01

Example02

Assets

During this series you will need to download the following resources:

Source

You can find the full upgraded source for this chapter here:

Chapters

  1. Starting your MonoGame 4.0 Project
  2. Drawing a full-screen background image
  3. Specifying the position of an image on the screen
  4. More powerful features of the SpriteBatch
  5. Rotation – Drawing the cannon
  6. Reading out the Keyboard
  7. Writing text to the screen in XNA
  8. Launching the rocket
  9. Making the rocket move
  10. Adding the smoke trail
  11. Defining the colors of a texture per-pixel
  12. Random terrain generation
  13. Texture to an array of colors
  14. 2D Collision Detection
  15. 2D Transformation matrices
  16. Putting Collision Detection into practice
  17. Particles
  18. Additive alpha blending
  19. Particle engine
  20. Adding explosion craters
  21. Playing sound effects
  22. Resolution independency
Clone this wiki locally