Hands-on Rust (Pragmatic Bookshelf)
Latest Threads About This Book

It appears that impl GameState { … fn advance_level(&mut self) {} strong textshould bestrong text impl State, not impl GameState… In ...
New

@herbert
Copying the example code from GitHub - thebracket/HandsOnRust: The source code that accompanies Hands-on Rust: Effective Learni...
New

@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...
New

Hello @herbert ! Trying to get the very first “Hello, Bracket Terminal!" example to run (p. 53). I develop on an Amazon EC2 instance runn...
New

Title: Hands-on Rust: monster pyramids due to simultaneous movement (page 157)
Hi @herbert ,
The explanation on the random movement sys...
New

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...
New

@herbert
Flappy Dragon Example:
Sync this code, and then copy the flappy_dragon director into another outside of the HandsOnRust tree ...
New

Hands on Rust: Effective Learning through 2D Game Development and Play
Page 48
Cargo.toml file in book:
[package]
name = "hello_bterm"...
New

@herbert
Finished the book. Also did the bonus content of compiling to wasm and running in a browser (which is just an amazing capabilit...
New

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...
New

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...
New

@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...
New

When running the program in chapter 8, “Implementing Combat”, the printout Health before attack was never printed so I assumed something ...
New

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...
New

@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...
New

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...
New

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...
New

The layers in general are working, with the map, entities and hud. The tooltips are not showing up though. It seems that it is due to the...
New

The code in page 227, the loop signalled with comment 5, it only needs 1 tile to be OK for the prefab to be OK. I don’t know if this is a...
New

Hi,
I completed chapter 6 but am getting the following error when running:
thread 'main' panicked at 'Failed to load texture: IoError(O...
New

My silly brain caught a very small typo. I’m guessing that the “is” in this sentence was meant to instead be “in”:
This library uses th...
New

I had to use DrawBatch to get the game over screen to display:
fn game_over(&mut self, ctx: &mut BTerm) {
let mut draw_batch = ...
New

Hi,
Fantastic book! Question:
On page 97, when building a BTerm, why is it necessary to specify the terminal’s dimensions in two ways: ...
New

As the title says, first line of this page should be Templates not Template
New

In Page 263 where we add the stub function advance_level, the book says it goes inside impl GameState but in the code it goes inside impl...
New

If you copy/paste the second TOML snipped with features, there are two issues:
It’s presented as multi-line, but TOML doesn’t support m...
New

In the flappy bird example in the book, the example code uses i32 as the type for the player’s y position. This has a possible unintended...
New

Source code in page 207. When the monster is pushed, its new position is twice SCREEN_WIDTH.
Probably one of them was supposed to be HEIGHT
New

After finishing the code at the end of Chapter 7 and running it, monsters sometimes don’t get destroyed on collision. Instead, the player...
New

Hi,
First of all, sorry for not providing a pagenumber, but I don’t know it, since I’m reading the book on Medium.
To my problem: I hav...
New
Most Active This Week
Most Active This Month
Most Active This Year

Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New

Hello @herbert ! Trying to get the very first “Hello, Bracket Terminal!" example to run (p. 53). I develop on an Amazon EC2 instance runn...
New

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...
New

@herbert
Copying the example code from GitHub - thebracket/HandsOnRust: The source code that accompanies Hands-on Rust: Effective Learni...
New

It appears that impl GameState { … fn advance_level(&mut self) {} strong textshould bestrong text impl State, not impl GameState… In ...
New
Most Active Last Three Years

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...
New

When running the program in chapter 8, “Implementing Combat”, the printout Health before attack was never printed so I assumed something ...
New

@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...
New

Hands on Rust: Effective Learning through 2D Game Development and Play
Page 48
Cargo.toml file in book:
[package]
name = "hello_bterm"...
New

@herbert
Flappy Dragon Example:
Sync this code, and then copy the flappy_dragon director into another outside of the HandsOnRust tree ...
New

@herbert
Finished the book. Also did the bonus content of compiling to wasm and running in a browser (which is just an amazing capabilit...
New

@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...
New

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...
New

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...
New

@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...
New

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...
New

Title: Hands-on Rust: monster pyramids due to simultaneous movement (page 157)
Hi @herbert ,
The explanation on the random movement sys...
New
Most Active Over Three Years

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...
New

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...
New

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...
New

The Pragmatic Bookshelf is having another crazy 50% off sale April 27 to May 6.
Enter coupon code FirstImpressions2021 at checkout to sa...
New

Hi,
I completed chapter 6 but am getting the following error when running:
thread 'main' panicked at 'Failed to load texture: IoError(O...
New

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...
New

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...
New

Please use the following format for the title of this thread (then simply delete/replace this text with the content for the thread):
Tit...
New

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...
New

After finishing the code at the end of Chapter 7 and running it, monsters sometimes don’t get destroyed on collision. Instead, the player...
New

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 ...
New

In the “Prompting for the Visitor’s Name” section, contextually, the reader has just created the treehouse project. As they look for a p...
New

MapBuilder doesn’t have new method.
MapBuilder::new -> MapBuilder::build
New

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...
New

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...
New
Publisher:
Pragmatic Bookshelf
Latest in Hands-on Rust
Get money off!

The Pragmatic Bookshelf
35% off any eBook
Use the coupon code "devtalk.com" to get 35% off any eBook published by PragProg!