Hands-on Rust (Pragmatic Bookshelf)

PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters—and what better way to learn than by making games. Each chapter in this book presents hands-on, practical projects ranging from "Hello, World" to building a full dungeon crawler game. With this book, you'll learn game development skills applicable to other engines, including Unity and Unreal.

Herbert Wolverson @herbert

Tammy Coron @Paradox927

Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters—and what better way to learn than by making games. Each chapter in this book presents hands-on, practical projects ranging from “Hello, World” to building a full dungeon crawler game. With this book, you’ll learn game development skills applicable to other engines, including Unity and Unreal.

Rust is an exciting programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters. With Rust, you have a shiny new playground where your game ideas can flourish.

Each chapter in this book presents hands-on, practical projects that take you on a journey from “Hello, World” to building a full dungeon crawler game. Start by setting up Rust and getting comfortable with your development environment. Learn the language basics with practical examples as you make your own version of Flappy Bird. Discover what it takes to randomly generate dungeons and populate them with monsters as you build a complete dungeon crawl game. Run game systems concurrently for high-performance and fast game-play, while retaining the ability to debug your program. Unleash your creativity with magical items, tougher monsters, and intricate dungeon design. Add layered graphics and polish your game with style.


Herbert Wolverson has worked as a programmer and an indie game developer since the late 1990s. He’s taught programming and IT skills at a variety of levels, contributes to multiple Open Source projects, and is active in the game development scene.


Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “devtalk.com" at checkout :+1:

118 6879 31

Latest Threads About This Book Top

srfink0
It appears that impl GameState { … fn advance_level(&mut self) {} strong textshould bestrong text impl State, not impl GameState… In ...
0 5 0
New
jjeffers
@herbert Copying the example code from GitHub - thebracket/HandsOnRust: The source code that accompanies Hands-on Rust: Effective Learni...
0 99 1
New
pudgyturtle
@herbert Hoping someone can point me in the right direction here: I’m working through the book Hands-On Rust and have just written the c...
1 818 3
New
bjnord
Hello @herbert ! Trying to get the very first “Hello, Bracket Terminal!" example to run (p. 53). I develop on an Amazon EC2 instance runn...
0 1115 2
New
vlfnbe
Title: Hands-on Rust: monster pyramids due to simultaneous movement (page 157) Hi @herbert , The explanation on the random movement sys...
0 418 0
New
vlfnbe
Hi @herbert, If I use set_active_console(0) and set_active_console(1) in the render functions for Player and Map (like in the book), I o...
0 495 1
New
mesh2325
@herbert Flappy Dragon Example: Sync this code, and then copy the flappy_dragon director into another outside of the HandsOnRust tree ...
0 646 0
New
mesh2325
Hands on Rust: Effective Learning through 2D Game Development and Play Page 48 Cargo.toml file in book: [package] name = "hello_bterm"...
0 718 2
New
zendril
@herbert Finished the book. Also did the bonus content of compiling to wasm and running in a browser (which is just an amazing capabilit...
0 590 1
New
zendril
While converting to data driven spawning the data specifies that an item (like a dungeon map) has a frequency of 1. However, when they a...
0 567 4
New

Most Active This Week Top

Most Active This Month Top

Most Active This Year Top

PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
118 6884 31
New
bjnord
Hello @herbert ! Trying to get the very first “Hello, Bracket Terminal!" example to run (p. 53). I develop on an Amazon EC2 instance runn...
0 1115 2
New
vlfnbe
Hi @herbert, If I use set_active_console(0) and set_active_console(1) in the render functions for Player and Map (like in the book), I o...
0 495 1
New
jjeffers
@herbert Copying the example code from GitHub - thebracket/HandsOnRust: The source code that accompanies Hands-on Rust: Effective Learni...
0 99 1
New
srfink0
It appears that impl GameState { … fn advance_level(&mut self) {} strong textshould bestrong text impl State, not impl GameState… In ...
0 5 0
New

Most Active Last Three Years Top

kolossal
Hi, I need some help, I’m new to rust and was learning through your book. but I got stuck at the last stage of distribution. Whenever I t...
3 1944 5
New
mikecargal
Title: Hands-On Rust (Chapter 11: prefab) Just played a couple of amulet-less games. With a bit of debugging, I believe that your can_p...
22 1618 20
New
Keton
When running the program in chapter 8, “Implementing Combat”, the printout Health before attack was never printed so I assumed something ...
2 1000 2
New
mesh2325
Hands on Rust: Effective Learning through 2D Game Development and Play Page 48 Cargo.toml file in book: [package] name = "hello_bterm"...
0 718 2
New
erazor-de
@herbert In the part “Fill the Map With Walls” on page 90 it is stated that the iterator passes variable t inside the closure as referen...
0 595 0
New
erazor-de
On page 206 (Talking about P1.0) the trait MapArchitect is defined with the function ‘new’. In the last paragraph of this page the functi...
0 592 0
New
Chocrates
I don’t know the exact page unfortunately since I am reading it in an epub. I am having trouble understanding what this code does and wh...
0 599 3
New
Chocrates
@herbert Again using epub so don’t know the exact page number. In this snipped of code, what does the movers.iter_mut(ecs) line do in t...
0 565 2
New
Chocrates
I finally finished! I found a small typo in chapter 15 in the epub. In one spot the code mentions impl Template { pub fn spawn_enti...
0 485 0
New
pudgyturtle
@herbert Hoping someone can point me in the right direction here: I’m working through the book Hands-On Rust and have just written the c...
1 818 3
New
mesh2325
@herbert Flappy Dragon Example: Sync this code, and then copy the flappy_dragon director into another outside of the HandsOnRust tree ...
0 646 0
New
zendril
@herbert Finished the book. Also did the bonus content of compiling to wasm and running in a browser (which is just an amazing capabilit...
0 590 1
New
zendril
While converting to data driven spawning the data specifies that an item (like a dungeon map) has a frequency of 1. However, when they a...
0 567 4
New
vlfnbe
Title: Hands-on Rust: monster pyramids due to simultaneous movement (page 157) Hi @herbert , The explanation on the random movement sys...
0 418 0
New

Most Active Over Three Years Top

New
mikecargal
Title: Hands-On Rust (Chap 8 (Adding a Heads Up Display) It looks like ​.with_simple_console_no_bg​(SCREEN_WIDTH*2, SCREEN_HEIGHT*2...
9 2011 5
New
patoncrispy
I’m new to Rust and am using this book to learn more as well as to feed my interest in game dev. I’ve just finished the flappy dragon exa...
5 1475 3
New
Mmm
Hi, build fails on: bracket-lib = “~0.8.1” when running on Mac Mini M1 Rust version 1.5.0: Compiling winit v0.22.2 error[E0308]: mi...
1 1213 1
New
mikecargal
Title: Hands-on Rust: question about get_component (page 295) (feel free to respond. “You dug you’re own hole… good luck”) I have somet...
1 1158 5
New
pragmoose
After finishing the code at the end of Chapter 7 and running it, monsters sometimes don’t get destroyed on collision. Instead, the player...
2 1033 4
New
mikecargal
Please use the following format for the title of this thread (then simply delete/replace this text with the content for the thread): Tit...
7 1047 4
New
arohl
I get a significant glitch on my raspberry pi - there is a thin line to the left of the player that runs from the top of the screen to th...
3 1076 3
New
waldoplus
Excellent book. I like it very much. Just a few questions that occurred to me while reading the pathfinding section in Chapter 9 on page ...
6 951 4
New
bigfleet
In the “Prompting for the Visitor’s Name” section, contextually, the reader has just created the treehouse project. As they look for a p...
4 998 2
New
mishan88
MapBuilder doesn’t have new method. MapBuilder::new -> MapBuilder::build
0 929 4
New
Chocrates
In the end of chapter 7 we write the movement function in movement.rs We call the camera on_player_move method like so: camera​.on_play...
6 866 3
New
wolf4earth
On page 140 we change the initialization code of the dungeon crawler to be able to use graphics As with other code examples before th...
4 876 1
New
kkprog
The call to map_idx on the render function of map (let idx = map_idx(x, y) ; ) caused error ‘error[E0425]: cannot find function map_idx i...
3 823 3
New
tabvaranjr
Hi there! I’ve finished the book last Friday. Good work! It’s a very good introduction to Rust and I really enjoyed it. I have noticed t...
0 813 0
New

Get money off!

The Pragmatic Bookshelf

35% off any eBook

Simply use coupon code "devtalk.com" at checkout. See full details here.