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

Running locally currently doesn't work, web version behaves inconsistently #1

Open
Doc-4 opened this issue Nov 5, 2023 · 6 comments

Comments

@Doc-4
Copy link

Doc-4 commented Nov 5, 2023

Following the instructions to run this locally, you get this right after the first page:
image
I tested this in both firefox and chromium, identical results.

The online web version also currently misbehaves when running in firefox or chromium on desktop as well, taking very long to load in sprites or not loading them at all, and music and SE don't play. Oddly, this works fine on my phone running a chromium fork and I'm not entirely sure what the cause for the difference is. I tried disabling extensions and other relevant things and didn't see a change.

@requinDr
Copy link
Owner

requinDr commented Nov 5, 2023

For now you can replace tsukiweb by tsukidev in vite.config.ts to run the code yourself.
When you say the "online version", are you talking about tsukiweb or tsukidev? Because both are not working the same way with assets

@Doc-4
Copy link
Author

Doc-4 commented Nov 5, 2023

It was web. I think I tested dev briefly with the same results on desktop but not as thoroughly

@Doc-4
Copy link
Author

Doc-4 commented Nov 8, 2023

Gave this a look, editing that file didn't do much but it does happen to work better now. The terminal log and some testing shows me that the cause for both issues is that since the old repo, the code loads and caches assets from a remote folder rather than the cloned repo, which explains the behavior in the browser too (trying to read the code myself or perhaps noticing that the new repo is much smaller would have been a smarter idea).

I understand the need for this, the old way hosted as a public repo might have attracted the wrong kind of attention, but in the interest of not concerning myself with caching all assets manually beforehand if I replay the game in the future on my steam deck (as this is clearly the best way to play the original game), is there a way to say, instruct the server to cache all remote assets on first run or use local ones?

@loicfrance
Copy link
Collaborator

I don't know if there is a way to tell the server to cache remote assets.
On the client side, the localStorage API we rely on to store savestates only allows up to 5MiB of storage, which is not enough to store all the graphic assets, sounds and scenes files.
We do have an item in the roadmap about syncing with user files. I have to look into it, there will be some limitations due to the web-app nature of this project, but storing assets locally on the client device may be a solution.

@loicfrance
Copy link
Collaborator

I was investigating the File System Access API to do the file syncing, but it appears that its implementation is very limited at the moment (https://developer.mozilla.org/en-US/docs/Web/API/Window/showOpenFilePicker#browser_compatibility), and I can't find an alternative that would suit our needs.
We are looking for some solution that would allow users to sync their saves between mobile and PC (without any backend on the website to support it), and this API is not implemented on chrome for android yet.
I might go back to it and look for a solution in a few weeks/months, after finishing other functionalities.

@Doc-4
Copy link
Author

Doc-4 commented Nov 12, 2023

Fair enough, this won't be the last time that stuff like this made it difficult for me or somebody else to get web apps to work a certain way. If I were anywhere near proficient enough, I would try to help

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