cavernos
bevy_webgl2
Our great sponsors
cavernos | bevy_webgl2 | |
---|---|---|
2 | 4 | |
33 | 171 | |
- | - | |
0.0 | 1.8 | |
about 1 year ago | over 2 years ago | |
Rust | Rust | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cavernos
-
Townscaper Running in the Browser
> It's written in JS which means that it's way smaller
There's nothing inherently large about WebAssembly, it's just that most practical wasm demos bundle emscripten (essentially an entire OS's standard library) or another very heavy layer in order to interop between the JS and WASM world.
As a bit of an experiment to see how small wasm could practically be with a minimal interop layer, I built this little project - the web demo is 90KB of JS + 70KB of wasm:
https://github.com/jordwest/cavernos
It was heavily inspired by this article which manages even smaller builds:
http://cliffle.com/blog/bare-metal-wasm/
There's a lot of room for improvement in terms of size optimisation in most projects, but it's still early days and for now most of them just bundle an OS compatibility layer to get things working quickly.
-
Advice for doing a web-playable 7DRL
- Cavernos (https://github.com/jordwest/cavernos)
bevy_webgl2
-
Is there a way to use piston with wasm?
There was a rust game jam in September 2021 and some games are playable in the browser. In that game jam the most used game engine was the bevy game engine. But most of the games made in bevy were not made playable in the browser, the ones that were playable in the browser used a third-party bevy plugin called bevy_webgl2. However now bevy has been updated to version 0.6 that has new built in WASM support, so there seems to be no need for bevy_webgl2. Targeting WASM with bevy might mean that not all features of the engine are available, so you need to limit the game’s features used to the ones that are compatible with WASM.
-
Bevy 0.5
For web assembly there is the unofficial bevy_webgl2 plugin. Official bevy web assembly support would probably use the wgpu webgl backend, which still needs some work, and is currently untested in bevy.
-
Running ML models in a game (and in Wasm!)
Thanks to bevy_webgl2, this is actually very straightforward. I just need to add the plugin WebGL2Plugin and disable the default features of Bevy to only enable the one available on Wasm.
-
Advice for doing a web-playable 7DRL
Bevy has bevy_webgl2, which is supposed to enable a way to compile bevy for wasm and consequently run in a browser.
What are some alternatives?
tai - tai (Terminal Ascii Images) tool to convert images to text written in Rust
wgpu-rs - Rust bindings to wgpu native library
RoguelikeTutorial2020 - r/RoguelikeDev Does The Complete Roguelike Tutorial
bracket-lib - The Roguelike Toolkit (RLTK), implemented for Rust.
scavenger2 - A roguelike
awesome-bevy - A collection of Bevy assets, plugins, learning resources, and apps made by the community
asciiframe - A CLI tool that converts videos to ASCII and displays them to the terminal on the fly
bevy - A refreshingly simple data-driven game engine built in Rust
Rust-HTML-roguelike - Rust WASM + HTML roguelike
tract - Tiny, no-nonsense, self-contained, Tensorflow and ONNX inference
WaveFunctionCollapse - Bitmap & tilemap generation from a single example with the help of ideas from quantum mechanics
bevy_webgl2_app_template