Page 1 of 1
Steamworks API and LÖVE
Posted: Tue May 10, 2016 6:00 pm
by ThePC007
Hey guys,
I am currently far from having a finished (or well-developed enough) game to sell on Steam, however, I've been wondering about how exactly I'd integrate the Steamworks API into a LÖVE game. I've seen Move or Die, a game that has also been made using the LÖVE framework, support Steamworks features such as Steamcloud, the Steam workshop, and Steam achievements.
Do I need to integrate the Steam workshop into the LÖVE source manually and recompile it myself? If so, how would I go about doing that? Would I need to make a new module for that? Is the source code documented anywhere, so that I can learn how to actually make new modules for LÖVE?
Thanks,
ThePC007
Re: Steamworks API and LÖVE
Posted: Tue May 10, 2016 9:53 pm
by slime
You could either make a traditional Lua-C wrapper DLL (completely independent from LÖVE itself), or use FFI bindings through LuaJIT (also independent from LÖVE itself) - the latter being something like this:
https://github.com/CapsAdmin/goluwa/tre ... ries/steam
Re: Steamworks API and LÖVE
Posted: Fri May 13, 2016 8:20 am
by SiENcE
Re: Steamworks API and LÖVE
Posted: Fri May 13, 2016 8:55 pm
by ThePC007
Thanks, guys.
Re: Steamworks API and LÖVE
Posted: Wed Jul 27, 2016 12:58 am
by Madrayken
Hi folks.
Spellrazor was finally Greenlit (Woo!) and now I'm in the hell of trying to get Steam integrated. I've never touched FFI before, I've never made a .dll or .dynlib (though I've written many commercial games in the past). I'm trying to understand how other people have done it and I'm struggling a bit.
Here's how it looks to me, option-wise:
1) Recompile the entirety of löve2d, including links to the Steam libs included in the SDK.
- Pro: Probably the simplest way to incorporate the Steam libs.
- Con: Ties my Steam code to a specific version of my game, making it tougher to debug/modify and update. Requires a totally separate version/compilation for Mac and PC builds. (I have no experience of VC and would rather avoid it if possible).
2) Create a Lua-C wrapper DLL.
- Pro: Simple-ish for the Steam side of things. At least in theory. I've never made a DLL before!
- Con: Still requires VC for Windows and Xcode for Mac. Still requires learning about luaJit/ffi (not a problem, see below)
3) Use luajit/ffi to call the Steam libs included in the SDK directly from the game's 'main' directory.
- Pro: Allows me to keep the game and the Steam implementation details separate. Allows one set of source to work for both PC and Mac.
- Con: I have absolutely no idea how this works. The example code shared so kindly above leaves me more baffled than before.
So, my questions are:
a) Are my assumptions correct?
b) For 3) do I require both FFIBuild to build the bindings and GoLuwa's Steam integration? Or is GoLuwa's Steam lib (8 files) all that's needed? Or is it legacy, and requires FFIBuild to create newer bindings?
I've never done anything like this before, despite having released commercial games in everything from 6502 to Objective-C, so any help would be much appreciated.
Re: Steamworks API and LÖVE
Posted: Wed Jul 27, 2016 5:58 am
by Davidobot
I'm pretty sure
Those Awesome Guys which made Move or Die will be more than willing to assist you in integrating steamworks into love. I would drop them a message if I were you.