HackerTube

RustConf 2018 - Closing Keynote - Using Rust For Game Development by Catherine West

Rust Programming Language9 HN recommenders · recommended in 9 months, 2018–2023
YouTube
talk · intermediate · evergreen · 2018–2023 on HN

Catherine West's RustConf 2018 closing keynote on building a game in Rust and organizing a large codebase. It builds up an entity component system and generational indices step by step.

HN treats it as the go-to explanation of ECS, valuable even for people who don't use Rust.

12 comments from Hacker News

@estebank2023-08 · in “A half-hour to learn Rust”

If you're looking for something with a narrative you can watch, the RustConf 2018 closing keynote ▶ this video is a great talk that has an overview on "generational arenas", which are effectively "just" a vector with a custom index type that holds the "pointed-to" generation, and the stored values also store their generation inline. This allows: all objects to be stored in a contiguous block of memory (increasing the likelihood of "pointer-chasing" style of code to have the pointed to value warm in cache, significantly speeding them up), allows relocation (because you're no longer dealing with pointers, but rather offsets to the beginning of the pointer), and doesn't have the pointer invalidation problem (because the "pointer" now asserts that the pointed to value hasn't changed, and if so return an Err/None). It also has the benefit that because you're not dealing with pointers you don't need to write any unsafe Rust code, out of bound accesses are checked, and the borrow graph becomes simpler because the arena owns all of its contents, instead of having to keep track of the lifetime of borrows at compile time (the famous "fighting with the borrow checker") nor is as "expensive" as the tracking an Arc<RefCell<T>> could be.

Strongly recommends View on HN
@andrewflnr2022-09 · in “I learned to love testing game code”

This Rust conference talk, of all things, is still my favorite ECS explanation, because she builds the concept piece by piece starting from megaclass-hell to full entities-as-IDs with reasons for each step. Also she's a pretty entertaining speaker IMO. ▶ this video

Strongly recommends View on HN
@oconnor6632021-06 · in “Zig 0.8.0 Release Notes”

This is basically what an Entity Component System is, right? I always find myself linking back to this talk: ▶ this video

Strongly recommends View on HN
@atoav2019-03 · in “Case Study: Npm uses Rust for its CPU-bound bottlenecks [pdf]”

It depends, I am over a year in Rust and it doesn't take me that much longer to write something in it than say in Python. The confidence I have that the thing I wrote is way higher in Rust and it is usually much faster. And: it is incredible easy to build and deploy. I think whether Rust is useful or not depends entirely on the application. If you need high confidence in what the thing is doing, it should run parallel and fast and you are familiar with the concepts Rust is using – it isn't a bad choice. For me it replaced Python in nearly every domain except one-use scripts and scientific stuff. It can be hard for advanced programmers to abandon certain patterns they bring from other languages though. In the first months I tried too much to use OOP, which doesn't make any sense and leads to convoluted code. If you work more in a compositional and data oriented way while making use of Types and Traits, you will end up with much simpler solutions that work incredibly well. Katherine West's RustConf 2018 Talk on ECS Systems describes this incredibly well and might be even good to watch if you are never intending to use Rust at all, because the patterns discussed are quite universal: ▶ this video

Strongly recommends View on HN
@monocasa2018-11 · in “Still in love with Rust”

There was a great talk recently about how to properly build an entity component framework in Rust if you haven't seen it yet. ▶ this video

Strongly recommends View on HN