Currently finished developing super minimum Steamworks handler, that deal with Leaderboard & achievement (set only).
For Windows, i used MSVC 2010 Express.
For Mac, i used Qt 5.4 and inject it directly to desktop export template.
Gideros version that i used is 2015.08, which is currently the most stable.
Download:
https://www.mediafire.com/?qu9tn0hi9udppqk-Feel free to use-
SteamCore:enterFrame will process leaderboard's callback, when SteamCore:checkStatus reach "success" (or "notFound" or "failScoring") you can proceed to another sendScore. Default status is "" (empty string).
You don't need to call this on each frame, just call when dealing with sendScore.
Code example for upload score:
SteamCore.uploadNext = {}
function SteamCore:uploadScore(namez,scorez)
local status = SteamCore:checkStatus()
if status == "success" or status == "notFound" or status == "failScoring" or status == "" then
SteamCore:sendScore(namez,scorez)
local function recheckScore()
local status = SteamCore:checkStatus()
if status == "success" or status == "notFound" or status == "failScoring" or status == "" then
if #SteamCore.uploadNext > 0 then
SteamCore:uploadScore( unpack(SteamCore.uploadNext[1]) )
table.remove(SteamCore.uploadNext,1)
end
else
-- print(status,namez,scorez)
SteamCore:enterFrame()
Timer.delayedCall(500,recheckScore)
end
end
recheckScore()
else
table.insert(SteamCore.uploadNext,{namez,scorez})
end
end |
No Event Dispatcher is available, because i don't know how.
)
Not forget to mention, the source code is in a mess, because i just try to manage it to work, and not too care about other things.
Follow this to make it work,
http://giderosmobile.com/forum/discussion/1025/step-by-step-how-to-write-a-c-plugin-and-deploy-it-to-the-desktop-windows-player/p1(No source code shared for Mac version, because it is a total mess... and include many of my own modification.
But i use exactly the same leaderboard.h and leaderboard.cpp)
If you want more than this wihtout doing anything with the source code, another option is to use Web API :
https://developer.valvesoftware.com/wiki/Steam_Web_APIBut Web API
should be called from a server, that is php, because Steam want it like that...
Also it limited to 100000 call / day.
Comments
And it worked?
Yes, we just need to add Lua5.1.dll and msvcr100d.dll
I don't know whether it is free to distribute them or not, but fast search indicate that it's okay.
Also i didn't bother with statically add library because i think it's just for steam anyway.
@tkhnoman, I wonder if it would be a good idea to host your source code for the plugin on Github? Then people can keep up to date.
Likes: totebo
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
Not sure, but i failed when creating plugin for steam on OSX. The one i uploaded here is simple code that i attached to the Qt's desktop export directly. So no source can be really shared (because it's constrained to ver 2015.08)
(Also in the end, i used different leaderboard.h for Mac & Windows version, i need to use QString because i can't keep const char* to have stable value, don't know why)
That is why, i don't think i will put this to github.
Likes: totebo
https://deluxepixel.com
(Mainly it's just like Steam's example code anyway)