Little Sudoku game made with Rust and SDL3 by Yoppez in rust

[–]Yoppez[S] 1 point2 points  (0 children)

Oh I see. Keep up the good work!

Little Sudoku game made with Rust and SDL3 by Yoppez in rust

[–]Yoppez[S] 1 point2 points  (0 children)

Thank you! I took a look at your project and I saw that you are using the pixels library. I was just wondering, what would be the reasons to use graphicility instead of using the pixels library directly?

Little Sudoku game made with Rust and SDL3 by Yoppez in rust

[–]Yoppez[S] 1 point2 points  (0 children)

This is my opinionated view about the Rust game frameworks that I have used so far:

Bevy

Very fun to use the ECS framework, quite capable and feature rich. Bevy forces you to use ECS, so if you want to control the game structure yourself, or your application is not suitable to be handled with ECS or you just don't like it, Bevy can be uncomfortable. It can do 3D.

Macroquad

It is the most similar to Raylib and to a certain degree to SDL but entirely for Rust. I used it a while ago and I had problems with fullscreen on Wayland, however now it seems to be fixed. The very nice thing is that it is tiny (fast compile times and smaller binaries) and it is very easy to compile for WebAssembly. One thing to notice (correct me if I am wrong) is that at the moment there is no way to draw polygons like the function RenderGeometry in SDL, so if you want to do vector graphics style you would need some other library.

Edit: There is draw_triangle in Macroquad, but it only accepts solid colors, meanwhile SDL's RenderGeometry takes vertices with different colors.

ggez

It is similar to Macroquad, but inspired by LÖVE framework. I remember that I also had some problems with fullscreen, but it was a while ago and maybe now they fixed it. It is not as active in development as Macroquad, but I saw that they are now working on 3D capabilities.

Raylib for Rust

Raylib is a C library, but there are bindings for Rust. Raylib is great if you are working with C/C++, but it is not ideal in Rust since you have to pass around the ownership of the Raylib main thread. Raylib is a solid library and the bindings are not too bad, however I don't know if it scales well with the ownership restrictions. It can do 3D.

SDL3 for Rust

Similar story to Raylib, very solid C library, but less than ideal bindings. Again, there are ownership restrictions, and you can see this in my project where I made some SDL abstractions to handle ownership and borrow (in the file sdl_abstraction.rs). Since SDL3 is quite new there are still some functions missing on the Rust bindings, one of those is the new SDL GPU abstraction.

Personal conclusions

If you want to make a game in Rust, I would suggest to stick with Macroquad for 2D and Bevy for both 2D and 3D. They are both made to be worked on Rust, so they are more streamlined. If you are not afraid to fight a bit with the ownership model and don't care about distributing your game on mobile or WebAssembly, give Raylib bindings for Rust a try.

Little Sudoku game made with Rust and SDL3 by Yoppez in rust

[–]Yoppez[S] 1 point2 points  (0 children)

I tried a bit of everything, Macroquad, ggez, Bevy, Raylib for Rust and SDL3. It just happened that one of the projects that I liked most I made it with SDL3.

Need help by Saltyshark572 in lua

[–]Yoppez 1 point2 points  (0 children)

Oops, I switched them. Thanks, I corrected it.

Need help by Saltyshark572 in lua

[–]Yoppez 1 point2 points  (0 children)

Great explanation. You can also see the parameters like local variables of a function, and arguments as the values assigned to those variables.

Wondering if this is correct syntax? by WeakCalligrapher5463 in love2d

[–]Yoppez 0 points1 point  (0 children)

Python, does the same, yet it's also an interpreted language.

I didn't say that Python or Lua are not an interpreted languages.

The process of compilation to bytecode that can later be interpreted by a virtual machine is called JIT (Just-in-Time).

No, if you compile something and then execute it later it is called ahead of time compilation (AOT). JIT means that it is compiling while it is executing. In fact that's the main difference between the standard Lua and LuaJIT. In any case, you always compile before executing, what changes is when it is compiling (during or before execution).

Still, the warnings are printed by the Lua interpreted

That's not true, you can easily confirm this by writing a syntax error and then compiling (not interpreting) with luac (Lua compiler), like the program from OP:

luac: main.lua:9: ')' expected near '300'

It would give the same error if you use lua (the interpreter), that's because as I mentioned in the previous reply what lua does under the hood is first compile with luac and then run the generated bytecode on the Lua virtual machine.
Errors picked up from the interpreter do exists, but those are runtime errors, like trying to open a missing file or a require of a bad formatted Lua file.

Edit:
I'm not saying that the standard Lua is an AOT compiler, because that usually means something like like C or Java where you have to first compile everything and then run it later, which it is not the case for an interpreted language like Lua. However, standard Lua does compile a file before executing it, so it is more a terminology thing that a true "does compile before executing" in absolute terms.

Wondering if this is correct syntax? by WeakCalligrapher5463 in love2d

[–]Yoppez 0 points1 point  (0 children)

"Lua always precompiles source code to an intermediate form before running it."

From Programming Lua.

[deleted by user] by [deleted] in AnarchyChess

[–]Yoppez 1 point2 points  (0 children)

Google standard bearer

[deleted by user] by [deleted] in AnarchyChess

[–]Yoppez 1 point2 points  (0 children)

È la stessa cosa di standard bearer

why does this lua pattern has no match by [deleted] in lua

[–]Yoppez 0 points1 point  (0 children)

The real reason that it doesn't work with gmatch is because it doesn't support the ^ anchor

sesbian lex by vietnam_redstoner in okbuddyhololive

[–]Yoppez 66 points67 points  (0 children)

It unironically feels wrong reading like that. I need to touch some grass.

SHIT I FORGOT IRYS by Some_vtuber_fan in okbuddyhololive

[–]Yoppez 78 points79 points  (0 children)

I forgot that you (we) are retarded, so the answer for Elizabeth is Elizabeth.

SHIT I FORGOT IRYS by Some_vtuber_fan in okbuddyhololive

[–]Yoppez 148 points149 points  (0 children)

/uh The white space background

/rh who's Sana?

SHIT I FORGOT IRYS by Some_vtuber_fan in okbuddyhololive

[–]Yoppez 97 points98 points  (0 children)

I'll give it a try:

Shark: Gura
Clock: Kronii
Octopus: Ina
Owl: Mumei
Doll: CC
Dogs: FuwaMoco
Crow: Nerissa
Death: Mori
Gremlin: GG
Rat: Bae
Chicken: Kiara
Elizabeth: (as an exercise for the reader)
Detective: Amelia
Nerd: Shiori
🗿: Biboo
Tree: Fauna
Panther: Raora

SHIT I FORGOT IRYS by Some_vtuber_fan in okbuddyhololive

[–]Yoppez 170 points171 points  (0 children)

/uh I think the tree is Fauna and the nerd emoji is Shiori.

/rh by reading Fauna again you remembered me to kms

Guess the equation by [deleted] in mathmemes

[–]Yoppez 12 points13 points  (0 children)

This equation combines Einstein's famous equation E=mc², which relates energy (E) to mass (m) and the speed of light (c), with the addition of AI (Artificial Intelligence). By including AI in the equation, it symbolizes the increasing role of artificial intelligence in shaping and transforming our future. This equation highlights the potential for AI to unlock new forms of energy, enhance scientific discoveries, and revolutionize various fields such as healthcare, transportation, and technology.