4 ms·
Hi! I am the guy who did this port. I am very sorry for long download times, but the HN/Twitter buzz was unexpected and the host server - a cheap shared hosting
by Gab_CV 8y ago
Hi!
I am the guy who did this port. I am very sorry for long download times, but the HN/Twitter buzz was unexpected and the host server - a cheap shared hosting I barely use just for testing purposes - is currently crying very hard. Oops...
Also, download code is dumb for now, it is downloading one big full .pk4 file (400MB) for each visitor loading the app. I know, it should be better to only preload necessary assets for sure! Smart streaming of game data is one necessary step for apps on the web.
- anderspitman 8y agoHave you considered webtorrent or IPFS for distributing the file? Webtorrent in particular looks very easy to setup, and then the most your server would ever have to handle is the equivalent of a single downloader.
- Gab_CV 8y agoI think it would be better to stream only needed data, using some lazy load mechanism. Still need to figure out what is the best approach
- anderspitman 8y agoThat's definitely the more permanent solution for games like this. I was thinking more along the lines of quickly solving the immediate problem so you don't have to spend more money on a different server. I wouldn't be surprised if you could replace the download with a webtorrent in less than an hour of work and be done with it.
- quasarj 8y agoExcellent job! I wanted to run the native copy for comparison, but it turns out you added support for the demo files yourself! Gah!
- miguelmota 8y agoI wonder if you could utilize IPFS as a distributed CDN for p2p file downloading to take some load off the server (assuming the .pk4 is static and stateless)
- microcolonel 8y agoSwapping the pakfile for a WebTorrent (or maybe a couple of them) wouldn't be crazy, but I guess there would still be some trouble in keeping that from holding things up.
- nikkwong 8y agoWhat would you guess you could get the bundle size down to if you were to preload only the required assets? I think a lot of us are curious as to how load-time performant webassembly games like this could eventually become.