Steam
Introduction
FlatRedball games can be distributed on Steam with or without adding code to handle Steam integration. Steam integration can be added using the Steamworks.NET library. This includes support for achievements and responding to the Steam overlay being shown.
Adding Steamworks.NET Library
To add Steamworks.NET library to your project:
Go to the Steamworks.NET github releases page
Download the latest release standalone
Unzip the downloaded file
Link the Steamworks.NET.dll file in your project
If you are targeting .NET 6, use the 64 bit version.
If you are making a Desktop GL (.NET Framework) project, be sure to link to the x86 version as this version of FlatRedBall does not support 64 bit builds
Copy the steam_api64.dll or steam_api.dll file to the same folder as your game's .csproj (and .gluj) depending on whether you linked to the 64 bit version of Steamworks.NET.dll
Add the steam_api file to your project in Visual Studio and mark it as Copy if Newer so that the file ends up in your game's bin folder next to the built .exe.
Add your steam_appid.txt file to the folder where your game's exe is located.
When testing, be sure to have Steam running or else your tests won't work.
Adding SteamManager
Once the Steamworks library is added to your project, you can interact directly with the library to award achievements and respond to the tab overlay being shown. If you would like to work directly with this library, you can find additional information on the Steamworks github page. The documentation is focused on Unity but many of the concepts apply. Alternatively, the following SteamManager class can be used to set up a project quickly. Note that this is provided to help get a project set up quickly. Future versions of FlatRedBall may provide more integrated solutions such as code gen: