Hello, recently I’ve been implementing an achievement system for my game, and have been looking into making sure the system I implement will be cross platform compatible. For this example I’m only thinking of Steam and EGS, but this could also apply to GOG, consoles, or other storefronts.
The issue I’m running into is the difference in how these different platforms handle have achievements work when you are offline.
Steam specifically keeps track of achievement and stat API calls your application makes when offline, and then applies them automatically when you’re online again. This is a great QOL!
As per the Steamworks “Stats and Achievements” docs:
Steam keeps a local cache of the stats and achievement data so that the APIs can be used as normal in offline mode. Any stats unable to be committed are saved for the next time the user is online. In the event that there have been modifications on more than one machine, Steam will automatically merge achievements and choose the set of stats that has had more progress. Because Steam keeps a local cache of stats data it is not necessary for the game to also keep a local cache of the data on disk. Such caches often come in conflict, and when they do it looks to users as if their progress has been reverted, which is a frustrating experience.
However Epic seems to imply that instead I should handle achievements by keeping a local cache which consistently tries to apply itself whenever I can next connect to the server.
As per this EOS article:
Achievements can only be unlocked when the client is logged into EOS. In the case of offline play or disconnections, the recommended approach is to ensure data relevant to achievement unlocks is saved locally and then perform a check on this data when the client next connects to EOS. You can then manually unlock any achievements as necessary, as explained in the documentation here.
We generally recommend that developers implement a full achievement unlock check that is performed at startup or when save data is loaded. This ensures that there are no situations where an unlock may fail during gameplay and render the achievement permanently locked.
So, it seems we are at a bit of an impasse. From my perspective it sounds like keeping closer to the Epic suggestion of building a local system to store achievement and stat data would work best across most platforms. In order to not cause problems on Steam I would have to unplug whatever code is manually unlocking achievements when it reconnect to Steamworks.
If you’ve made a similar system before or had to deal with these issues, I’d love to hear how you worked with this problem. And any general advice would be appreciated!