User Tools

Site Tools


monogame

Monogame with .NET 6.0.

Monogame is a brilliant tool for developing games with many years proving it still works. It is actively developed and several projects are based on monogame, http://flatredball.com/ to name one.

Xna, or Monogame, has a long history which makes it sometimes hard to find up-to-date examples. With these pages and its github-repository, I try to increase the flora of modern examples.

Despite the name of the project being 'ShootThemAll' there is no shooting, none at all. Shooting is not really the target of this project. Instead, I deliver a few short examples to get you started with monogame.

ShootThemAll is written in C# using Visual Studio 2022, with .NET 6. My intention was to prove it works fine with the latest version of VS and .NET.

The project can be found at the excellent Github site. The repository's url:

https://github.com/tornseglare/ShootThemAll

Source of inspiration

I got a lot of inspiration and good code examples from the great NeonShooter demo by SimonDarksideJ, found here: https://github.com/MonoGame/MonoGame.Samples

First setup

  • Install Visual Studio. I use Visual Studio Community 2022.
  • You must install .NET Core 3.1 Runtime (LTS) for monogame to compile.

Interesting discussion when you come to publishing a game: https://community.monogame.net/t/says-game-wont-run-another-pc-unless-it-has-net-core-installed-on-it/14570/5

Download versions of ShootThemAll

Each version can be found as a git tag, making it easy to get started if you are new to Monogame. Just click the tags link, select a version and download the zip file.

Unpack the zip file and open the ShootThemAll.sln file in Visual Studio. Build and run.

Versions

Starting with the most basic example and then going forward. I try to cover the most basic things like setup and running a monogame project, then I cover what I think are the most important things in 2D game programming in monogame. If you are new to monogame, start with version 1.0! Otherwise feel free to read about what interests you, the code is short and to the point, and I try to keep it to the bare minimum at all times.

The different versions add to the previous version, so you will quickly familiarize yourself with the code.

monogame.txt · Last modified: 2023/01/26 15:10 by jl