REGARDING 'UNIFIED' CLIENT PLUGINSThe client plugins I have written (AGSteam and AGSGalaxy) now support "unified" building by default. This means that you will use "AGS2Client" in place of "AGSteam" or "AGSGalaxy" in most cases. A call such as:
AGSGalaxy.SetAchievementAchieved("NAME");
Will instead become:
AGS2Client.SetAchievementAchieved("NAME");
(and likewise for AGSteam)
The benefit behind this is that you can toggle between AGSGalaxy and AGSteam (or other future plugins) without having to change your game scripts. To take full advantage of the unified plugin builds, you must ensure that the "API name" (the name you call from your game scripts) is
exactly the same on both the Steamworks and GOG Galaxy backend websites. This is what makes the unified build work! Once the achievements are set up properly on the backend websites, you can toggle between using the AGSteam and AGSGalaxy plugin and rebuild your game without having to change any code (or duplicate any code). For an example of this in action, see the
Steam+Galaxy project (
instructions).
Note that the unified builds replace the client-specific struct name ("AGSteam"/"AGSGalaxy") with "AGS2Client", and so the version macro is replaced with "AGS2Client_VERSION". However, to ensure that client-specific functions can still be utilized, the client-specific version macro is
also defined. So the AGSteam unified plugin will define "AGS2Client_VERSION" and "AGSteam_VERSION"
both with the version number of the Steam plugin. AGSGalaxy will define "AGS2Client_VERSION" and "AGSGalaxy_VERSION"
both with the version number of the GOG Galaxy plugin. This is necessary in particular to initialize the GOG Galaxy plugin, which requires a client ID and client secret not required in initializing the Steam plugin. See the Steam+Galaxy project for an example of how to implement this.
You may instead choose to utilize the "disjoint" build of the plugin, which still uses "AGSteam" or "AGSGalaxy" instead of "AGS2Client", but this means you will have to use separate code for Steam and Galaxy builds. A practical reason why you might want to do this is to allow "Galaxy crossplay" builds. Essentially that means that you would include
BOTH the AGSGalaxy
AND AGSteam
disjoint builds AT THE SAME TIME. You would initialize both client APIs, and call their respective functions separately. Doing so would allow you to have a single build of your game released on Steam and GOG Galaxy. As long as the player has both clients installed, then they can gain achievements for both clients at once. The disjoint plugin builds have "-disjoint" in the filename, but you can rename the binary (DLL) as needed for compatibility with an older game that uses client-specific game scripts.