4 ms·
For Rust, there's the very similar https://github.com/parasyte/pixels https://github.com/parasyte/pixels. Unlike MiniFB, it doesn't handle windowing for you (yo
by jms55 6y ago
For Rust, there's the very similar https://github.com/parasyte/pixels https://github.com/parasyte/pixels. Unlike MiniFB, it doesn't handle windowing for you (you use winit/sdl2/glfw).
It's built over wgpu-rs, so it runs on Vulkan/Metal/DirectX12/WEBGPU. You can compile to wasm, and then run your game in the browser, which is neat. And you can add custom shaders on top.
I used it for my game, and was very happy with it https://github.com/JMS55/sandbox https://github.com/JMS55/sandbox
- ChickeNES 6y agoThere's already a version of minifb for Rust though: https://github.com/emoon/rust_minifb https://github.com/emoon/rust_minifb
- jms55 6y agoYes, that's also an option. I tried that initially for my game, but I ended up liking pixels better, in part due to the WASM and shader support.
- qchris 6y agoI've used this library on a few occasions on personal projects, and once the necessary system deps are installed (just a few apt-get commands that are well-documented), it's worked pretty flawlessly. Fairly low boilerplate, good examples--I haven't had any regrets on deciding to use it.
- fulafel 6y agoDo you mean it will run on browsers when/if they enable webgpu, or does wgpu-rs have other browser compatible backends?
- icebraining 6y agoThere's early support for an OpenGL backend, which can then run on WebGL.
- jms55 6y agoIt will run on (stable) browsers when the WEBGPU spec gets finished (it's in nightly for firefox/chrome right now).