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.
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:
This code is rebuilt from the great NeonShooter demo by SimonDarksideJ, found here: https://github.com/MonoGame/MonoGame.Samples
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.
This is the minimum amount of code for a Monogame window in .NET 6.0. It is just a black window.
Nugets are the blessing of C# as it makes it so easy to add other people's code to your project!
This project makes use of two nugets:
The code reside in two files, and here they are:
Class Program is the starting point for the windows application. The constructor creates an instance of the ShootThemAllGame class and calls Run().