Search Unity

Steam Achievements - what happens if achievement progresses outside of Steam platform?

Discussion in 'Editor & General Support' started by ulissesnascim, Jan 27, 2020.

  1. ulissesnascim

    ulissesnascim

    Joined:
    Feb 7, 2019
    Posts:
    10
    Hello. I am building the achievement system for a game that will release on Steam and other platforms. Right now, everything seems to be working fine using the SteamManager/SteamWorks SDK functions.

    However, I am afraid of one exception: what happens if a player triggers (or progresses) an achievement while outside Steam environment (i.e. if they go to executable and play the game not using the Steam platform). Will Steam recognize this issue and trigger the achievement the next time when the game is properly played? Do I have to store local achievement information and check if achievements were unlocked while playing off Steam? I kind of doubt that as the SteamWorks documentation does not foresee the issue.
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    If you require some systems, to be working on cross platforms, then don't lock yourself on single one, by using theirs, like Steam. Build own solution and store player data on the server. This way you are independent from platforms you realeasing on. Also, you make this way sure, that no matter which platform is, system is unified. Easy to compare player statistics.

    Alternatively, just build in game achievement system, and store data locally, ignoring any networking solutions. While there is nice feature on steam to see achievements, in my opinion most important is, what player see in game.

    Players can share screen shots if that matters at all to them. Is not end of the world, not using steam features. At least won't lock, or complicate your development, for cross platforms.
     
  3. ulissesnascim

    ulissesnascim

    Joined:
    Feb 7, 2019
    Posts:
    10
    Thanks, but it is not a cross-platform issue. To simplify, let's just say the game will only release on Steam and that it already has an internal achievement system. Also, this is the sole final issue for the game to release and we will not release it without Steam features.

    The case scenario is: if an user wants to, they can open the game executable without Steam being open. If they progress on an achievement, the Steam Achievement code will not work. Once they log into Steam and open the game again afterwards, the achievement will not trigger and may even become "unachievable", right?

    What I can do is make my internal achievement system the main one. Then I can check if any internal achievements were triggered or progressed differently from the Steam stats every time the game is opened.

    However, I doubt that having an internal achievement system is the ideal or faster solution for this. Does every major Steam game have their own achievement systems behind the curtain? What are the best practices for this case?
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    Steam offers synchronization feature, when player plays offline. That can syn saves, achievements etc.
     
  5. ulissesnascim

    ulissesnascim

    Joined:
    Feb 7, 2019
    Posts:
    10
    Yes, but does the sync work in case the user plays the game OUTSIDE the Steam environment?

    This is what I mean:
     
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    Sorry, I am a bit lost what are you trying to do.
    Do you want achievements, with a game which is installed via steam?
    If so, all relevant tools are provided by steam.
    Once you start a game, which is integrated with steam, it has code in it. Steam my be offline, but game stil has the code. And is able to sync. As long you use relevant features.
     
  7. Mr-Slat

    Mr-Slat

    Joined:
    Jan 25, 2013
    Posts:
    3
    Hi There! Why not use Environment variables


    #if (USING_STEAM)
    // STEAM CODE
    #endif


    Environment variables can be set in the project settings....
    Make a special build for steam with that variable (in this case USING_STEAM) and that code will only execute for steam users...

    Hope it helps :)


    This obviously if I understood the question... eheh

    If your trying to run the game only if Steam is up then there is a command within steamworks sdk that tells you if steam is currently running.... if not then call Application.Quit(); or just throw a message.....whatever you choose....

    But I think you're trying to develop the application for different stores right?

    Then use environment variables....

    Just make a Environment variable for each store/build.


    Much love!
     
    Last edited: Oct 17, 2020
    ulissesnascim likes this.