Page 1 of 2

luasteam - SteamWorks API Integration

Posted: Mon Jan 21, 2019 9:52 pm
by yancouto

luasteam is a lua library that allows working with the SteamWorks SDK. It does not depend on LOVE, but can be used on LOVE games. Unfortunately, it is not pure lua, since the original SDK is in C++, but we do provide libraries for Windows, Linux and OSX.

Check the Getting Started guide on our documentation to... get started.

Not all SteamWorks SDK functions are implemented in luasteam (I basically implemented what was necessary for my game, Marvellous Inc., which means most of the achievements, leaderboards and Workshop related functions). However, we are open to contributions! Send us PRs on our GitHub repository.

If you have any problems with luasteam, please let us know and we will try to help.

Re: luasteam - SteamWorks API Integration

Posted: Tue Jan 22, 2019 12:43 pm
by rilifon
Wow, this is so incredible, thanks for the amazing work lover!

Re: luasteam - SteamWorks API Integration

Posted: Sun Jan 27, 2019 3:27 pm
by Rickton
Thanks so much for posting this, this is amazing! It works great on Linux, but unfortunately the Windows version closes without apparent error after loading the DLL. Running through the console doesn't output anything, and it does seem to crash immediately after the "require" line (I tried printing immediately beforehand, and then immediately after, and only the before hand print comes through).

I actually saw this project back when it was on v0.0.2, and that version works fine on Windows, but 0.0.3 and 1.0.0 don't. I tested both 32 and 64 bit versions (with the applicable love version) and both behave the same way.

Re: luasteam - SteamWorks API Integration

Posted: Sun Jan 27, 2019 4:11 pm
by yancouto
I'm sorry. The problem was that the Windows version was linked using Lua 5.1 instead of LuaJIT. I fixed this a couple days ago and reuploaded the binaries for v1.0.0 (not for v0.0.3).

Could you download them again? Let me know if it works :)

Re: luasteam - SteamWorks API Integration

Posted: Sun Jan 27, 2019 5:38 pm
by Rickton
Looks like it works now. Thanks!

Re: luasteam - SteamWorks API Integration

Posted: Wed Mar 13, 2019 11:18 am
by Timon
It works really. Thanks!

What about User/Friends Avatar functions? i.e.

Code: Select all

imgid = Steam.friends.GetFriendAvatarID(uid, 2) 

Code: Select all

local imgdata, w, h = Steam.utils.LoadImageByID(imgid)
imgdata = love.image.newImageData(w, h, imgdata)
Thank you a lot for luasteam ))

Re: luasteam - SteamWorks API Integration

Posted: Wed Mar 13, 2019 4:03 pm
by yancouto
Hey Timon! I'm glad you're using luasteam.

It seems what you're looking for is an implementations of functions like SteamFriends::GetLargeFriendAvatar. These are not implemented, since I didn't have to use them yet :P

Feel free to add them yourself, and please submit PRs on our repo. I just improved our Contributing Guidelines with some tips, please take a look at it.

These functions are a bit tricky since it would be nice to be able to return LOVE images from them, but we don't want a strong requirement on LOVE. I think a good solution would be to return the actual RGBA matrix if the global value "love" does not exist, and otherwise return an actual LOVE image.

If you want to implement this but have any doubts, please comment here, or reach out to me directly on @yancouto on Telegram.

Re: luasteam - SteamWorks API Integration

Posted: Sat Apr 20, 2019 6:56 pm
Sounds great!
Possible in future i thinking about steam
when i solve low FPS problem

Re: luasteam - SteamWorks API Integration

Posted: Sun Jul 07, 2019 4:28 pm
by Rickton
Hi, luasteam works great for the Windows and Linux builds of my game, but I'm having a bit of trouble on Mac. I think the main problem is I'm not sure where to put the dylib that comes with the Steam sdk to get your library to find it.

I've tried placing it in Frameworks/, MacOS/, and Resources/, but none of them seem to be the right place. I see your game is available for Mac on Steam, where did you place Steam's dylib to get it to work?

Re: luasteam - SteamWorks API Integration

Posted: Thu Jan 21, 2021 6:57 pm
by pauljessup
using on a Mac, and I'm having an issue making a .love. Whenever I just drag and drop and run it in love by itself, it finds. the .so just fine (in the same directory as my .lua source files). But when I zip up and archive into a .love file, it can no longer find the .so. Not sure how to fix it, it says it's looking in the lua path files for it, but still not finding it. Yet it works fine if I just run the source through the Lua app.