Is there a Rust equivalent? The SDL crates are all mismatched (ttf, image and so on only work with very old versions of SDL) not to mention they haven't been updated in a long time.
What's the best Rust library to render shit to the screen?
UFOs Are A Psyop Shirt $21.68 |
The Rust SDL crates are all shit
When they were first written they had badly broken designs, and then they rushed to paper over the design flaws with a "fix" that forces you to thread lifetimes through every single function call and to arrange things on your call stack in a particular order
If you just want to shit pixels everywhere, use ggez or something
If you need more serious window management for something that isn't a toy example, consider winit or one of the alternatives I can't remember the names of
I was quite surprised to find out how inexplicably moronic and convoluted the provided samples for the SDL crates were. SDL is one of the most popular libraries ever, they really need to get their shit together.
I think there are other crates that use SDL as a backend without going through the popular/broken SDL crates, but I've forgotten what they were
>how inexplicably moronic and convoluted the provided samples for the SDL crates were
Most "rewrite it in Rust" or Rust wrapper crates are terrible. A lot of half-assed attempts that only cover the use cases that the crate author cares about.
>not to mention they haven't been updated in a long time.
And then the half-assed attempts go unmaintained, a shit ecosystem to be honest.
Halfassed abandoned projects are just the norm for open source no matter what language they're in
If you want something that's actually well maintained, buy a gun
>Most "rewrite it in Rust" or Rust wrapper crates are terrible.
I've noticed this. For every 1 crate that works flawlessly there's like 15 abandoned or utterly useless shit
>SDL is one of the most popular libraries ever, they really need to get their shit together.
C library maintainers are extremely elitist and only care about their stuff working in C.
They leave the bindings to be maintained by third parties that are usually some Indian guy making a bloated binding so he can stuff something impressive in his resume.
> rust troony has mental breakdown
> proceeds to just lie about everything
every single thread: disingenuous replies full of cope from nocoder rust trannies. every single fricking time.
>Wow... so this is the power of rust...
rust trannies are subhuman species that literally demand everyone make their lives easier so they don't have to write a single line of code themselves. they truly believe that bullying people and crying on basketweaving forums and reddit is how to get people to use rust. this is how they end up with such garbage solutions - and the best part: the rust trannies don't have the programming skills to fix it.
You can:
>Make or use bindings for SDL (will probably be shit)
>Make or use bindings for Raylib (will probably be shit)
>Make or use bindings for OpenGL (will probably be shit)
>Use bevy (it is shit)
>Use C (obvious option)
What are you gonna do?
>Make or use bindings for SDL (will probably be shit)
Wouldn't it that just entail wrapping C style calls in unsafe rust code? I might as well give it a try.
If SDL doesn't work on in Rust then what's the alternative? There has to be at least one single renderer worth using, right?
Rust is a terrible language for gamedev. I experimented with it and spent so much time trying to satisfy the borrow checker. It's impossible to use graphics APIs without unsafe blocks. Slowly you begin writing more and more unsafe code. Then you just ask yourself why bother and go back to C/C++.
I just got a triangle program yesterday using rust+winit+wgpu and I did not use any unsafe block. However I had to shadow variables just to please the borrow checker and it felt nasty, also I had to move it all into a async function just to work.
I'm gonna redo it today with C++ webgpu just to see if it's cleaner to implement a basic triangle window.
Your libraries used unsafe blocks and if you're perf-oriented C-style programmer you end up dipping into the rustonomicon constantly.
Everything in Rust is forced to be RAII'd to hell to ensure safety. Tons of duplicated initializations because we can't have uninitialized memory ever.
why are you using async in graphics related work instead of threads?
That's what all the wgpu examples uses and the tutorial IIRC.
Yeah that's true
Various webgpu functions are async.
Pick your poison.
https://arewegameyet.rs/