One of the biggest headaches of mine was connecting Regret to Steam, since Regret is built using Adobe Air platform, Iād have to write my own Steam Wrapper. There are virtually no tutorials on how to do that, plus I suck at C++ and I donāt wanna pay anyone to do that, because Iām greedy. :C And broke...and also because when I asked for help about Steam wrapper on Twitter, no one answered. Bastards. But this is not about me.
Where was I?
Right!
I did look things up and stumbled upon FRESteamWorks project. Which is a SteamWorks API for AIR applications. In other words itās the thingy that lets Regret talk to Steam.
Great!
I followed the simple documentation, embedded the latestĀ .ane file, downloaded the SteamSDK from Steam partner websiteĀ and it doesnāt work...
And Iāve no idea why.
Turns out there are a couple of tricks one has to do to get everything working. And I know that many are/have struggled with this. So I figured Iād write a ālittleā tutorial for others. Just in case.Ā
So, step 1.
And do keep in mind, Iām on Windows, but it should be pretty much the same on Mac as well. Not gonna even mention Linux. <.<
Update Air to the latest version. In order for this to work you have to have, at least, Air 3.0.
Step 2.Ā
Get the latest FRESteamWorks.ane - LinkĀ
Currently the latest build is -Ā v0.5-29-gea3356b
Step 3.
Log in or register toĀ partner.steamgames.comĀ
Download the latest Steamworks SDK.
(Youāll only need to embed 1 file from the SDK.)
Step 4.
Iām usingĀ Flash Builder 4.6, but the process is pretty much the same with whatever IDE youāre using.
Right click on your project >> properties >> ActionScript Build Path >> Native Extensions. And add your downloaded ane file.
Step 5.
Open up -app.xml file. Upon adding the ane file, the -app.xml should be updated automagically, but just to make sure check the <extensions> tag. It should look like this:
<extensions>
<extensionID>com.amanitadesign.steam.FRESteamWorks</extensionID>
</extensions>
Next in supported profiles add the following:
<supportedProfiles>extendedDesktop</supportedProfiles>
And, finally, scroll to the RenderMode tag and set it to direct mode:
<renderMode>direct</renderMode>
We need to have ādirectā render mode I.e. Hardware Acceleration, otherwise Steam Overlay wonāt work.
Step 6.
Find the SteamWorks SDK that youāve downloaded and copy steam_api.dllĀ file from redistributable_bin folder into your projectās directory.Ā
The second file that youāll need is just a text file with, either your appID, or the default one that Valve provided, which is 480.
Just create a text file, name itĀ steam_appidĀ and put 480 in it. Save and youāre done. Keep in mind - all of these files have to be together, otherwise Steam wonāt be able to figure out the appID.
Step 7. (almost done)
If you try and run in debug right meow, you should be getting an error:
Error #3500: The extension context does not have a method with the name AIRSteam_Init.
It pretty much means that everythingās embedded correctly. It just doesnāt work when you run in debug.
Step 8.
Ā Upon release build, copy all two of the files into bin-release-temp,Ā make sure in the Native Extensions tab, package is checked so that you actually are packaging your app with the ane file. And youāre done!
Congratulations! Good bye.
Whatās that? Steam overlay isnāt working?
Well, thatās because you have to launch your app via Steam. Just installing and running your app wonāt work. Sure itāll connect, you can get/set your data, but no overlay. Amazingly enough, thereās nothing about this vital step anywhere. Not in the docs, nor comments. >.>
So, go to your Steam library >> add Non-Steam Game and run it through there.
The developerās suggested:Ā
steamworks.addOverlayWorkaround(stage, true);
To make your app use hardware acceleration and thus inject Steam Overlay,
didnāt do crap for me. Besides, we already enabled Hardware Acceleration, so it shouldāve worked from the beginning.
Ok, now weāre done.
Potato.