Aimlessly Going Forward

blog by Tomas Sedovic

Roguelike Turorial in Rust and tcod

A port of the Python+libtcod tutorial into Rust (using the tcod bindings for libtcod).

It has all the 13 chapters following the original tutorial, but there’s certainly an opportunity for more.

Here’s the rendered version of the tutorial:

http://tomassedovic.github.io/roguelike-tutorial/

It’s the first time I’ve used AsciiDoc. I’ve been reading about it for a while and basically, this sounded like a great opportunity to give it a go. The basic formatting is essentially as simple as Markdown, but you can do a ton of additional stuff. What really hooked me was the ability to highlight lines of code from a snippet and providing a detailed explanation of those lines below.

Plus the fact that it’s as expressive as DocBook without the insanity.

I’ve read the Asciidoctor tutorials, which were pretty cool. In the end, I’m really happy with the result. Github renders asciidoc stuff just fine, so all documents are directly previewable from the source repository.

Basically, if I’m ever writing something more complex than a blog post (another tutorial or shudder a book), chances are, I’ll go with AsciiDoc again.

The repository with the tutorial text and code samples:

https://github.com/tomassedovic/roguelike-tutorial

After finishing all 13 chapters, I wrote a blog post where I summed up my thoughts and experience.

Three years later, I’ve updated it to use “literate” programming, generating all the Rust source code from the tutorial code itself, making sure they never go out of sync.

Overall, I’m reasonably happy with the result and the feedback I got from people trying it out was positive. I’d like to spend a bit more time cleaning it up and making the code more Rustic, but it’s already taken a lot of time and I’d like to focus on other things so no promises.

Screenshot and link to the website for the Dose Response game

Hi! I wrote a game! It's an open-world roguelike where you play an addict called Dose Response. You can get it on the game's website (pay what you want!), it's cross-platform, works in the browser and it's open source! If you give it a go, let me know how you liked it, please!