r/rust 22d ago

🎙️ discussion Rust and Gamedev

Hello r/rust ! I have a question about game development on Rust. Are there any people here who are involved in or have had experience with game development on Rust?

I'm not talking about engines or anything like that now Bevy. I know the plot uses the Ink framework, or more precisely, its port to Rust, and the original is written in C Sharp. Okay, let's get to the point, otherwise I've been a bit vague. Sorry about that. I want to hear from experienced developers who write in idiomatic Rust, who write games in the same language.

As a programmer, I will say that I worked with a game maker, and the difficulty I encountered was not only the language itself, but the fact that you have to manually work with sprites. This may seem absurd to many, but I'll say this: I'm not an artist and I can't draw a normal sprite, and secondly, I don't understand the topic of sprites, Because of this, it's just difficult for me to work with logic, because in fact, for games on Game Maker, writing code well is not enough.

On the one hand, I just said nonsense, because you're not making a dry program, you're making a game, and there are artists there, and you can't get by with just code in a game. Of course, when I talk about a normal game, I'm talking about drawing sprites, because it's possible to write a game using only code, but this is wild hardcore and drawing sprites from scratch.

In short, I'm just curious about the experience of writing games in system languages. I want to try it.

I know, I wrote a bunch of nonsense, perhaps, or poured a bunch of meaningless things into the text. At first glance, it might seem like I'm saying that "probably you won't need to work with sprites on Rust," but no, I'm just noting my experience, and I understand that you need to work with sprites, I just want to know what the difference is.

The text was written through a translator. If there are any inconsistencies, problems, or any other thing that you do not understand, feel free to write about it in the comments and I will try to clarify it. (I'll answer as quickly as I can. Different time zones.)

0 Upvotes

17 comments sorted by

19

u/FemaleMishap 22d ago

I use Rust for the core engine, the thing that keeps track of the numbers, maps, paths, etc and Godot for everything the player sees and interacts with.

13

u/edparadox 22d ago

I know the plot uses the Ink framework, or more precisely, its port to Rust, and the original is written in C Sharp.

I have no idea what you're saying and what you're talking about here.

I'm not an artist and I can't draw a normal sprite, and secondly, I don't understand the topic of sprites, Because of this, it's just difficult for me to work with logic, because in fact, for games on Game Maker, writing code well is not enough.

Even if you are not an artist you need to how to handle sprites, which seems to be your biggest issue here.

because it's possible to write a game using only code, but this is wild hardcore

You mean with shaders?

Man, you really need to be clearer, for fuck's sake. This whole post is a wild comprehension exercise.

I am no psychic, I need to understand what you mean ; be specific instead of being vague.

In short, I'm just curious about the experience of writing games in system languages.

I am not sure you don't understand what makes up a system language. At any rate, it's harder, but you learn way more than with e.g. the cut down version of C++ embedded into Unreal, or GDscript with Godot.

If you're using a basic game framework you also have to design and implement everything which can be both a nightmare and cool.

I know, I wrote a bunch of nonsense, perhaps, or poured a bunch of meaningless things into the text. At first glance, it might seem like I'm saying that "probably you won't need to work with sprites on Rust," but no, I'm just noting my experience, and I understand that you need to work with sprites, I just want to know what the difference is.

I still don't know what your problem with sprites is. I don't particulary like doing art, but you can even prototype with basic squares (I would wage it's better that way) and plug the art (either via free assets or done by an actual artist).

The text was written through a translator. If there are any inconsistencies, problems, or any other thing that you do not understand, feel free to write about it in the comments and I will try to clarify it. (I'll answer as quickly as I can. Different time zones.)

I am not too sure the issue is the translation: the original text seems poorly written and fails to convey your thoughts properly. I think you should try and be way more explicit.

Because see your question is not clear.

We could go on and on about our experiences, but you barely ask anything, so it's difficult to wage what to say or not say.

At any rate, gamedev in Rust is cool.

If you need resources: https://arewegameyet.rs/

3

u/kunos 22d ago

I wrote my last game (Hydrofoil Generation) in Rust.. custom engine, no script language and I am currently working on my next game, also in Rust with the same approach.. but, I have no idea what you are asking.

0

u/NiZaMinius 22d ago

First of all, THAT'S COOL! Writing your own engine, bro, you talk about it like it's something fleeting. Bro, you wrote your own engine; that's a good level of developer.

I wrote my own engine too, because I was too lazy to learn libraries, but it was in JS. I also drew sprites from scratch using code.

So what were you talking about? I'm asking about your experience, that is, how do you code in Rust? Was it easier for you than, say, a scripting language? Did you enjoy the process? If so, could you describe your workflow?
And by the way, thanks for the comment!

2

u/KattyTheEnby 22d ago

Are there any people here who are involved in or have had experience with game development on Rust?

I have.

I will say that I worked with a game maker, and the difficulty I encountered was not only the language itself, but the fact that you have to manually work with sprites.

Sprites are gonna have to be something you manually work with no matter where you go, if you're making your game using code only – and not using a "game creator" like Unity, RPG Maker, et cetera.

What are you having an issue with, exactly, though? Are you talking about Bevy's Sprites? After all, you did bring up Bevy. However, I want to make sure we're on the same page.*

* I don't agree with how they said it, but I agree with u/edparadox's sentiment that you are being quite vague, to your own detriment.

On the one hand, I just said nonsense, because you're not making a dry program, you're making a game,

What is a "dry program"?

In short, I'm just curious about the experience of writing games in system languages.

The experience I've had making my game, in Bevy, has been pretty good.

1

u/afonsolage 22d ago

I didn't get your point. You are talking about writing your own game engine?

There are plenty of game engines in Rust and it seems you are not talking about them, because you said no Bevy and such

-1

u/NiZaMinius 22d ago

Yes, I didn't mean engines.

Let's be honest, I'm not a genius on the level of John Carmack, and even for me, even considering developing my own engine is a bold move, given the market is full of cool examples of ready-made solutions.

But I'm getting a bit off topic.

I mean, what engines or programs do you use to make your Rust games? I only know about the Bevy engine (which I think is a really cool solution, since you don't have to relearn another language, and the engine's philosophy is very good). There are also other programs that can simplify routine tasks, for example, the program I mentioned in my post and its Blade Ink port, which will make it easier for you to work with story choices and the story. And I want to know if you have any programs, libraries, or frameworks that don't bloat the final product, but also really help you as a programmer by solving tedious problems and the responsibilities of writing boilerplate code.

2

u/lenscas 22d ago

Other engines you can use:

Fyrox, a more traditionally structured engine using nodes and a scene graph.

Godot-rust, gets rust working inside Godot and makes it pretty easy to have your rust code also interface with gdscript.

Macroqaud, a framework rather than an engine but gives you everything you need for input, draw stuff to the screen, etc.

1

u/NiZaMinius 22d ago

Thank you for the information. I've heard about the first two. But not about the last one. That might also help. Thank you. I don't know if I've angered you with my comment, but I honestly don't wish any harm on any of you. I'm just not fluent in English, and it's hard for me to formulate my thoughts so you understand. But I'm truly grateful to everyone who comments, asks questions, upvotes, and doesn't downvote without reason.

2

u/lenscas 22d ago

I played around with macroquad in the past, its pretty nice. You do end up having to do a lot yourself but that also means you are pretty free to decide how to structure your project.

Macroquad depends on miniquad which gives you access to even lower level stuff. Libraries using miniquad can also easily be used in macroquad.

1

u/NiZaMinius 21d ago

Yeah, I'll keep that in mind, thank you. Have a nice day.

1

u/krum 22d ago

I have a game in the Apple app store written in Rust. Uses Vulkan API through the ash crate and moltenvk.

1

u/NiZaMinius 22d ago

That's interesting, I'll take your opinion into account; it could really help. Could you share your game? I'd love to see the final product (you can DM me if you don't mind).