1.1. Install Godot with C# Support on Windows

To get started developing Godot in C# on Windows, you’ll need to setup your workstation.

By the end of this tutorial, you will:

  • Download and install the Mono SDK
  • Download and install Godot
  • (optional) Download and install Visual Studio Code, and
    • Install the C# Extension
    • Install the .NET SDK
  • (optional) Configure Godot to use an external editor

Let’s get started!

Step 1/4: Download and Install the Mono SDK

Mono is an open source implementation of Microsoft’s .NET Framework based on the ECMA standards for C#and the Common Language Runtime. Microsoft’s .NET is a free, cross-platform, open source developer platform for building many different types of applications.

Godot uses Mono for C# support.

Go to the Mono Website and download the latest 64-bit stable release that is compatible with Godot.

At the time of writing this, Godot 3.0.6 requires Mono SDK 5.12.0. 

Click on the button labeled “Download Mono 64-bit (no GTK#)”

After you’re done downloading the .msi, run it to install the Mono SDK on your workstation.

 

Accept those terms and get installing!

Step 2/4: Download and Install Godot

Go to the Godot Website and download the Mono version of Godot–which is the only version that supports C#:

Under “MONO VERSION (C# SUPPORT),” click on the button labeled “64-BIT.” Note that in the REQUIREMENTS block below it specifies the version of Mono we just downloaded.

Once you’re down downloading the .zip file, extract it to a location where you want Godot to live. In my case, I have a special SSD just for development (X:), so I will extract it all there:

You can put it anywhere you want. Note that the zip file contains the executable and some .dll files. Make sure these always stay together.

At this point you are technically ready to click on the Godot executable and start working on your first project. I recommend, however, that you setup your code editor to be used as an external editor for Godot. At the time of writing this, VS Code is (and will likely continue to be) the preferred method of coding in C# for Godot. If you’re not already using it, check it out and give it a try, and then continue on to Steps 3 and 4 to get it setup with Godot.

If you are absolutely, positively sure you know what you’re doing and don’t want to use VS Code, you can head on to the next tutorial, 1.2: Hello, World!

Step 3/4: (Optional, but recommended) Download and install Visual Studio Code

Godot comes with a built-in script editor that is perfectly fine for GDScripts (and on Windows, you can even edit C# code). However, I prefer a familiar environment with all my intellisense and tools, so I will setup Godot to work with Visual Studio Code, and get VS Code all setup for working on Godot games.

If you don’t use VS Code and are looking for a fast, clean, and trustworthy code editor to switch to, give it a try. Microsoft really outdid themselves with this one.

Step 3.a: Install the C# Extension

In the Extensions tab, type in C# and then click on the C# extension from Microsoft:

Note that the little blue buttons toward the top say “Disable” and “Uninstall.” You are looking for the button that says “Install,” obviously. Once you’re done, it will look like mine.

Now, VS Code will give you great support for C# projects–just like the games you’re about to write!

Step 3.b: Install the .NET SDK

Technically this is not mission critical, but if you’re going to be using VS Code anyway, it’s going to bug you about having this installed. And when you do install it, Godot is going to be a lot happier, too. On top of all this, your development life will be a lot less stressful with the .NET SDK as well.

Head to the .Net Hello World page and click the link to download the .NET SDK:

Click on the purple button labeled “Download .NET SDK.”

Once it’s downloaded, go ahead and run it and click “Install”:

After it’s done installing, we are now ready to open up Godot and configure it to start using VS Code as our external editor when opening and editing C# files.

Step 4/4: (Optional, but recommended) Configure Godot to use an External Editor

It’s time to open Godot!

Click on the executable that you extracted from the .zip file in Step 2, and then smile–this is the first step on a long, rewarding journey:

Go ahead and cancel out of this window asking you to confirm that you don’t have any open projects. Normally when you open up Godot, you’ll be presented with a list of all your most recently worked on projects. Since this is our first time opening it, there aren’t any projects.

Then, click on the “New Project” button on the right:

A dialog will pop-up. Here you will name your new project:

Then, give it an empty folder to live in by clicking the “Create Folder” button:

Notice that you don’t have to have an empty folder in the Project Path, you just have to have a folder there that you want to contain a new folder with the project you’re creating. So in this case, I keep all my tutorial projects in a folder called godot-tutorials, and this project will be in a folder named godot-tutorials/Hello World/.

With your project folder created, go ahead and click the “Create & Edit” button.

You should now be in the main game engine window, entitled “Godot Engine – Hello World”:

This pop-up is completely normal. It’s here to remind us that C# support in Godot is still new, and we might run into some bugs along the way. Don’t worry: the Godot community is fantastic and any bug we run into will have a solution (I promise!).

Click “Ok” on that C# support dialog to close it.

You are now seeing the 3D viewer for Godot. Neat! Click on the “2D” link at the very top to switch to 2D mode:

Neat again!

This tutorial series is about making 2D games in Godot, so we’ll be in the 2D screen from now on. In the next tutorial, we’ll go over what you’re seeing here so that you’re both familiar and confident with the Godot 2D editor tools.

We’re almost done with this tutorial. The last thing we need to do is to tell Godot to use VS Code as our external editor.

In the top navigation menu, click on “Editor,” then “Editor Settings:”

This will open the Editor Settings window.

In the left sidebar, scroll all the way down to the section called “Mono,” and then click on the “Editor” link. In the main window, find the “External Editor” variable and click on the word “None” to see a list of items. You’ll want to select “Visual Studio Code,” then the “Close” button at the bottom of the dialog.

You’re all set! Now Godot is ready to be configured to use C# for your game projects.

In this tutorial, we’ve:

  • downloaded, installed, and configured Mono and the Mono-version of Godot so that we can write our games in C#.
  • We also (optionally) setup and configured Visual Studio Code to work with Godot

In the next tutorial, we will become familiar with the Godot 2D tools by turning our empty Hello World project into an actual “Hello, World” project that writes that string to the screen. We’ll also become familiar with the game development philosophies Godot brings to the table–namely, that you’ll be thinking in terms of scenes and nodes instead of, say, entities and components.

Take a short break. Stand up for a bit, walk around, smile at someone you don’t know.

Drink water.

When you’re ready, head on over to the next tutorial.