Live data from Hacker News

Show HN: Creating a Snake game clone with Rust/Bevy

bbarrows.com

11–13 of 13 posts

Re: Show HN: Creating a Snake game clone with Rust/Bevy

#11
post #6

Mobile browsers do support wasm, but the game doesn't offer controls for mobile users who aren't using a keyboard. Taking 100.6 KB (16.46 KB compressed) of javascript and 37.41 MB (8.15 MB compressed) for snake is quite a lot compared to what it would take for normal javascript.

WASM is kind of coming full circle back around to when browsers used to support running Java Applets, or flash, or even ActiveX, however, this time, WASM is safe and is built into the browser. Figma has been the one platform to take full advantage of it in really jaw-dropping ways that proved you could write real creative professional productive software only in the frame of a Chrome window. It's just that WASM is no…

What are more uses that WASM (or any theoretical technology, really) could have for a web browser? Do you mean scripting to customize the browser itself?

Re: Show HN: Creating a Snake game clone with Rust/Bevy

#12

Mobile browsers do support wasm, but the game doesn't offer controls for mobile users who aren't using a keyboard. Taking 100.6 KB (16.46 KB compressed) of javascript and 37.41 MB (8.15 MB compressed) for snake is quite a lot compared to what it would take for normal javascript.

Bevy has a lot of features enabled by default that add to the size. You can get bevy-snake down to 12 MB (3.2 MB gzipped, 1.9 MB brotli'd) if you only enable rendering and sprites, and strip the function names section.

It's still a little bigger than I would like, but it's not terrible.

Re: Show HN: Creating a Snake game clone with Rust/Bevy

#13
post #12

Mobile browsers do support wasm, but the game doesn't offer controls for mobile users who aren't using a keyboard. Taking 100.6 KB (16.46 KB compressed) of javascript and 37.41 MB (8.15 MB compressed) for snake is quite a lot compared to what it would take for normal javascript.

Bevy has a lot of features enabled by default that add to the size. You can get bevy-snake down to 12 MB (3.2 MB gzipped, 1.9 MB brotli'd) if you only enable rendering and sprites, and strip the function names section. It's still a little bigger than I would like, but it's not terrible.

It's a really barebones snake game that should take less than 12 kb. Anyway I get that it's more of a proof of concept for Bevy.
Post reply on HN