Acknowledgments |
|
ix | |
Preface |
|
xi | |
|
Part I Getting Started with Rust |
|
|
|
1 Rust and Your Development Environment |
|
|
3 | (16) |
|
|
3 | (4) |
|
Installing and Configuring Your Development Environment |
|
|
7 | (1) |
|
Managing Projects with Cargo |
|
|
8 | (2) |
|
Creating Your First Rust Program |
|
|
10 | (3) |
|
Using Cargo to Build, Check, or Run Your Project |
|
|
13 | (1) |
|
|
14 | (1) |
|
Finding Common Mistakes with Clippy |
|
|
14 | (3) |
|
Package Management with Cargo |
|
|
17 | (1) |
|
|
18 | (1) |
|
|
19 | (26) |
|
|
19 | (1) |
|
|
20 | (4) |
|
Moving Input to a Function |
|
|
24 | (1) |
|
|
25 | (1) |
|
Storing Strings in an Array |
|
|
26 | (3) |
|
Grouping Data with Structs |
|
|
29 | (5) |
|
Storing a Variable Amount of Data with Vectors |
|
|
34 | (4) |
|
Categorizing with Enumerations |
|
|
38 | (5) |
|
|
43 | (2) |
|
3 Build Your First Game with Rust |
|
|
45 | (26) |
|
Understanding the Game Loop |
|
|
45 | (8) |
|
Creating Different Game Modes |
|
|
53 | (4) |
|
|
57 | (5) |
|
Creating Obstacles and Keeping Score |
|
|
62 | (6) |
|
|
68 | (3) |
|
Part II Building a Dungeon Crawler |
|
|
|
4 Design a Dungeon Crawler |
|
|
71 | (4) |
|
Adding Headings to Your Design Document |
|
|
71 | (2) |
|
|
73 | (2) |
|
5 Build a Dungeon Crawler |
|
|
75 | (28) |
|
Dividing Your Code Into Modules |
|
|
75 | (3) |
|
Organizing Your Imports With a Prelude |
|
|
78 | (1) |
|
|
79 | (5) |
|
|
84 | (4) |
|
|
88 | (6) |
|
|
94 | (8) |
|
|
102 | (1) |
|
6 Compose Dungeon Denizens |
|
|
103 | (24) |
|
Understanding Terminology |
|
|
103 | (2) |
|
|
105 | (1) |
|
Installing and Using Legion |
|
|
106 | (2) |
|
|
108 | (2) |
|
Managing Complexity with Systems |
|
|
110 | (12) |
|
|
122 | (2) |
|
|
124 | (2) |
|
|
126 | (1) |
|
7 Take Turns with the Monsters |
|
|
127 | (14) |
|
Making Monsters Wander Randomly |
|
|
127 | (3) |
|
Moving Entites in a Turn-Based Game |
|
|
130 | (5) |
|
Sending Messages of Intent |
|
|
135 | (5) |
|
|
140 | (1) |
|
8 Health and Melee Combat |
|
|
141 | (20) |
|
Giving Entities Hit Points |
|
|
141 | (1) |
|
Adding a Heads-up Display |
|
|
142 | (9) |
|
|
151 | (8) |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
161 | (24) |
|
Building a Smarter Monster |
|
|
162 | (11) |
|
Implementing a Game Over Screen |
|
|
173 | (4) |
|
Finding the Amulet of Yala |
|
|
177 | (7) |
|
|
184 | (1) |
|
|
185 | (18) |
|
Defining an Entity's Field of View |
|
|
186 | (10) |
|
Limiting Monsters' Fields of View |
|
|
196 | (2) |
|
|
198 | (4) |
|
|
202 | (1) |
|
11 More Interesting Dungeons |
|
|
203 | (28) |
|
|
204 | (7) |
|
Creating Cellular Automata Maps |
|
|
211 | (7) |
|
Creating Drunkard's Walk Maps |
|
|
218 | (7) |
|
Prefabricating Map Sections |
|
|
225 | (5) |
|
|
230 | (1) |
|
|
231 | (10) |
|
|
231 | (3) |
|
|
234 | (4) |
|
Unleashing Your Imagination |
|
|
238 | (1) |
|
|
239 | (2) |
|
13 Inventory and Power-Ups |
|
|
241 | (16) |
|
|
241 | (3) |
|
|
244 | (11) |
|
|
255 | (2) |
|
|
257 | (12) |
|
|
257 | (4) |
|
|
261 | (6) |
|
Displaying the Current Level on the HUD |
|
|
267 | (1) |
|
|
267 | (2) |
|
15 Combat Systems and Loot |
|
|
269 | (18) |
|
Designing Data-Driven Dungeons |
|
|
270 | (10) |
|
Extending the Combat System |
|
|
280 | (5) |
|
|
285 | (1) |
|
|
286 | (1) |
|
16 Final Steps and Finishing Touches |
|
|
287 | (150) |
|
Packaging Your Game for Distribution |
|
|
287 | (2) |
|
Making the Dungeon Crawler Your Own |
|
|
289 | (1) |
|
|
290 | (1) |
|
|
290 | (147) |
|
Part III Additional Resources |
|
|
|
A1 ASCn/Codepage 437 Chart |
|
|
295 | (2) |
|
A2 Short Game Design Documents |
|
|
297 | (8) |
|
Make a Note of Every Idea |
|
|
297 | (1) |
|
Why You Need a Design Document |
|
|
298 | (1) |
|
|
299 | (2) |
|
|
301 | (2) |
|
|
303 | (2) |
|
|
305 | (2) |
Bibliography |
|
307 | (2) |
Index |
|
309 | |