Skip to content
0:00 / 0:00

#entitycomponentsystem#generationalindices#gameengines

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

Rust Programming Language

70K subscribers • 41 videos on Hallway • Conference channel

YouTube
  • Recommended by 10 people: 9 on Hacker News and 1 curated list.
  • A classic. People kept recommending it from 2018 to 2023.
  • Presented by Catherine West
  • May be out of date. Uploaded 8 years ago, in an area where tools change fast.

Intermediate. Assumes working knowledge.

152K views8 years ago10 recommendations

Game developmentProgramming languagesRustGame programmingDesign patterns

Catherine West explains how to build an entity component system and manage complexity in Rust game development using generational indices.

RustConf 2018 - Closing Keynote by Catherine West When you’re just starting out in Rust, you start by building small programs. As we all know though, medium and large projects can have very different, unique kinds of problems that smaller projects never encounter. As our projects grow in size, we need to be increasingly concerned about code organization, separation of concerns, implementation hiding, and other techniques to manage growing complexity. Most languages have tools and patterns to deal with this, and Rust is no exception. However, the patterns that we learned from other languages, especially in mainstream OO languages, are often unhelpful when applied to Rust, and this can lead to a roadblock when trying to transition to building moderate or large Rust programs. This talk will cover a case study of a moderate sized game engine written in Rust and Lua, and show strategies for implementing things in Rust where common implementations in other mainstream languages are a poor fit. I’ll also discuss some examples of problems unique to Rust that ended up with very nice —but sometimes not obvious— solutions. Along the way, I’d also like to discuss working with Rust in game development generally, and what it’s like getting Rust to run on mainstream game consoles. Slides at kyren.github.io/rustconf_2018_slides/index.html The blog post mentioned in this talk is at kyren.github.io/2018/09/14/rustconf-talk.html

Why it's here

10 people recommend this

What people say. Highly recommended as one of the best and clearest explanations of Entity Component Systems and generational arenas.

monocasaon Hacker News • Recommends

On “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. link to this video

atoavon Hacker News • Recommends

On “Case Study: Npm uses Rust for its CPU-bound bottlenecks [pdf]”

…ional 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: link to this video…

oconnor663on Hacker News • Recommends

On “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: link to this video

andrewflnron Hacker News • Recommends

On “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. link to this video

estebankon Hacker News • Recommends

On “A half-hour to learn Rust”

If you're looking for something with a narrative you can watch, the RustConf 2018 closing keynote link to 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…

programming-talkscurated list on GitHubRecommends

Under “Rust”

Using Rust For Game Development 00:42:29 by **Catherine West** (2018)

faitswulffon Hacker News • Recommends

On “Ask HN: Best talks of 2018?”

I rather enjoyed RustConf 2018's Closing Keynote, "Using Rust For Game Development" by Catherine West: link to this video I learned about the ECS pattern and got to see some Rust refactoring in action. Previous HN discussion here: link

nabakinon Hacker News • Recommends

On “Why Rust Is the Future of Game Development”

Chucklefish, the developer of Starbound, uses Rust too. The lead dev on the project gave a great presentation 1 at RustConf. 1 link to this video

hectorlorenzoon Hacker News • Recommends

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 to this video Counter-rant from Jonathan Blow: link

pornelon Hacker News • Recommends

On “Roguelike Tutorial in Rust (2019)”

…player entity that has components attached, and each system operates on its own set of components. I can't really do it justice in a comment. It's a quite different approach, so it's not directly comparable. It's like OOP vs Rust's traits. ECS happens to match Rust's memory model and traits incredibly well. Here's a more in-depth talk about this: link to this video…

visualphoenixon Hacker News • Mentions

On “24 Hours of Rust Game Development”

…e down that path. I think people tend to either go with what they've seen work in the past, or heard works well. Maybe it's cargo culting, or maybe in the case of rust (which I have no current experience with), it helps? Either way, the most important point is to focus on the fun and not let technologies get in the way of making a good game. 0 - link to this video…

pjmlpon Hacker News • Mentions

On “Boden – Native mobile cross-platform applications”

Catherine is relatively known in the Rust community, hence why I didn't mention anything else. Here is her keynote talk at Rust Conf 2018. link to this video

estebankon Hacker News • Mentions

On “Learn Rust with entirely too many linked lists (2019)”

But do they use linked lists for them? I would have assumed you would use an arena for something like that, precisely because you already need to iterate over all of them and can represent any graph as keys into a generational index, so that reading stale keys is trivially handled. Again, I'm not a game dev and this is just my understanding after reading up on these topics after watching link to this video .

gary17theon Hacker News • Mentions

On “A half-hour to learn Rust”

The Entity Component System (ECS) pattern seems to side-step the Rust borrow checker entirely in order to solve the following issues, all at the same time: 1.) allow a "parent" entity to have a reference to a "related" entity, 2.) allow such a reference to a "related" entity to be mutable, 3.) allow multiple "parent" entities to reference the same "related" entity, and 4.) allow the overall system to deallocate a "related" entity at any time without invalidating the state of all the observing "parent" entities. I have never written a game before, so Catherine West1 might have very good reasons for choosing ECS, but I... am not so crazy about it. ECS seems to replace Rust references (raw po…