itchio / itch.io

:bug: Public itch.io issues tracker and documentation - use support instead for private information!
https://itch.io/support
239 stars 25 forks source link

Updating game doesn't update in app. #403

Closed SkyTech6 closed 8 years ago

SkyTech6 commented 8 years ago

I go to my game's edit game page, delete the old zip, and put in a new one.

Then I go to the Itch app, and it doesn't update the newest version, the only way to do it is completely uninstalling the game and then reinstalling.

Game in Question: https://fishagon.itch.io/stand-your-ground

fasterthanlime commented 8 years ago

Hey @SkyTech6, I just released v15.0.0 of the app, can you upgrade & check if it's still a problem with it? With that version, it should check for game updates:

SkyTech6 commented 8 years ago

@fasterthanlime

Hey Amos! Thanks for the update, it actually fixed a good bit of games that didn't even launch previously.

However as to this problem, it fixed the game not updating but has revealed a new one to me that is pretty unrelated.

I know it's a "developer level" issue, but do you know if launching via your program would interfere with an Operating System check? (Or if you'd like, I could ask in a new issue ticket?)

fasterthanlime commented 8 years ago

do you know if launching via your program would interfere with an Operating System check?

What kind of operating system check are we talking about?

SkyTech6 commented 8 years ago

What kind of operating system check are we talking about?

Hm, well I'm not exactly sure as it's behind Unity's API wall. But if you're familiar it's a call that can be used to check what the user is currently on. Such as this:

if(Application.platform == WindowsPlayer) //do stuff

This works fine on my game alone, but downloading it via the app seems to have completely caused that check to return null.

I'll try looking into how Unity checks platform.

fasterthanlime commented 8 years ago

@SkyTech6 hmm, interesting. I haven't seen any similar reports to this, and the app is basically running an .exe (if your game is an Unity windows export, not an HTML5 exports - that's a different thing, but not what you're talking about right?)

SkyTech6 commented 8 years ago

@fasterthanlime Correct, it's a windows export. However with my update of platform checking I added OS X support as well.

Which the app on OS X did successfully check for platform. (Just tested).

SkyTech6 commented 8 years ago

@fasterthanlime Unity games on Windows do some file placement in the HKCU, your application wouldn't stop and try to put them in a different folder, would it?

fasterthanlime commented 8 years ago

@SkyTech6 nope. All it really does is extract the .zip, launch the .exe. You can open the game's install location (dropdown menu) and launch it yourself

SkyTech6 commented 8 years ago

@fasterthanlime I may have spoke too soon. I thought since your application had their own install location, that the playerprefs would be different between the application version of the game and my testing one.

However, strangely, they shared PlayerPrefs and my other game's settings were affecting this one. Completely bypassing the platform check.

All is good. Sorry for wasting your time with this.

fasterthanlime commented 8 years ago

@SkyTech6 ah yes, preferences are probably stored under %AppData%.

I assume it's safe to close this issue now?

SkyTech6 commented 8 years ago

@fasterthanlime actually, they are strangely stored in the registry. So to delete them you'd have to open regedit, so every build I have to go in that high risk section of the file hierarchy to delete the file.

Yep. Safe to close.

fasterthanlime commented 8 years ago

actually, they are strangely stored in the registry.

Is that a default Unity feature or a plug-in ? I've been thinking about providing a canonical place to store preferences so that they could be cloud sync'd

SkyTech6 commented 8 years ago

@fasterthanlime It's the default for Unity games on Windows. Also I don't think it's something that Unity developers can change.

Here's where they save playerprefs (and other things like your resolution settings and whatnot) for each platform including web-based.

http://docs.unity3d.com/ScriptReference/PlayerPrefs.html

TangentFoxy commented 8 years ago

a canonical place to store preferences

What kind of preferences?

Deozaan commented 8 years ago

@SkyTech6 You can easily erase all PlayerPrefs with PlayerPrefs.DeleteAll()

But PlayerPrefs isn't how/where you should be writing important save data. It's OK for unimportant things (such as resolution, fullscreen/windowed, etc.) which can easily be configured again if they're lost. But save data definitely needs to go somewhere the player can find it and make backups if necessary. Such as Application.persistentDataPath