GameLib.NET
GameLib.NET copied to clipboard
GameLib.NET is a library to give .NET developers easy access to the users installed game launchers and installed games.
GameLib.NET
GameLib.NET is a library to give .NET developers easy access to the users installed game launchers and installed games. The motivation for the library is a tool I'm currently working on which requires access to all game executables on a PC.
While this repository is providing already the plugins to gather the games from the most popular game launchers, it easily extendible via the MEF Framework. A developer guide will follow, but I'm pretty sure the geeks will find out themselfes on how to do it.
Support
I try to be responsive to Stack Overflow questions in the gamelib-net tag and issues logged on this GitHub repository.
If I've helped you and you like some of my work, feel free to buy me a coffee ☕ (or more likely a beer 🍺)
Plugins
Following plugins are already bundled with GameLib.NET to detect the game launchers including their installed games:
Steam
Epic Games
Ubisoft Connect
Origin
GOG Galaxy 2.0
Battle.net
Rockstar
Riot Games
Installing
Multiple options are available to install within your project:
-
Install, using the Nuget Gallery
-
Install using the Package Manager Console:
Install-Package GameLib.NET -
Install using .NET CLI
dotnet add package GameLib.NET
Usage
GameLib.NET provides a LauncherManager class which has to be instantiated, optionally LauncherOptions can be supplied. Each Plugin will provide an interface instance for the launcher ILauncher as well an interface instance for IEnumerable<Game>.
using GameLib;
var launcherManager = new LauncherManager(new LauncherOptions() { QueryOnlineData = true });
foreach (var launcher in launcherManager.GetLaunchers())
{
Console.WriteLine($"Launcher name: {launcher.Name}");
Console.WriteLine("Games:");
foreach (var game in launcher.Games)
{
Console.WriteLine($"Game ID: {game.GameId}");
foreach (var item in game.GetType().GetProperties().Where(p => p.Name != "GameId"))
{
Console.WriteLine($"\t{item.Name}: {item.GetValue(game)}");
}
}
}
Please note: All values are cached within each launcher to save computing time on the next call. If you like to get refreshed values (e.g. new game installed while the lib is running) the Refresh() Method on the LauncherManager or on the actual ILauncher has to be called.
What launcher / game information is the library providing?
To make a long story short have a look at the ILauncher interface as well as the IGame interface to see what values are returned by default. Each plugin can provide more information, which can be found in the README.md the corresponding plugin.
Please note: Not all launchers will fill all properties in the IGame interface instance. Further information are provided in the README.md of each plugin.
Demo application
Have a look at the Console Demo as well as the WPF GUI Demo within the repository. Both will run straight out of the box to give you a hint what the library can do for you.


Dependencies and Credits
-
Teneko's Teronis.DotNet for allowing project reference content to be added to the NuGet package during pack process
-
Josef Nemec and contributers of Playnite for the inspiration of decoding the proprietary manifest and catalog data of each launcher
-
The team of SteamDB providing Valve's KeyValue for .NET for reading Steam's proprietary key value format files
-
Protocol buffer deserializing by protobuf-net
-
JSON deserializing by Json.NET
-
YAML deserializing by YamlDotNet
-
Icons are provided by Flat Icons