Let's take Godot for walkies 🦴
Prerequisites
- .NET SDK 8.0 or later
- A Godot project directory (with
project.godot)
Installation
Building from Source
- Clone with submodules:
git clone --recursive https://github.com/outfox/2dog
cd 2dog- Build Godot (requires Python with uv):
uv run poe build-godot- Build 2dog platform packages, and the main library and NuGet packages:
uv run poe buildYou can also run
uv run poe build-allto do steps 2 and 3 in one go.
Your First 2dog Application
Using Templates (Recommended)
The fastest way to get started is using the 2dog project template:
dotnet new install 2dog.Templates # Install template (pending NuGet release)
dotnet new 2dog -n MyGodotApp # Create project
cd MyGodotApp
dotnet run # Run the appThis creates a complete project with sample Godot content and everything configured. See Project Templates for details.
Note: Templates are pending NuGet release. For now, install locally from source.
Manual Setup
Alternatively, create a new console application manually:
dotnet new console -n MyGodotApp
cd MyGodotApp
dotnet add package 2dogReplace Program.cs:
using twodog;
// Create engine pointing to your Godot project
using var engine = new Engine("MyGodotApp", "./project");
// Start Godot
using var godot = engine.Start();
// Run the main loop
while (!godot.Iteration())
{
// Your code runs here every frame
// Access the scene tree via engine.Tree
}Project Structure
A minimal 2dog project requires:
MyGodotApp/
├── MyGodotApp.csproj
├── Program.cs
└── project/
└── project.godot # Minimal Godot project fileThe project/ directory must contain at least a project.godot file. You can create one with the Godot editor or use a minimal template:
; project.godot
config_version=5
[application]
config/name="MyGodotApp"Build Configurations
2dog supports three build configurations for different use cases:
dotnet build -c Debug # Development with debug symbols
dotnet build -c Release # Optimized production build
dotnet build -c Editor # Editor tools with TOOLS_ENABLEDThe Editor configuration enables Godot's full editor toolchain, including:
- Resource import pipeline
- Editor APIs (
EditorInterface,EditorPlugin) - Import plugins for textures, models, audio
- Scene validation and manipulation tools
See Build Configurations for detailed information.
Next Steps
- Use Project Templates to quickly scaffold new projects
- Learn about Core Concepts to understand the architecture
- Explore Build Configurations for Debug, Release, and Editor modes
- Check the API Reference for detailed documentation
- Set up Testing with xUnit for your project