All Projects → silbinarywolf → steamworks

silbinarywolf / steamworks

Licence: MIT license
Steamworks implementation in Go that doesn't require CGo

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to steamworks

steamworks
Steamworks API wrapper for Go
Stars: ✭ 26 (+23.81%)
Mutual labels:  steam, steamworks
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.
Stars: ✭ 30 (+42.86%)
Mutual labels:  steam, steamworks
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 (+1204.76%)
Mutual labels:  steam, steamworks
idle master extended
🃏 Get your Steam Trading Cards the Fast Way (Fast Mode Extension 🚀)
Stars: ✭ 1,771 (+8333.33%)
Mutual labels:  steam, steamworks
steam.py
An async python wrapper to interact with the Steam API and its CMs
Stars: ✭ 74 (+252.38%)
Mutual labels:  steam, steamworks
Chat-LoggerPP
Steam Chat Logger
Stars: ✭ 13 (-38.1%)
Mutual labels:  steam, steamworks
hookey
Enables all the DLCs. Like Creamapi but just for linux and a subset of Paradox games.
Stars: ✭ 87 (+314.29%)
Mutual labels:  steam, steamworks
Facepunch.Steamworks-MonoGame-Integration
Facepunch.Steamworks + MonoGame.Framework = the easiest SteamAPI Integration for your app!
Stars: ✭ 18 (-14.29%)
Mutual labels:  steam, steamworks
node-steam-chat-bot
[Inactive] Simplified interface for a steam chat bot
Stars: ✭ 28 (+33.33%)
Mutual labels:  steam
SteamDiscoveryQueueBot
A userscript to automatiaclly harvest the Steam Trading Cards from the discovery queue.
Stars: ✭ 39 (+85.71%)
Mutual labels:  steam
SteamAchievementNotifier
Steam Achievement Notifier is an Electron application that shows a customisable notification when you unlock any Steam Achievement! It uses the Steam Web API to track achievement stats in real time, and displays an achievement summary within the notification.
Stars: ✭ 77 (+266.67%)
Mutual labels:  steam
FreeSteamGames-TelegramBot
A Telegram Bot that sends you a message when a game on steam is free
Stars: ✭ 35 (+66.67%)
Mutual labels:  steam
LuckyAPI
A modloader for Luck be a Landlord
Stars: ✭ 12 (-42.86%)
Mutual labels:  steam
Steam watcher
yobot插件,Steam雷达,可自动播报玩家的Steam游戏状态和DOTA2图文战报
Stars: ✭ 21 (+0%)
Mutual labels:  steam
SteamTradeOffersBot
SteamBot fork that provides an easy-to-use Trade Offer library and a true generic inventory interface.
Stars: ✭ 45 (+114.29%)
Mutual labels:  steam
RemoteControlDocs
📻 API Documentation for the Steam Remote Control
Stars: ✭ 16 (-23.81%)
Mutual labels:  steam
its-ok-i-guess
🧐 Guess the game from the Steam review!
Stars: ✭ 41 (+95.24%)
Mutual labels:  steam
Achievement-Watcher
A sexy achievement file parser with real-time notification, automatic screenshot and playtime tracking. View every achievements earned on your PC whether it's coming from Steam, a Steam emulator, and more.
Stars: ✭ 331 (+1476.19%)
Mutual labels:  steam
protonup
Install and Update Proton-GE
Stars: ✭ 436 (+1976.19%)
Mutual labels:  steam
Fixator10-Cogs
Cogs for Red-DiscordBot. Including port of Stevy's V2 leveler.
Stars: ✭ 66 (+214.29%)
Mutual labels:  steam

Steamworks API

Build Status Documentation Report Card

Go implementation of the Steamworks API that aims to load the Steam API dynamic-link libraries without the use of CGo.

This package was built so that I could utilize the synchronous functions such as SetAchievement, ClearAchievement and GetAchievement. You will will not be able to utilize methods that rely on callbacks as Go functions cannot be called from C-code without CGo.

If you're looking for a package with more API calls supported such as callbacks, consider looking at BenLubar's Steamworks implementation.

Install

  1. Install the package
go get github.com/silbinarywolf/steamworks
  1. Copy DLL into your project directory (provided in the Steamworks SDK zip file)
steamworks_sdk_146.zip/sdk/redistributable_bin/win64/steam_api64.dll
  1. Initialize Steamworks API
const steamAppId = YOUR_STEAM_ID_HERE; // 220 = Half Life 2's Steam App ID

func main() {
	if steamworks.RestartAppIfNecessary(steamAppId) {
		log.Println("restarting with steam")
		os.Exit(1)
	}
	if !steamworks.Init() {
		log.Fatalln("Fatal Error - Steam must be running to play this game")
	}
}
  1. Build your project directly into the Steam directory for testing
go build -o "D:\SteamLibrary\steamapps\common\\{YOUR_GAME}\game.exe" && /D/SteamLibrary/steamapps/common/{YOUR_GAME}/game

Potential Problems

  • Achievements only appear or trigger once the user quits the game. Not sure if this is normal behaviour or a quirk of initializing the Steam API without CGo.
  • Clearing achievements will take effect immediately and not require quitting the game, ie. if you view your game on your Steam page, the achievement will become locked again immediately after you call ClearAchievement.
  • RestartAppIfNecessary will call the DLL function SteamAPI_RestartAppIfNecessary, which will return 1163264 in error cases rather than 0 or 1. Currently I'm unsure if this means I'm doing something wrong or if this value is expected. In anycase, this logic might need to be changed or adjusted in the future so that we only return true if ret == 1.
  • Currently tests are failing on Travis due to a "Class not registered" error that I cannot reproduce on my local machine. My research seems to suggest that it means a DLL it expects isn't registered however this specific DLL is not meant to be registered, so my hunch is that this error might be a symptom of Steam not being installed.

Supported Operating Systems

  • Windows

Requirements

  • Golang 1.13+

Documentation

Credits

  • FoxCouncil for their .NET implementation which I was able to use as a reference in the porting process.
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].