EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
968 stars 183 forks source link

Web Player: Support games in ZIP archives #2868

Open Ghabry opened 1 year ago

Ghabry commented 1 year ago

This was already researched and looks feasible: https://rhardih.io/2021/04/listing-the-contents-of-a-remote-zip-archive-without-downloading-the-entire-file/

The idea is using HTTP range requests. The emscripten fetch API can use them.

Basic implementation: The central directory is at the end of the file. This means you can download the last kilobytes of a file to get the central directory.

Now you know where all bytes are stored inside the ZIP. When a certain file is requested download the range inside the ZIP.

This partial ZIP can be processed by our ZipFilesystem implementation.

Sounds like a fun side project. E.g. for the ynoproject devs because the are whining that keeping the index.json up to date is soooo much work. :P

carstene1ns commented 1 year ago

because the are whining that keeping the index.json up to date is soooo much work. :P

Too easy to automate this in a cron job every minute, check modification time and regenerate. 🙄