Hacker News new | ask | show | jobs
by alfiedotwtf 64 days ago
I hear Rust being slow to compile is their biggest gripe, but really - look at what you’re gaining for the slowdown!

Bevy gives you a very nice ECS to model your app but compilation can be slower than hand crafted code, while not using it gives you tonnes more code and the complexities that come with it, just to compile faster?

3 comments

I don’t know what you mean by, “just to compile faster.” Compiling fast is critical to game development. There’s no formula for fun so you have to iterate extensively.

I also don’t think that other solutions are “tonnes more code.” Any code will explode in size if poorly written. The same is true for bevy.

I swear I have only heard about ECS and people trying to show off how good the ECS is when it comes to Bevy, never about an actual game.
"There are more rust game engines than rust games" - Confucius
"The claim which is made without proof can be dismissed without proof" - Big Brain
What are some notable rust games?
OK, even though it does not seem like that game was very notable, will give you that one game. Rust has at least ~5-6 game engines though, so you will have to come up with 4-5 more.
Here is ten games in bevy engine

https://youtu.be/50g3eSrSM6Q

Rust has like 2-3 game engines and a bunch of bindings.

OK, so I didn't say random games, though. I said notable ones. None of those are notable, and half of them aren't even released yet.
Bevy gives you a very nice ECS

That's a single data structure. People say binaries start at 50 MB for a hello world program and 700 MB for the debug binaries.

https://old.reddit.com/r/bevy/comments/16wcixk/cant_figure_o...

It's a single data structure that contains your entire game though? The whole point of the ECS is that literally everything uses the same data; it's like if you modeled every object in the world with one struct that has an optional field for every piece of data that could exist. I'm not saying that necessarily makes the tradeoff worthwhile, but calling it a "single data structure" is a bit reductive.
It's a single data structure that contains your entire game though?

Are you asking?

but calling it a "single data structure" is a bit reductive.

No it isn't. It's like a tiny database. Depending on how someone implements it, it could use arrays, hash maps and b-trees. There is no universe where this means a binary that does nothing should be 50 megabytes.

> It's like a tiny database.

No it isn't. It also handles system management and concurrency, basically the main loop of your application.

I also would be cautious of assigning the blame of the binary size onto the data structure on its own.

I would say yes it’s like a tiny database but as well as all the other things your added. And I think that’s a good thing, because it does this at the type level!

I’m actually seeing if I can build a parser using bevy_ecs just because the way their state machine works, it looks like it would be fun

system management

What does that mean?

concurrency

Some data structures and databases deal with concurrency.

In this case systems are the S of ECS and contain all your game logic, acting upon the entities and components (E and C).

By system management I assume they mean the APIs bevy offers for scheduling and sequencing systems and events so your game logic remains modularized while still running in the correct order.