6 ms·
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.
by CyberDildonics 6mo ago
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_out_binary_huge_size_700m/ https://old.reddit.com/r/bevy/comments/16wcixk/cant_figure_o...
- saghm 6mo agoIt'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.
- CyberDildonics 6mo agoIt'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.
- fluffybucktsnek 6mo ago> 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.
- CyberDildonics 6mo agosystem management What does that mean? concurrency Some data structures and databases deal with concurrency.
- nkrisc 6mo agoIn 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.
- fluffybucktsnek 6mo agoExactly this.
- CyberDildonics 6mo agoIt seems like you're calling an entire game engine "ECS". I'm not sure what the point is here, the whole question was what justifies having a 50 MB hello world binary. It doesn't matter what you put into a data structure, the data structure itself shouldn't make 50 MB binaries.
- fluffybucktsnek 6mo agoNo, they aren't calling the entire game engine "ECS". Entity-Component-System is an architecture that Bevy is structured around. As I have previously stated, I wouldn't blame the data structures used behind Bevy just yet, given Rust's tendency for making bloated binaries. What is taking the most space in this 50MB binary? How does it scale with the complexity of the application?
- CyberDildonics 6mo agoEven if you can put a function pointer into a data structure, that's still just a data structure.
- fluffybucktsnek 6mo agoI don't know where you are trying to go with this logic. You still haven't assured that the 50MB is actually related to data structures used behind by bevy, lest you are insunating that the data structures used by bevy are solely responsible for that size, which is not what the post claims.
- alfiedotwtf 6mo agoI 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