Is the resulting dungeon crawler WASM-compatible? One thing I really wished after building my first Rust roguelike was that I could have shared it on a web site.
How much does the book lean on higher-level libraries for the graphics and I/O?
Does the dungeon crawler use an ECS?
Thanks so much for making a Rust book on games!
Edit: I just realized that you’re the one behind bracketproductions.com and that your ECS-based roguelike tutorial was recommended to me as a next step by the author of the tutorial I did. Really looking forward to your book!
Sorry about the delay in replying - family decided we needed to celebrate beta release 1!
The book walks you through installing Rust and writing some console programs to get you started with the language. Then it turn to Flappy Dragon (a Flappy Bird clone). Then you build and iteratively improve a dungeon crawler (roguelike) over the subsequent chapters. It introduces ECS in the Compose Dungeon Denizens chapter - and uses the ECS architecture from that point onwards.
The book uses Bracket Lib for rendering and helper functions rather than libtcod. That’s the same back-end I use in the tutorial on my website. I actually created it (a long time ago!) before there were good libtcod ports available, but tcod was a huge influence on its design. The book doesn’t delve into the very-low-level land of actually initializing a window, putting glyphs on the screen and maintaining console state efficiently; that wouldn’t be very newcomer friendly and the art of initializing a GL/Vulkan/Metal context and keeping it happy could easily fill another 300 pages. Instead, the book sits just above the hardware-specific layer. Readers learn to manage game loop, timing and engine state - but use the virtual console to actually render output and receive keystrokes.
Likewise, I used Legion for the ECS library. I’ve written ECS libraries, and would love to walk people through making them one day - but that could easily be a book in and of itself. Legion is a very good library - and (starting with 0.3) is pretty user-friendly. So I went with it. Also, the people who wrote it have been very helpful in putting the book together.
WASM. Bracket-lib supports WASM output (the tutorial you linked has playable WASM builds of every example), but the book doesn’t dig into WASM builds in much detail. I plan on releasing an article on my website (linked from the book) that will explain how to do this, closer to the end of the beta cycle.
It’s worth noting that while the dungeon crawler/roguelike is the primary example - it’s not a book about dungeon crawlers (the tutorial is 100% about roguelikes). The outlining process actually started with a curriculum of what the newcomer needs to learn to become good at Rust. Then the game examples are constructed around that, teaching the language by making games - and having fun along the way. (The original working title was “Learn Rust by Making Games”)
I hope you enjoy the book! My driving motivation is always “I hope people make fun things with this”. It seriously makes my day when someone sends me a message about something they’ve built.
This looks like a great book, definitely looking to buy it. Small question, where can I see how much of it is finished? I tried to find some sort of progress details on the book page on pragprog and couldn’t find it.
The 1st beta takes you up to the end of Take Turns with the Monsters, and includes two of the three appendices. Subsequent betas will add chapters until its all done (getting the beta now includes subsequent betas and the final e-book). I believe the goal is to release betas every couple of weeks until its done.
The excitement in this thread is making me want to put Rust (and this book) higher up my learning list
I wonder if those of you who are going to be getting this book might be interested in writing a journal about your experience, or, if there’s a few of you perhaps even start a book club thread (like the one a few of us currently have here)? I am sure lots of people would be interested in reading your thoughts about this book - I know I would
Herbert Wolverson also has some quality free learning material for Rust. One third of my Rust bookmarks consist of free learning material he produced. I’m also planning to buy this book somewhere in the next year.
Never seen a language reach the level of coolness that Rust has and this book appears to be a very good way to get started. I am also happy wasm is to be covered even if by supplemental content—thank you, @herbert
Just finished the book and have to say that I really really enjoyed it. I already had a little (very little) experience on working with rust and it really helped get a better grasp of things.
I always had a thing for gamedev and this book was I think the best way to get me a little more into both rust and game development. I had worked as a game developer back in the days of MS-Dos based games but didn’t have any experience with ECS and the book helped a lot.
So thank you very much for writing this book and looking forward to the Brain Teasers book!