
patoncrispy
Hands-on Rust: Adequate docs for bracket_lib
I’m new to Rust and am using this book to learn more as well as to feed my interest in game dev. I’ve just finished the flappy dragon example and wanted to go on and learn how to make modifications, but haven’t had much luck finding adequate documentation to get started.
I know the docs.rs link bracket_lib - Rust (docs.rs), but that doesn’t show me how to use the libraries features. There is also the Roguelike Tutorial ( Introduction - Roguelike Tutorial - In Rust (bracketproductions.com)), but that doesn’t show me how to use sprites, for example.
The best I could find is some of the existing examples, and the repo associated with the book, but by that stage it’s all figured out for me which kinda spoils things a bit.
Just wondering if anybody knows any documentation or simple examples of using bracket-lib without any ‘spoilers’ for the book? A ‘Getting Started’ guide with simple examples would be great!
Marked As Solved

herbert
Hi!
There’s a short tutorial showing how to go from Flappy Dragon to the bonus version on the book’s website: From Flappy Dragon to Flappy Bonus · Hands-On Rust
I agree that some extra documentation would be a good idea. For now, if you clone the Github repo (GitHub - amethyst/bracket-lib: The Roguelike Toolkit (RLTK), implemented for Rust.) and cd
into bracket-terminal
, you can type cargo run --example
and get a list of the examples (run by adding the example name, e.g. cargo run --example dwarfmap
). The source code for all of these is in the examples
directory. I’ve tried to annotate the examples to explain what’s going on.
I’ll try and get a better set of documentation posted at some point soon (it’s hard to give an exact timeframe). Some parts of the library are very mature/stable (the simple/sparse consoles, and probably the “fancy” console). Documenting those should be pretty straightforward. The sprite system is pretty new, so documentation for it will have to wait it to stabilize.
If you want to go far beyond the examples in Hands-on Rust, I recommend taking a look at the Amethyst and Bevy engines. Bracket-lib is designed as a teaching tool—so it sacrifices performance in the name of teach-ability in a few cases. Both Bevy and Amethyst use the same ECS approach as the book, and (especially Bevy) are developing a great body of examples and tutorials. I also know of at least one reader who implemented all of the book’s examples using Macroquad instead of bracket-lib, retaining the Legion and ECS elements. I’ve not used Macroquad enough to recommend or not-recommend it.
Popular Prag Prog topics










Other popular topics









Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /react
- /clojure
- /quarkus
- /go
- /react-native
- /vapor
- /v
- /wasm
- /django
- /security
- /nodejs
- /centos
- /rails
- /haskell
- /fable
- /gleam
- /swift
- /deno
- /js
- /tailwind
- /assemblyscript
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /preact
- /c-plus-plus
- /flutter
- /actix
- /java
- /angular
- /ocaml
- /kubuntu
- /zig
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /emacs
- /vuejs
- /nim
- /elm
- /nerves