uspgamedev / luasteam

Bindings to connect lua with Steam API
https://luasteam.readthedocs.io/en/stable/
MIT License
116 stars 19 forks source link

Steam overlay wont show. #36

Closed gungugugungu closed 4 months ago

gungugugungu commented 4 months ago

Hi! I managed to get luasteam working properly with all of it's features fully running, but for some odd reason the game overlay just wont show up. I'm on Ubuntu 22.04 with the latest luasteam version. Here's my source code:

local Steam = require "luasteam"

function love.load()
    Steam.init()
    love.window.setMode(1920, 1080)
    love.window.setFullscreen(true)
    print("Steam level: " .. Steam.user.getPlayerSteamLevel())
    Steam.friends.activateGameOverlay('stats')
end

function Steam.friends.onGameOverlayActivated(data)
    if data.active then
        print("Steam overlay now active")
    else
        print("Steam overlay now inactive")
        Steam.friends.activateGameOverlay('stats')
    end
end

function love.update(dt)
    Steam.runCallbacks()
end

function love.draw()
    love.graphics.setBackgroundColor(1, 1, 1)
    love.graphics.setColor(0, 0, 0)
    love.graphics.print('Hello World!', 0, 0)
end

function love.quit()
    Steam.shutdown()
end

and here is the command line output when I run it:

[S_API] SteamAPI_Init(): Loaded '/home/gungu/.steam/debian-installation/linux64/steamclient.so' OK.
Setting breakpad minidump AppID = 2457300
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561199029178397 [API loaded no]
Steam level: 10

and just because it might help, here is what my lua file's directory contains: data libsteam_api.so luasteam.so main.lua steam_appid.txt

yancouto commented 4 months ago

I've been testing Steam integration on games with a few different languages. Usually the Steam overlay doesn't really show up when you're running the game locally, but it does always show up when you're running through Steam because it loads the steam api earlier in the graphical startup stuff.

Not sure there's much that can be done about that in LOVE.

Everything else in Steamworks still works fine, and the overlay does work when you actually release the game.

gungugugungu commented 4 months ago

Thanks, I will quickly make and upload a build of my game to check if it works.

yancouto commented 4 months ago

As a hack, if you already have a deployment on steam, you can replace the files in your local directory and still run it with Steam, so you don't need to do a new push always for this quick debugging.

Sorry it wasn't really fixed, but I'll close the issue.

gungugugungu commented 4 months ago

Oh thanks, that totally makes sense