Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

saves being lost on itch.io embedded games with firefox / win 10 #436

Closed
increpare opened this issue Mar 28, 2018 · 6 comments
Closed

saves being lost on itch.io embedded games with firefox / win 10 #436

increpare opened this issue Mar 28, 2018 · 6 comments

Comments

@increpare
Copy link
Owner

https://twitter.com/ElectronDance/status/978981399888834562

@leafo
Copy link

leafo commented Mar 28, 2018

there are two ways to upload html games:

  1. upload directly single HTML file
  2. upload an index.html file in a zip file

For the first method, we generate a signed URL that expires. This means that each time the game is played a new URL is used to serve the file. The path component of the file does not change though, only the query parameters.

Example page: https://le-american.itch.io/lil-onion-detective
Example embed url: https://talk.itch.zone/?expires=1522267493&id=739762&sig=3Rf9KeX5cQe4CuNDFScr1lLEvTc%3D (note this url is expired by now, so it will go back to the game page)

For the second method, we extract the zip to a new directory on our CDN, and a direct URL is used. These URLs are not protected in any way.

Example page: https://candle.itch.io/no-destination
Example embed url: https://v6p9d9t4.ssl.hwcdn.net/html/606588/index.html


Both approaches have a domain that doesn't change, but I see that in the first method the same path is used for all games: /. The second approach uses a different path for each game's upload: /html/606588/index.html

I'm not familiar with how you're doing storage, but domains can have the same namespace for cookies/local storage. If you aren't prefixing the storage keys with an identifier then the game's data will conflict with other games.

It makes the most sense to use the path of the file as the key for the storage. The problem is that the talk.itch.zone urls all use the same path for every game! I think that we need to change this, and that could be the reason why saves aren't working?

@starry-abyss
Copy link

The progress is not saved for me on Newgrounds either: https://www.newgrounds.com/portal/view/710943

@leafo
Copy link

leafo commented May 11, 2018

I've replaced how we handle single file .html games so that they work like games extracted from zip files. Each upload gets its own dedicated path, it should prevent collision of save data if it depends on the path.

Also, I added better autodetection of puzzlescript games, so you can find stuff to test easily :) https://itch.io/games/made-with-puzzlescript

@increpare
Copy link
Owner Author

increpare commented May 11, 2018 via email

@increpare
Copy link
Owner Author

Gonna close this issue. I think it's ok to have the save be url-dependent.

@increpare
Copy link
Owner Author

(if there's some other solution though that's not too site-specific, lemme know...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants