sanderfrenken / Universal-LPC-Spritesheet-Character-Generator

Character Generator based on Universal-LPC-Spritesheet
https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Generator/
GNU General Public License v3.0
394 stars 151 forks source link

CORS issues #172

Closed meytin1337 closed 2 months ago

meytin1337 commented 3 months ago

Hello, first of all thanks for the project. I had some issues with running the project locally (and the hosted version seems to be buggy as well). Both chromium and firefox threw CORS issues when running the site. I managed to fix the issues in chromium by running it with the --allow-file-access-from-files flag. Perhaps this should be mentioned somewhere in the README? I can't be the only one. I believe this happens for all modern browsers?

sanderfrenken commented 3 months ago

Yes indeed, the CORS issue I think affects all local runs. Not sure how to resolve it either, I usually do the same as you by adding the flag. Alternatively, you can disable loading of the credits.csv in the sources, as the XMLHttpRequest that is done there is what is actually causing the issue AFAIK.

I can add it to the readme, or if you like, you could submit a PR as well :)

meytin1337 commented 3 months ago

Okay I will open a PR. I want to first see if its fixable otherwise I will open a PR to update the README.

meytin1337 commented 3 months ago

Unfortunately the only way to fix the issue would be to use a server to serve the files (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp). By the way, did anyone ever consider rewriting the frontend in a modern framework?

jrconway3 commented 2 months ago

Its certainly possible, but this is more of a passion project that's done casually. As such, Sanderfrenken and others don't like making big changes. The biggest change recently was adding all the new animations which was done by me specifically.

sanderfrenken commented 2 months ago

Have to say that I'm not against big changes. But myself I am very busy with developing a new game, and I use this generator as a tool for generating characters. In game for the players, I developed a new character generator but that is written fully in Swift.

As of this project, I know the code is quite old and not ideally setup. On the other side, it gets the job done, and aside from some quirks here and there (like the CORS issue when running locally) I don't see big reasons to rewrite to some new framework like React or Vue or whatever.

There have been projects started in the past to make a rewrite happen like the most recent one here:

https://github.com/BenCreating/LPC-Spritesheet-Generator

But its quite a job to rebuild all functionality and drop in all assets as supported by the version you are looking at in this repo.

meytin1337 commented 2 months ago

Understandable. Thanks for the answers. I will close this issue now.