Steamworks (steamwrap)

ceosol

  • *
  • Posts: 2258
Extension Thread Link
http://community.stencyl.com/index.php/topic,47705.0.html


This "looks" like it should be easy to do. However, I am not a coder and cannot wrap my head around extension development. When I first installed the steamwrap extension, it went in fine. When I tried to create blocks, it started saying that it wasn't parsing correctly.

Here is some information on haxe and Steamworks:
https://github.com/grapefrukt/SteamWrap

Here is the Steamworks SDK:
https://www.dropbox.com/s/suhd5va85zdhoik/steamsdk.zip?dl=0

Steamworks website:
https://partner.steamgames.com/home

« Last Edit: May 11, 2016, 08:43:14 pm by rob1221 »

ceosol

  • *
  • Posts: 2258
Bump.

I would do any or all of this myself, but I do not know where to go next on it. I think even having unlockable achievements would be nice without having to go into any of the other stuff. Imagine Ghost Song with some cool achievements :)

rob1221

  • *
  • Posts: 9421
AFAIK Windows extensions are somewhat similar to iOS extensions except the native code is in C++ and not Obj-C.

Denver2003

  • *
  • Posts: 19
Hello,
I plugged this extension. And everything is fine. My game is connected with steam. Leaderbords works very good(upload and download).
But functions SteamWrap_RequestStats() and SteamWrap_RequestGlobalStats() is failed! Achievements don't work too!


logs from steamwrap.hx

[haxelib] Steam.hx:132: Leaderboard score downloaded: TIME_SCOREBOARD,-1,-1,-1
[haxelib] Steam.hx:123: STEAM: [STEAM] ScoreDownloaded SUCCESS (TIME_SCOREBOARD,-1,-1,-1)
[haxelib] Steam.hx:123: STEAM: [STEAM] Leaderboard.DOWNLOAD(TIME_SCOREBOARD)  SUCCEEDED
[haxelib] Steam.hx:123: STEAM: [STEAM] LeaderboardFound SUCCESS (TIME_SCOREBOARD)
[haxelib] Steam.hx:123: STEAM: [STEAM] Leaderboard.FIND(TIME_SCOREBOARD)  SUCCEEDED
[haxelib] Steam.hx:132: Leaderboard score downloaded: SCORE_SCOREBOARD,10,666,1
[haxelib] Steam.hx:123: STEAM: [STEAM] ScoreDownloaded SUCCESS (SCORE_SCOREBOARD,10,666,1)
[haxelib] Steam.hx:123: STEAM: [STEAM] UserStatsReceived FAIL ()
[haxelib] Steam.hx:123: STEAM: [STEAM] Leaderboard.DOWNLOAD(SCORE_SCOREBOARD)  SUCCEEDED
[haxelib] Steam.hx:123: STEAM: [STEAM] LeaderboardFound SUCCESS (SCORE_SCOREBOARD)
[haxelib] Steam.hx:123: STEAM: [STEAM] GlobalStatsReceived FAIL ()
[haxelib] Steam.hx:50: download TIME_SCOREBOARD
[haxelib] Steam.hx:123: STEAM: [STEAM] Leaderboard.FIND(SCORE_SCOREBOARD)  SUCCEEDED

what could be wrong here?

rob1221

  • *
  • Posts: 9421
DudeMakingAGame said last week that he's working on a Steam extension so he might be able to help you.

DJEmergency

  • Posts: 170
This should work for Windows, Mac, and Linux. All those platforms have steam.

rob1221

  • *
  • Posts: 9421
Denver2003 already has a game with working achievements on Steam and I'll be testing the SDK today.  I'll post the extension when I'm done since it still needs blocks and some other minor things done to work better with Stencyl.

rob1221

  • *
  • Posts: 9421
I have some blocks set up and I got my achievements working correctly.  While I won't be using leaderboards or stats, I'll make the blocks for those too.  Right now I'm trying to figure out this instruction for Mac:
Code: [Select]
<!-- OS X only: Set this value to the same value as the file property of your <app> node, this is needed to embed things into the generated .app file -->
<!-- Setting this for other platforms won't do any harm, so you can safely leave it enabled for everything -->
<set name="APP_FILE" value="??????" />

I'm assuming that value can be set inside the extension's include.nmml file, but I'm not certain.  I also have no idea what "the same value as the file property of your <app> node" means.

rob1221

  • *
  • Posts: 9421
Apparently that value is supposed to be set to the iOS project name (no idea why but whatever).  I also encountered a problem where a Mac64 folder wasn't found, so I made one and copied the Mac ndll into it although I'm not sure if that's correct.

Right now I'm stuck on making blocks for the leaderboards because I don't know all the parameters that I need.  The function uploadLeaderboardScore() takes a LeaderboardScore object, and that object has 4 parameters called leaderboardId, score, detail, and rank.  The first two are standard for leaderboards, but I have no idea what detail and rank are, even after looking at the C++ code and Steam documentation (they're both integers).  Rank has a default value so maybe it isn't required, but even so I'd still need to figure out what detail is supposed to be.

Attached is the current extension for any devs with a greenlit game who want to test.  Achievements on Windows is the only thing I've tested fully, so I can't confirm that anything else will work properly at this time.  Before using the extension, copy the contents of the redistributable_bin folder of the Steamworks SDK into the native/lib folder of the extension (I don't think I can share the Steam libs in public).  Also open include.nmml and fill in the two values on lines 8 and 9.

iii

  • *
  • Posts: 190
Good work.
I don't have a game for Steam right now, probably in the future (if I'm not too lazy to finish it).
This could come in handy.

Have you tried implementing the Steam Cloud for the save game?
Pretty useful for people to continue playing where they left off on any PC,
and as a backup if they accidentally uninstall their game along with the save game.

rob1221

  • *
  • Posts: 9421
The extension doesn't support Steam Cloud.  I think it's only stats, leaderboards, and achievements.  Someone with good C++ skills would need to add that.

iii

  • *
  • Posts: 190
Ahh.. I see.
Well, at least there's a bit of progress on the SteamWrap.

rob1221

  • *
  • Posts: 9421
I opened up my old Mountain Lion VM that I forgot about and I didn't see any achievement popups with my game.  So Mac achievements might not be working unless there was something wrong with my setup.  Unfortunately if they're not working then I'm out of ideas and someone else will have to figure it out.

Denver2003

  • *
  • Posts: 19
Hello
Apparently that value is supposed to be set to the iOS project name (no idea why but whatever).  I also encountered a problem where a Mac64 folder wasn't found, so I made one and copied the Mac ndll into it although I'm not sure if that's correct.

<set name="APP_FILE" value="??????" />  - its your APP FILE name without .app extention.
As I understand, it is necessary to copy lib files to required folder!

Right now I'm stuck on making blocks for the leaderboards because I don't know all the parameters that I need.  The function uploadLeaderboardScore() takes a LeaderboardScore object, and that object has 4 parameters called leaderboardId, score, detail, and rank.  The first two are standard for leaderboards, but I have no idea what detail and rank are, even after looking at the C++ code and Steam documentation (they're both integers).  Rank has a default value so maybe it isn't required, but even so I'd still need to figure out what detail is supposed to be.
detail- it  is just additional info about the record. For example,it is your record replay ID to show other players(if you have DB of replays on server).
rank - it is your rank in leaderboard. It should not be sent to the server.

rob1221

  • *
  • Posts: 9421
Quote
<set name="APP_FILE" value="??????" />  - its your APP FILE name without .app extention.
As I understand, it is necessary to copy lib files to required folder!
Yes, but I don't understand why it's pointing to the iOS project name and not the Stencyl project name.

Quote
detail- it  is just additional info about the record. For example,it is your record replay ID to show other players(if you have DB of replays on server).
rank - it is your rank in leaderboard. It should not be sent to the server.
OK then, I'll try giving detail a default value of 0 and just have the first two parameters in the block.


Any ideas about what's wrong with the Mac achievements?