All Projects → BlizzCrafter → Steamworks.Net-MonoGame-Integration

BlizzCrafter / Steamworks.Net-MonoGame-Integration

Licence: other
This repo is for everyone who is about to integrate the Steamworks.Net.dll into a MonoGame project. It shows some Steamworks.Net features and how easy it is to integrate it into a MonoGame project.

Projects that are alternatives of or similar to Steamworks.Net-MonoGame-Integration

Facepunch.Steamworks-MonoGame-Integration
Facepunch.Steamworks + MonoGame.Framework = the easiest SteamAPI Integration for your app!
Stars: ✭ 18 (-40%)
Mutual labels:  steam, steamworks, monogame
idle master extended
🃏 Get your Steam Trading Cards the Fast Way (Fast Mode Extension 🚀)
Stars: ✭ 1,771 (+5803.33%)
Mutual labels:  steam, steamworks, steam-api
steamworks
Steamworks API wrapper for Go
Stars: ✭ 26 (-13.33%)
Mutual labels:  steam, steamworks, steam-api
CreamInstaller
Automatically finds all installed Steam, Epic and Ubisoft games with their respective DLC-related DLL locations on the user's computer, parses SteamCMD, Steam Store and Epic Games Store for user-selected games' DLCs, then provides a very simple graphical interface utilizing the gathered information.
Stars: ✭ 274 (+813.33%)
Mutual labels:  steam, steamworks, steam-api
steam.py
An async python wrapper to interact with the Steam API and its CMs
Stars: ✭ 74 (+146.67%)
Mutual labels:  steam, steamworks, steam-api
MonoGame.Forms
MonoGame.Forms is the easiest way of integrating a MonoGame render window into your Windows Forms project. It should make your life much easier, when you want to create your own editor environment.
Stars: ✭ 183 (+510%)
Mutual labels:  steam, monogame, monogame-framework
Chat-LoggerPP
Steam Chat Logger
Stars: ✭ 13 (-56.67%)
Mutual labels:  steam, steamworks, steam-api
steam community market
Get item prices and volumes from the Steam Community Market using Python 3
Stars: ✭ 24 (-20%)
Mutual labels:  steam, steam-api
cocos2d-mono
Continuation of Cocos2D-XNA project, with focus on MonoGame
Stars: ✭ 18 (-40%)
Mutual labels:  monogame, monogame-framework
g-steam
steam web api for golang
Stars: ✭ 22 (-26.67%)
Mutual labels:  steam, steam-api
csgo-cli
CS:GO Console shows your user account, stats and latest matches. It also uploads demo sharecodes to csgostats.gg.
Stars: ✭ 31 (+3.33%)
Mutual labels:  steam, steam-api
steam-data
A simple data project for Steam data
Stars: ✭ 29 (-3.33%)
Mutual labels:  steam, steam-api
SteamTradeOffersBot
SteamBot fork that provides an easy-to-use Trade Offer library and a true generic inventory interface.
Stars: ✭ 45 (+50%)
Mutual labels:  steam, steam-api
steam-openid-connect-provider
Steam OpenID Connect Identity Provider (IdP)
Stars: ✭ 40 (+33.33%)
Mutual labels:  steam, steam-api
SteamworksPy
A working Python API system for Valve's Steamworks.
Stars: ✭ 151 (+403.33%)
Mutual labels:  steamworks, steam-api
SteamAuthOOP
OpenID-Login through Steam for your website
Stars: ✭ 32 (+6.67%)
Mutual labels:  steam, steam-api
steam-group-members
A node module to get a steam groups members list using promises.
Stars: ✭ 17 (-43.33%)
Mutual labels:  steam, steam-api
steam-auth
A simple PHP Steam login and User Detail package
Stars: ✭ 16 (-46.67%)
Mutual labels:  steam, steam-api
InternalSteamWebAPI
Documenting the unofficial and internal Steam Web API
Stars: ✭ 126 (+320%)
Mutual labels:  steam, steam-api
hookey
Enables all the DLCs. Like Creamapi but just for linux and a subset of Paradox games.
Stars: ✭ 87 (+190%)
Mutual labels:  steam, steamworks

Twitter Follow

Steamworks.Net MonoGame Integration

This repo is for everyone who is about to integrate the Steamworks.Net.dll into a MonoGame project. It shows some Steamworks.Net features and how easy it is to integrate it into a MonoGame project.

HelloSteamworks HelloSteamworks

Building

The following is required to successfully compile the solution:

  • MonoGame 3.6
  • Steamworks.Net Precompiled .dlls are included in this repo. They are targeting Steam SDK 1.42 (Steamworks.Net 11.0.0)

How To

To set up your own MonoGame with Steamworks.Net integration project you need to do the following steps:

  • Add the Steamworks.Net.dll as a reference

  • Add steam_api.dll as a new file to the project and set "copy to output directory" to "copy if newer"

  • Add steam_appid.txt as a new file to the project and set "copy to output directory" to "copy if newer"

    • Don't forget to add that file as a FileExclusion to your Steamworks build-script since you don't want that file to be copied to your customer's destination directory, since it's for debugging purposes only (it lets you try all the steam-stuff without actually having that game listed and active on steam and is important for debugging directly from out of Visual Studio). Your depot_build_xxxxxx.vdf you're referencing in your app_build_xxxxxx.vdf should end like this:

      	// but exclude all symbol files  
      	// This can be a full path, or a path relative to ContentRoot
        "FileExclusion" "*.pdb"
        "FileExclusion" "steam_appid.txt"
      }
      
  • Add your desired Steamworks AppID to the steam_appid.txt file

  • Initialize the API with the method SteamAPI.Init() like this:

using Steamworks;

protected override void Initialize()
{
    try
    {
        if (!SteamAPI.Init()) Console.WriteLine("SteamAPI.Init() failed!");
        else isSteamRunning = true;
    }
    catch (DllNotFoundException e)
    {
        Console.WriteLine(e);
    }
}
  • Update callbacks with SteamAPI.RunCallbacks(); like this:
protected override void Update(GameTime gameTime)
{
    if (isSteamRunning == true) SteamAPI.RunCallbacks();

    base.Update(gameTime);
}
  • ShutDown the Api with SteamAPI.Shutdown(); like this:
private void Game1_Exiting(object sender, EventArgs e)
{
    SteamAPI.Shutdown();
}

Add the EventHandler Exiting += Game1_Exiting and then the SteamAPI.Shutdown() method.

You should be able to build and run the project now. It may be possible that you will receive the following exception:

An unhandled exception of type 'System.BadImageFormatException' occurred in SWTEST.exe

Additional information: Could not load file or assembly 
'Steamworks.NET, Version=9.0.0.0, Culture=neutral, PublicKeyToken=null' 
or one of its dependencies. 
An attempt was made to load a program with an incorrect format.

In this case you need to make sure, that you took the right assemblies for your target platform. E.g. When you took the assemblies from the repo directory "Steamworks.Net-MonoGame-Integration/Steamworks.NET/Windows-x86/", then you need to configure your project to build it for the x86 platform. Use the integrated configuration manager to create or choose the right platform. It will look like this:

You should also define the right "conditional compilation symbols":

Type in "WINDOWS", when building for the windows platform and "LINUX", when building for linux.

Latest now it should build without an exception.

Samples

  • Hello Steamworks.Net: Simple sample which sets up bare basics of Steamworks.Net and displaying a welcome message which includes your steam user name.
  • AchievementHunter: Simple sample which shows you the correct way of implementing achievements and stats as well as storing them on the steam server. It's based upon the Steamworks Example 'SpaceWar' included with the Steamworks SDK.
  • Steamworks.Net MonoGame Integration: Extendend sample which shows some features of Steamworks.Net like UserStats, PersonaState, LeaderboardData, NumberOfCurrentPlayers, Steam User Avatar and so on.

Note: You need to start your steam client before executing the examples. Otherwise you won't receive any data -obviously ;)

Have fun!

Twitter Follow

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].