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

Better File Management and WebAssembly Support Proposal #11

Open
Staninna opened this issue Dec 6, 2023 · 6 comments
Open

Better File Management and WebAssembly Support Proposal #11

Staninna opened this issue Dec 6, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@Staninna
Copy link
Contributor

Staninna commented Dec 6, 2023

I'm making a game for narrrowblast. It has now 50 pictures and a JavaScript file that's 1.4 MB. The platform restricts uploads to a single HTML file, which poses a challenge due to the result being an enormous file when encoding all JavaScript and images into the HTML.

To improve this, I propose that users are allowed to upload a .zip file containing all files for a slide. This would improve user experience by reducing file size and enhancing file management.

Additionally, I'm interested in using Rust for optimizing heavy tasks within my game. But for that I need support for WebAssembly

@luttje
Copy link
Member

luttje commented Dec 7, 2023

I'm down for supporting zip uploads with multiple files.

WebAssembly I'm not too sure about. I'd like it if we could keep user content sandboxed and with WA I'm not sure we can at all.

Besides, what is so heavy that you need WA? Plain JS should be sufficient for most use cases imo.

@luttje luttje added the enhancement New feature or request label Dec 7, 2023
@Staninna
Copy link
Contributor Author

Staninna commented Dec 7, 2023

There are 3 main reasons I want to use WASM/Rust:

  1. An AI/ML for players to play against in a single player mode or maybe doubles haven't figured that out (The heavy part)
  2. I want to learn more about WASM and what it can/can't do
  3. I already made a game similar to this one 1,5 years ago, and I could use that as a base instead of working my way up again

As for whether WASM can be sandboxed like JS within an iframe, I'm uncertain. However, all entry points for the WASM must be invoked from JS. As far as I know

@Staninna
Copy link
Contributor Author

Staninna commented Dec 7, 2023

Plus it grands me access to the large ecosystem within rust or said other language

@luttje
Copy link
Member

luttje commented Dec 7, 2023

Thanks for elaborating, very cool project you've got there!

I guess we can eventually consider supporting WASM, but can you perhaps first make a more minimal prototype with just JS? That way other students can also learn from your code, without it being too complex right away. We really need more examples of the invite system, if we want to get more students on board in creating cool stuff with this.

@Staninna
Copy link
Contributor Author

Staninna commented Dec 7, 2023

I could stall this project for a bit and create some good documented examples like a "Boter kaas en eieren" and other smaller games/quizzes because this project will be either way deep and complicated with the whole Pokémon battle logic/system embedded into it

@luttje
Copy link
Member

luttje commented Dec 8, 2023

That sounds like a good idea. Especially because that lowers the complexity for fine-tuning and improving the invite system

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

No branches or pull requests

2 participants