This extension provides an interface to integrate a game with the Steamworks SDK.
This extension is still in development and should only be used for testing.
To use Steam in your Defold project, add a version of the Steam extension to your
game.project dependencies from the list of available Releases. Find the version you want, copy the URL to ZIP archive of the release and add it to the project dependencies.
Project->Fetch Libraries once you have added the version to
game.project to download the version and make it available in your project.
To be able to build and run from the editor you need to copy
local function on_steam_event(self, event, data) if event == "GameOverlayActivated_t" then print("Overlay is", data.m_bActive) end end function init(self) -- initialize the Steamworks SDK local status, error = pcall(steam.init) if not status then print("Error: " .. error) return end steam.set_listener(on_steam_event) end function update(self, dt) steam.update() end
Refer to the example project to see a complete example of how the intergation works.
The source code is available on GitHub