Create a MonoGame project for Windows (desktop)

Page updated :

MonoGame is added as a component of Visual Studio, so you're basically going to do it in Visual Studio.

Start Visual Studio and create a new project.

新しいプロジェクトを作成

MonoGame only supports "C#" programming language, so select C# from the tree on the left and select MonoGame.

This time, we're going to create a game project for the Windows desktop, so select MonoGame Windows Project from the middle list. If you want to select another platform, a framework, you will be choosing another project.

Enter the name and location of the project in the box below and create it with the OK button.

MonoGame プロジェクトの選択と作成

The structure of the created project is shown in the diagram. MonoGame is based on XNA Game Studio, so it's not much different from the project configuration of XNA Game Studio. Some are configured for MonoGame.

作成されたプロジェクトの構成

The game1.cs file is the picture that opens it. The code is similar to when you created a project in XNA Game Studio. The classes are almost the same, so if you have experience, you should be ready to start developing them immediately.

「Game1.cs」の中身

I'm just going to create a project this time, so i'll just try to run it.

開始ボタンクリック

A window has been displayed and the game screen is displayed. The initial code only clears the background color, so we're going to incorporate the game logic.

実行されたゲーム画面