TruncateGame / Truncate

67 stars 5 forks source link

JavaScript client and code contributions #273

Closed alberteddu closed 4 months ago

alberteddu commented 4 months ago

Hello β€” first of all thanks for this game, I love it! I was looking around in the issues but haven't found any information about the JavaScript client.

To be more specific: is the plan to keep the client in the HTML file that it is in now? Or you are considering having a more adhoc solution (perhaps using a library such as React)?

And, slightly related topic, I was curious if you would be interested in textures and sprites drawn specifically for the game.

In general, are you accepting PRs from external contributors? I did find the contributors guidelines, but I'm still unsure whether that's to be considered internal to the core maintainers.

Thanks again for sharing this with us.

Cheers, Alberto

bglw commented 4 months ago

πŸ‘‹ hey @alberteddu :)

thanks for this game, I love it!

Amazing! Thanks for letting me know :)

is the plan to keep the client in the HTML file that it is in now? Or you are considering having a more adhoc solution (perhaps using a library such as React)?

Very little of the client is in HTML β€”Β once you're past the initial memory everything is rendered into a canvas using Rust. No plans to change after the menu since we also use the client as a native desktop application.

The main menu itself is tiny, so no plans to move it out of the current file. Part of the goal is the HTML menu can render instantly on load while the main game WASM / bindings are loading, so we get to skip having any sort of loading bar/spinner. Adding React + DOM alone would double the initial page load.

I'd be open to implementing the menu in something compiled like Svelte or Solid if we wind up needing it, but for now I'm happy with the simplicity. We try to implement most things on the Rust side of the fence, so that we can reuse them outside of the browser.

I was curious if you would be interested in textures and sprites drawn specifically for the game. In general, are you accepting PRs from external contributors?

We would! And we are! I can update our contributing file to make that clear. As long as people are happy contributing under the current license(s) (which I need to add to the repo now that I look at it) then we're open to contributions :) It'll be MIT for code, and CC-BY for assets.

Important caveat: we won't guarantee accepting any given contribution, especially if it touches the core game. Opening an issue with anything proposed would be a good idea to make sure it's in the right ballpark πŸ™‚

alberteddu commented 4 months ago

Thanks for the clarification @bglw! I have misjudged the amount of actual game existing in the client (almost none). In this case I tend to agree with your goal.

I really like the game so will be following its development closely. Maybe I can get to make some assets if time allows. When that happens I will open an early issue to make sure the direction aligns with your vision.

Cheers!

bglw commented 4 months ago

Grand! Hope to hear from you in the future 😊