Networked gaming in Rust

Who is this presentation for?

Programmers interested in Rust, games, networking, and graphics

Prerequisite knowledge

A working knowledge of Rust—familiarity with ownership, borrowing, generics, traits, etc. (When you hear the words "borrow checker," you should have an unconscious urge to improve your posture. You should have some experience using the standard library and be ready to look up bits and pieces you don't know.)

A general understanding of a coordinate transformation matrix (Check out 3blue1brown's excellent short video series, The Essence of Linear Algebra.)

Materials or downloads needed in advance

A laptop (Windows, macOS, or Linux with a working OpenGL driver and network card) with rustup installed and up to date with the most recent stable and nightly toolchains

Please clone this program and try running it on your computer in advance

What you'll learn

Strenthen your Rust skills

Learn to use the Tokio asynchronous I/O framework to write some networking code, Rust's concurrency facilities to implement game logic, and the glium OpenGL API to write some graphics code

Description

Rust is a new systems programming language from Mozilla that combines native performance, concurrency, and safety. Rust’s unusual type system prevents common memory errors and in doing so also eliminates broad classes of security holes and enables data-race-free multithreaded programming. What’s more, Rust accomplishes all this without resorting to garbage collection. A performant, concurrency-friendly, secure language that never pauses for garbage collection is ideal for writing networked games.

Modern games push hardware to its limits—putting every core to use, maxing out the graphics processor, and saturating the network. We can’t do that in a three-hour tutorial (or not deliberately, at least, without melting OSCON’s WiFi), but we can still have some fun. Jim Blandy shows you how to implement a networked game in Rust, using the excellent glium crate for type-safe OpenGL bindings and the new Tokio framework for efficient, composable asynchronous I/O. Jim shares a number of presentations, each followed by a short coding exercise, checked by supplied unit tests. Jim will also provide solutions, so even if you don’t get something right away, you won’t be left behind.