Godot 3 adds support for C#. This article explains how to utilize that so you can write game code in F#.
The following article explains the workflows. If you want to see the result check out the project files.
NOTE: Currently this article deals with the workflow using Windows and Visual Studio only. I intend to update it with the corresponding linux workflow later.
Why F#?
The greatest feat of C# is that it allows you to mix and match a lot of different styles. But this comes at a price, since in my experience it takes a very experienced and insightful programmer to know about different programming paradigms, stick to the one you chose and choose the right one depending on the kind of code you are writing. So probably the biggest difference between C# and F# is that F# is a much more opinionated language. There's not much that you can do in F# that you really can't do in C#, but software development is not about what you can or can't do, it's about what you end up doing. By making it easier to stick to established rules than to break them F# creates what has become known as a "pit of success" (see this talk by Mark Seemann for more details).
Step 1: Create a Godot project with a C# script
Start by creating a new project in Godot 3 (using the version with Mono support). Once that's done create a new scene called Player.tscn and add a C# script called Player.cs.
Step 2: Add an F# project to the solution
Step 3: Write a class in F# and reference it in C#
The key trick to using F# in Godot is very simple: just write a class in F# and inherit from it in a C# class.
So go to the C# class that was generated by Godot. Remove everything from the file and replace it with
using GodotDemoFs; public class Player : PlayerFs {}
Now go to the .fs-file in your F# project and add this code:
namespace GodotDemoFs open Godot type PlayerFs() = inherit Node() override this._Ready() = GD.Print("Hello from F#!")
Step 4: Save and Compile
Last but not least save all changes, go back to the Godot editor, open up the "Mono" panel at the bottom of the screen and click "Build Project".