Beta 2 of Hands-on Rust is now available

Beta 2 adds chapters entitled Health and Melee Combat, and Victory and Defeat, as well as some errata. Learn to track hit points, for both the player and monsters. Add a heads-up display. Find the lost amulet, or die trying.

The new chapters are focused on state management, and structuring your game to support different modes.

New chapters added:

  • Health and Melee Combat
  • Victory and Defeat

This release also includes the following changes:

  • Clarified the placement of the stdin call.
  • Changed references from cargo init to cargo new to reflect the preferred usage of the tool.
  • Added an aside explaining why you create a new String before passing it to read_line.
  • Added discussion about Rust’s handling of trailing commas in lists.
  • Fixed capitalization of set().
  • Changed _ctx to ctx.
  • Added a small section to chapter 2 discussing enum initialization.
  • The map_render code used from Chapter 5 onwards is more efficiently structured.
  • Added instructions to insert the Collision System into your scheduler.
  • Added a note that the map_idx function should be implemented outside of the Map structure’s implementation block.
  • Expanded the code example in “Consume the Map API” to include the main function.
  • Corrected an issue in the source code in which camera.rs changed the function signature of on_player_move in later chapters.

Get the book here

Share