11 ms·
Hands-On Rust: Effective Learning Through 2D Game Development and Play
- vjust 5y agoHis explanations seem very clear and simple, I'd dig into it, just to get a better understanding of rust, and the game dev part also seems do-able, unlike other authors where they dive into some complex pieces causing frustration to the learner.
- cius 5y agoI recently finished this book and highly recommend it. Very fun stuff, a decent introduction to rust, and does a great job of setting the reader up for exploring further. Kudos to Mr. Wolverson.
- myth_drannon 5y agoIt's a great book but I struggled with an additional overhead of ECS library usage. Don't know if it would have been better just roll out it's own simple logic for ECS , but then it would probably double the length of the book.
- thebracket 5y agoPage count was a real concern. I wanted to introduce Rust newcomers to easy concurrency, and keep the data-storage side of things manageable (storing a big list of dynamic objects with traits gets messy fast and leads to a lot more borrow-checker fighting). Using an ECS let me dodge the latter bullet, at the expense of a bit of complexity. (I made sure Flappy didn't need an ECS) Bevy didn't exist when I started writing, or I'd have probably used it. Legion is a great ECS, but it's heavier than I'd like - and Bevy makes a lot of things really easy.
- TylerE 5y agoThis concerns me a bit.. when I've made (failed) attempts to learn Rust in the past the borrow checker was always the sticking point.
- baq 5y agoIt needs a mindset change. The thing is trying to help you. It points out issues that you didn’t think about. It’s naturally difficult to think about things you’ve never had to think about before. It also turns out that architecting software in certain ways (like ECS) makes it easier to think less about borrowing.
- Zolomon 5y agoI worked through this book a couple of weeks ago and I had a blast. I heartily recommend it to roguelike fans that haven’t tried out participating in the 7DRL game jam yet.
- halvnykterist 5y agoI can't help but be heavily skeptical of approaches to a (traditional) roguelike that use ECS. The idea is very entrenched in the rust gamedev community, but for a turn based tile based game there's extremely little benefit and a lot of added complexity. Bob Nystrom has an excellent talk on roguelike architecture [0] and rust as a language itself doesn't prevent any of these approaches. If anything, the existence of sum types as enums make many of them all the more powerful. [0]: https://www.youtube.com/watch?v=JxI3Eu5DPwE https://www.youtube.com/watch?v=JxI3Eu5DPwE
- ffhhj 5y agoECS is nothing compared to the eclipsing aspects of games that a gamedev has to solve: * Structures persistency (save/load/stream) * Optmized seamless world expansion * Where to get assets and content from (licenses, generated, etc.) * Affordable and responsive multiplayer
- anothernewdude 5y agoThe reason ECS is so common for roguelikes, is because they provide a simulationist experience. The main draw of several roguelikes is having enemies on the same footing as the player, and a good way to do that is to have them use the exact same systems. It's also a good way to make interesting interactions between environment and objects happen. Also, having collections of entities works well for Rust's borrow checker.
- pizza234 5y ago> The idea is very entrenched in the rust gamedev community I don't think it's very entrenched, although it's certainly present. The reason for this perception, I guess, is that Bevy (which is based on ECS) is all the rage. Amethyst was ECS as well, but it's dead now (and Bevy is essentially its successor). Veloren is ECS though, and active. The remaining major engine (AFAIK) is RG3D, but it's not ECS. Macroquad provides a node graph (but it's a smaller engine). All the other game engines are comparatively small, and they don't provide storages/ECS engines. (edit: added Veloren)
- halvnykterist 5y ago
- Camas 5y agoBook is also online: https://bfnightly.bracketproductions.com/ https://bfnightly.bracketproductions.com/ and on Github: https://github.com/amethyst/rustrogueliketutorial https://github.com/amethyst/rustrogueliketutorial
- thebracket 5y ago(Author here) That's the Roguelike tutorial I created, not the Hands-on Rust book. The two are quite different beasts, with a bit of overlap. Hands-on Rust is designed for the newcomer to Rust, and carefully maps tutorial sections through teaching beginner-to-intermediate Rust concepts. It starts with some basic Rust exercises, works through a Flappy Bird clone, and then uses Roguelike development to teach a lot of underlying Rust concepts. It also teaches gamedev, and tries to do so in a way you can reuse in other games. The tutorial is all Roguelike, all the time - focused on building a working roguelike.
- rudedogg 5y agoCongratulations on releasing your book. I watched one of your talks about procedural generation[0] and really enjoyed it, thanks! Mentioning this here since the tutorial linked above has a lot of procedural generation content [0] https://www.youtube.com/watch?v=TlLIOgWYVpI https://www.youtube.com/watch?v=TlLIOgWYVpI
- dopu 5y agoLooks pretty good! I will say, as someone who programs in their day job and has been trying for ages to get into game dev as a hobby, love2d [0] has been excellent for getting started. My github has a few repos of previous attempts at making simple games (in .cpp, .rs, etc) which I abandoned from the amount of work it took. If you're in a similar boat, I would recommend checking the framework out. Lua's a pleasure to program in and you can focus on the game development itself instead of getting bogged down in the details of rust / cpp. In fact I've been thinking lately about how easy it would be to use it for things other than games -- quick prototyping of graphical simulations, psychophysics experiments, etc. [0]: https://love2d.org/ https://love2d.org/
- greenail 5y agoI don't think most non-rust programmers know what ECS is. ECS is a pattern to manage composable logic and shared behavior. very very loosely like splitting logic in to class level and object level.
- runevault 5y agoLots of game developers know what ECS is. It existed before rust gamedev became a major thing. Unity even has an (experimental to be clear) ECS engine you can use to replace traditional monobehavior style objects.
- igh4st 5y agoThe book sounds awesome to get your hands dirty with Rust :) is there a promo code for Latin-american countries?
- cultofmetatron 5y agoby any chance, can you reccomend a good book for learning programming thats written for a spanish speaking audience?
- thebracket 5y agoI'm not sure what promos are active right now (I just got back from vacation). It will be included in the November Thanksgiving sales. You could also email support@pragprog.com - they would be able to help.
- igh4st 5y agoI'll reach out to them, thanks!
- dudul 5y agoI started reading this book a few months ago. It is pretty good, I really like learning while working on a "sort of real world" project. However, being completely new to Rust I find that the author doesn't spend enough time discussing the language, it's syntax and nuances. It is hard to talk both about rust alongside video game design techniques. I put it down after reading 1/4th of it. I'm planning to spend some time on a book that focuses on the language first and then get back to it ;)
- timClicks 5y agoThat's a very difficult balance as an author writing a project-based book for a language. It's really difficult to know how much time to spend where: the language (Rust), the projects background (gamedev patterns) or the project code.
- uDontKnowMe 5y agoConsistently interesting content coming out of Pragmatic Bookshelf publishers these days. Recently, I have particularly enjoyed the Ray Tracer Challenge (https://pragprog.com/titles/jbtracer/the-ray-tracer-challenge/ https://pragprog.com/titles/jbtracer/the-ray-tracer-challeng...) and Web Development in Clojure (https://pragprog.com/titles/dswdcloj3/web-development-with-clojure-third-edition/ https://pragprog.com/titles/dswdcloj3/web-development-with-c...)
- deleted 5y ago[deleted]
- ttymck 5y agoIt is a very good learning guide. Keep in mind I am someone who negotiates the borrow checker by adding-and-removing */&/to_owned() rather haphazardly. I found it especially satisfying to port the game from racketlib/rltk to bevy afterwards.
- rtoway 5y agoI was thinking of following the book but with Bevy. How do you replace bracket-lib?
- ttymck 5y agohow you replace bracket-lib is the core of the exercise. There's more than one way to do it. Translating the implementation to bevy on the fly as you read the book would probably be much more difficult than what I described.
- deleted 5y ago[deleted]