0%

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.

What You Need:

  • A computer running Windows 10, Linux, or Mac OS X.
  • A text editor, such as Visual Studio Code.
  • A video card and drivers capable of running OpenGL 3.2.
  • Table of Contents

    1.  Acknowledgments
    2.  Preface
      1. Who Should Read This Book
      2. What’s in This Book
      3. What’s Not in This Book
      4. How to Read This Book
      5. Conventions Used in This Book
      6. Online Resources
      7. Wrap-Up
    3. Part I. Getting Started with Rust
      1. 1. Rust and Your Development Environment
      2. Installing Rust
      3. Installing and Configuring Your Development Environment
      4. Managing Projects with Cargo
      5. Creating Your First Rust Program
      6. Using Cargo to Build, Check, or Run Your Project
      7. Formatting Your Code
      8. Finding Common Mistakes with Clippy
      9. Package Management with Cargo
      10. Wrap-Up
      11. 2. First Steps with Rust
      12. Creating a New Project
      13. Capturing User Input
      14. Moving Input to a Function
      15. Trimming Input
      16. Storing Strings in an Array
      17. Grouping Data with Structs
      18. Storing a Variable Amount of Data with Vectors
      19. Categorizing with Enumerations
      20. Wrap-Up
      21. 3. Build Your First Game with Rust
      22. Understanding the Game Loop
      23. Creating Different Game Modes
      24. Adding the Player
      25. Creating Obstacles and Keeping Score
      26. Wrap-Up
    4. Part II. Building a Dungeon Crawler
      1. 4. Design a Dungeon Crawler
      2. Adding Headings to Your Design Document
      3. Wrap-Up
      4. 5. Build a Dungeon Crawler
      5. Dividing Your Code Into Modules
      6. Organizing Your Imports With a Prelude
      7. Storing the Dungeon Map
      8. Adding the Adventurer
      9. Building a Dungeon
      10. Graphics, Camera, Action
      11. Wrap-Up
      12. 6. Compose Dungeon Denizens
      13. Understanding Terminology
      14. Composing Entities
      15. Installing and Using Legion
      16. Composing the Player
      17. Managing Complexity with Systems
      18. Adding Monsters
      19. Collision Detection
      20. Wrap-Up
      21. 7. Take Turns with the Monsters
      22. Making Monsters Wander Randomly
      23. Moving Entites in a Turn-Based Game
      24. Sending Messages of Intent
      25. Wrap-Up
      26. 8. Health and Melee Combat
      27. Giving Entities Hit Points
      28. Adding a Heads-up Display
      29. Implementing Combat
      30. Waiting as a Strategy
      31. Wrap-Up
      32. 9. Victory and Defeat
      33. Building a Smarter Monster
      34. Implementing a Game Over Screen
      35. Finding the Amulet of Yala
      36. Wrap-Up
      37. 10. Fields of View
      38. Defining an Entity’s Field of View
      39. Limiting Monsters’ Fields of View
      40. Adding Spatial Memory
      41. Wrap-Up
      42. 11. More Interesting Dungeons
      43. Creating Traits
      44. Creating Cellular Automata Maps
      45. Creating Drunkard’s Walk Maps
      46. Prefabricating Map Sections
      47. Wrap-Up
      48. 12. Map Themes
      49. Theming Your Dungeon
      50. Rendering with Themes
      51. Unleashing Your Imagination
      52. Wrap-Up
      53. 13. Inventory and Power-Ups
      54. Designing Items
      55. Managing Inventory
      56. Wrap-Up
      57. 14. Deeper Dungeons
      58. Adding Stairs to the Map
      59. Tracking Game Level
      60. Displaying the Current Level on the HUD
      61. Wrap-Up
      62. 15. Combat Systems and Loot
      63. Designing Data-Driven Dungeons
      64. Extending the Combat System
      65. Adding More Swords
      66. Wrap-Up
      67. 16. Final Steps and Finishing Touches
      68. Packaging Your Game for Distribution
      69. Making the Dungeon Crawler Your Own
      70. Additional Content
      71. Wrap-Up
    5. Part III. Additional Resources
      1. A1. ASCII/Codepage 437 Chart
      2. A2. Short Game Design Documents
      3. Make a Note of Every Idea
      4. Why You Need a Design Document
      5. Design Document Headings
      6. You Aren’t Gonna Need It
      7. Wrap-Up
      8. A3. Rust Cheat Sheet
    6.  Bibliography
    13.58.82.79