Skip to content
0:00 / 0:00

#borrowchecker#ecs#entitycomponentsystem

Rant: Entity systems and the Rust borrow checker ... or something.

Jonathan Blow

99K subscribers • 11 videos on Hallway

YouTube
  • Recommended by 3 people: 3 on Hacker News.
  • A classic. People kept recommending it from 2020 to 2024.
  • Presented by Jonathan Blow, game designer and programmer
  • May be out of date. Uploaded 8 years ago, in an area where tools change fast.
  • An opinion. It argues one side of a question engineers disagree on.

Advanced. Deep dive for people who know the field.

303K views8 years ago3 recommendations

Programming languagesGame developmentRustGame programmingUnity, Unreal and Godot

Jonathan Blow argues that index-based entity component systems in Rust act as manual memory management that bypasses the borrow checker.

Commentary on the closing keynote from RustConf 2018, which you can view here: youtube.com/watch?v=aKLntZcp27M

Why it's here

3 people recommend this

What people say. Recommended as a detailed critique of the friction Rust's borrow checker introduces in game development and entity component systems.

gravypodon Hacker News • Recommends

On “Jonathan Blow on Rust”

Pointers living through a render pass aren't the main use case he is interested in. It's a problem space that many engineers are familiar with so it's easy to talk about. Game developers have some very domain-specific problems that are less common outside of game engines. A more detailed description of his opinions are laid out here where he goes into much more detail about his experiences porting The Witness to mobile (I think): link to this video

hertzraton Hacker News • Recommends

On “Unreal Rust”

These discussions always remind me of some talks by Jonathan blow where he argues rust doesn’t solve the hard problems he needed it to. There are podcast episodes with better discussions, but the main one people link to seems to be this I haven’t used rust, but I sympathize with his problems with pointers and learned a lot from the various ways people try to solve them link to this video

colundon Hacker News • Recommends

On “Leaving Rust gamedev after 3 years”

I find that Jonathan Blow ranting about Rust game development here link to this video . He adds interesting perspectives to the discussio, how the language makes the Rust game developer resort to arrays and their so called Rust point of views.

u/Swagut123in r/gameenginedevs • Mentions

Question about entity systems So I have recently rewatched an old Jon Blow video that I remember seeing before I started my gamedev journey, and I remember not understanding any of it. The video I am talking about is his rant about Rust. I have been working on my engine and game for about 2 years since, and now I actually have alot more context to understand the video. However, there is one thing that still confuses me: Jon describes how the witness uses an integer pointer for its entity ID, which how I had my entities set up in my previous game. This seems fine, because I was writing a puzzle game, so at the start of each level I had a memory arena that would store the scene-specific l…

u/N-R-Kin r/C_Programming • Mentions

On “Ownership Pattern”

> The idea of a safe structure is to avoid segmentation failures and double frees, through an ownership control, where even if everyone tries to delete the object, only the current owner can If the code is structured so poorly that "everyone" is trying to delete an object that they shouldn't - then you've already lost. Adding some over-engineered solution on top of that is just fixing the *symptoms* of the problem, not the root cause. In my experience, if you have two objects that are dependent on each other then about 80%+ of the time, what that means is that they should share the same lifetime. I.e they should be managed in group rather than individually. And even in cases where you h…

kbwton Hacker News • Mentions

On “You can’t “turn off the borrow checker” in Rust”

I thought this was going to be a response to Jonathan Blow's video about how doing your own memory management is effectively turning off the borrow checker: link to this video The takeaway being that the borrow checker doesn't magically prevent the use-after-free class of bugs. Although you will never experience a segmentation fault in safe Rust, the bug is still there and your program keeps running in an invalid state. The symptoms are changed, but no less dangerous. To make the problem even more obvious, think of allocating a large array to be used as a heap and handing out indices to implement your own malloc. You have bounds checking to prevent indexing outside the bounds of the heap, but it doesn'…

wokwokwokon Hacker News • Mentions

On “Rust has a static “garbage collector””

…but, it's questionable if you're better or worse off in terms of correctness of application logic when you use it. ...you're probably better off using the borrow checker (that's why it exists) or an abstraction in a crate to deal with this sort of problem, regardless of whatever implementation strategy it uses internally (unsafe, this, etc). 1 - link to this video…

platzon Hacker News • Mentions

On “Entity–component–system (ECS) back and forth”

And the response by Jonathan blow link to this video One of his points is that you still have to solve synchronization for allocations and deletions from the arrays.

_pmf_on Hacker News • Mentions

On “Jonathan Blow on Rust”

Jon Blow addresses this in some earlier rant here: link to this video His point being that now you're effectively implementing a form of manual memory management to circumvent the borrow checker.

hectorlorenzoon Hacker News • Mentions

On “Are we game yet? – A guide to the Rust game development ecosystem”

I just recently came across these two videos. Using Rust For Game Development by Catherine West: link Counter-rant from Jonathan Blow: link to this video

modernerdon Hacker News • Mentions

On “Hands-On Rust: Effective Learning Through 2D Game Development and Play”

…ain't gonna need it”. I don't think “concrete implementations” would do all that much to strengthen his argument that unnecessary complexity gets in the way of shipping for indie devs: > Even 10% friction more than I ever had would have killed me. I wouldn't have been able to make the things I had. Even 5% more friction would have been really bad. link to this video And… > I have, several times, built games where I barely managed to finish. … I've just experienced that too many times to increase friction. I need to decrease friction. link to this video And again, in relation to entities rather than Rust's borrow checker: > If you are trying to focus on the way your entities are set up, you are mis-directing your…

arkushon Hacker News • Mentions

On “The Rust compiler has gotten faster again”

The hvasilev's comment got flagged and I could not reply to it anymore, so I'll reply here (sorry) and copy-paste the hvasilev's comment verbatim below, for the sake of commenting on it's claims: --- Reality is not on the side of this language. 11 year old, has a very low adoption with virtually no jobs associated. ( link ) On the other hand if you search for "Rust" in the latest "Who wants to be hired?" thread, you will see it is quite popular with unemployed people. The reality is that the language has a lot of friction, the ergonomics are bad, the syntax is heavy and some poor decision making has been made there for a systems-level programming language. There are a lot of ideological tr…

anonymoushnon Hacker News • Mentions

On “How safe is Zig?”

Right, it sounds like you are circumventing the borrow checker and then experiencing some of the classes of bugs it was supposed to prevent. And this seems common: link to this video

zengidon Hacker News • Mentions

On “I built a garbage collector for a language that doesn't need one”

…ics, Dave argues that we should be decoupling object graphs from access to objects 1. That's right folks, using `usize` indexes into collections, or adjacency lists, isn't just a hack to get around the borrow checker as people like Jonathan Blow have famously critiqued 2, it may just be the right way of doing things . 0 link 1 link 2 link to this video…

pengaruon Hacker News • Mentions

On “Show HN: A minimal working Rust / SDL2 / WASM browser game”

…sions. Blow actually responded to the keynote you linked 0. What's still unclear to me is what's the advantage that Rust is bringing to the table? Is game development velocity higher than in C++/C/C#? The ecosystem is obviously less mature, and the borrow-checker is an obvious source of friction... How do we separate the hype from the facts? 0 link to this video…

bakugoon Hacker News • Mentions

On “Undefined Behavior in C and C++ (2024)”

There's also the fact that a lot of patterns that are commonly used in game development are fundamentally at odds with the borrow checker. Relevant: link to this video