Search Unity

Updating game by considering the current version

Discussion in 'Scripting' started by ErayT, Feb 2, 2018.

  1. ErayT

    ErayT

    Joined:
    Dec 13, 2013
    Posts:
    20
    Guys,

    I am planning to publish an update on my game. It has new features, like achievements. However, there is something I cannot clearly resolve. Those achievements include some requirements that are already accomplished by the current users, at least I assume like that. Therefore, I am planning to write a script which will help me automatically tag them as accomplished. The problem is that such scripts irritate me because they do not look like fundamentals of the game. They are just patches helping the users updating X version to Y version and then once they did, these scripts are just garbage. Unfortunately, this approach requires the scripts to stand forever in the game because I am not sure if there are still users with the version X when I plan to update the game to version Z. This forces me not to remove the script from the update Z. Are there any solutions in your mind?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,728
    Don't worry about little tiny scripts. All the scripts code in your entire project (compiled) probably fits inside a single one of your sprite images. It's not worth worrying about.

    If you just don't want to see the scripts in the future when you are coding, put them in their own C# namespace and then only the area of your game concerned with upgrading old players needs to "using" that namespace. No other scripts will see the updating API identifiers.
     
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    A bit of script OCD :p

    As already mentioned, scripts take up next to no space. I wouldn't worry about it. You're wasting exponentially more space with the build including Unity features you aren't actually using.
     
  4. Xype

    Xype

    Joined:
    Apr 10, 2017
    Posts:
    339
    Yeah, overthinking again too.

    If the achievements can be triggered because of things they already earned, it means that stuff is already tracked or you wouldn't be able to make the "accomplished" adjustments. So all your script needs to do is well, check for the thresholds, just like it will for the new players as they advance. If you kill 100 rats you kill 100 rats nothing new nothing old.