Wrap-Up

Hands-on Rust — by Herbert Wolverson (79 / 120)

The Pragmatic Programmers
The Pragmatic Programmers
1 min readSep 23, 2021

--

👈 Adding Spatial Memory | TOC | Chapter 11 More Interesting Dungeons 👉

In this chapter, you implemented fields of view for the player and the monsters. You restricted map rendering to what the player can see, and limited monsters to chasing the player only if they can see them. This has enabled more tactical play, and made running to hide a valid option for the player. You also gave the player a memory of where they’ve been, and learned how to tint rendered tiles with a color.

In the next chapter, you’ll add difficulty to the game by further randomizing monster spawns. You’ll combine this with new ways to generate maps to create a much more tactically varied game. You’ll also learn how to theme your maps, varying the look and feel of your dungeons.

Footnotes

[59] https://doc.rust-lang.org/std/collections/struct.HashSet.html

Copyright © 2021, The Pragmatic Bookshelf.

👈 Adding Spatial Memory | TOC | Chapter 11 More Interesting Dungeons 👉

Hands-on Rust by Herbert Wolverson can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

Unlisted

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.