It’s been a pretty productive year, and I’m hoping for another one! I’ve worked on quite a bit, so I thought I’d include them all in here. You can follow my development: @herberticus on Twitter.
One Knight in the Dungeon
2019 Retrospective
One Knight started in early-to-mid 2018, originally intended as a quick project to learn Unreal Engine 4 (with a view to using it for the Nox Futura back-end). I set out to make a traditional roguelike, but with modern - pretty - graphics. By early 2019, it was starting to feel like a game - and people who saw it wanted to play it. So I spent some time polishing it up, and eventually got it up on itch. Feedback Friday was eye-opening: the game was really unstable on PCs other than mine (apparently I have the magic combination of libraries and similar), and while people said “this looks good” - it didn’t run at all well for a lot of users. Fixing it turned out to be really hard: it’s really stable on my dev laptop!
It’s been through several more iterations, and is reasonably playable/stable most of the time now - but I’ve learned an important lesson: UE4 just doesn’t work the way I like to write. So the proper way to fix it up for an eventual release would be to rewrite it using UE4’s native approach. I’ve been having difficulties motivating myself to do this, so for now - One Knight is a frozen project.
One huge achievement: there isn’t a single paid-for asset in the game. I achieved it with a budget of $0!
2020 Outlook
I’m not sure if I’ll fix this project, but I have learned a lot from it. My 3D skills are vastly better, and I’m pretty sure I don’t want to try and get Nox Futura working in UE4! Sure, the graphics are better - but the engine itself just doesn’t gel with how I like to work. The concepts from One Knight live on in other projects, and it has definitely made me a better programmer overall.
Links
Roguelike Toolkit - Rust Edition (RLTK_RS)
When 2019’s Tutorial Tuesday series hit, I decided it was time to learn Rust - and use the tutorial as a means for doing so. I completed the test project, and more importantly - realized that I really like working in Rust. It’s like the better parts of C++ with an added safety net, and with a really cohesive build system that freed me completely from having to remember how on Earth CMake
(or whatever) does things.
2019 Retrospective
To support the tutorial game, I needed a back-end library. There are various ports of tcod
available for Rust, but I wanted to really understand how things were working - so I made my own back-end. This wasn’t a hugely new thing, since I’ve done the same in C++ (this was my first real Rust project, however). It didn’t take long to get a basic OpenGL window going with a Codepage-437 console display in it, and I gradually added features I knew I’d need for the tutorial.
I figured that would be it: a basic CP437 terminal with GUI,event-loop helpers and an easy-to-use XorShift
RNG was all I needed. I decided to write up my tutorial (see below), and suddenly instead of a handful of stars on Github I had 50 or so. I wanted to make the tutorial more interactive, so I did some back-end work to make it work with both Web Assembly and native OpenGL - and more people started flooding in. PRs and bug reports starting hitting. The tutorial just kept growing, and RLTK kept growing to support it!
After a conversation with some of the people behind the Amethyst Engine (one of Rust’s more popular engines, and one that has a lot of potential in my view), RLTK gained support for Amethyst as a back-end. Since I was going back-end agnostic, I also added pancurses
as a backend: on Windows, it’s pdcurses
- on *NIX, it’s ncurses
. So with different feature flags, it can do console, OpenGL, WebGL, Vulkan and Metal (and now has users on all of them!). Around November, I published it on crates.io, and was amazed to see that people are using it! The Github exploded to 230 stars, 10 direct contributors, and a bunch more via bug reports and email. It’s gained everything from string-based dice rolling (so you can rng.roll("1d20+3")
if you so wish) to really fast line drawing (the SIMD vectorized version is down to nanoseconds for a line, now), fast path-finding (A-star and Dijkstra, the latter with threaded options).
2020 Outlook
My plan is to keep supporting RLTK, make the tutorial generators into a library, and as Amethyst gets a better Web Assembly story move towards it as a default back-end. There’s a potentially huge project in the works, but it’s premature to announce it (it isn’t solidified enough yet for me to be sure it’s happening) - so sadly, I have to keep that part a mystery.
There is a roadmap in place for RLTK, but I’m keeping it private. It will hit 1.0 at some point in the future, but there’s a lot of features planned from better scaling support to better exposing of the underlying libraries to let you do your own thing more easily - along with some Text UI work and similar.
Links
Rust Roguelike Book
2019 Retrospective
As I mentioned for RLTK (the two are inseparable!), I initially started out following the excellent Python+TCod tutorial, translating over into Rust. That worked, but I didn’t feel like I was really taking advantage of the new platform. I’m also a really big fan of Entity Component Systems, so I figured I’d like to write the tutorial game using an ECS for data storage. I picked Specs
as my Rust ECS, and off I went. I also thought I’d write chapters on my progress so that others could benefit from the learning experience.
A few weeks later, and I had Section 1 going from Hello Rust to a game that implements 99% of the Python tutorial. A lot of people were pretty complimentary about the tutorial, and I realized something really important: my goodness, I love writing tutorials. So I dived into section 2, which is basically stretch-goals for the original - from bloodstains and (really primitive) particle effects to REX Paint imported menu graphics, traps and a hunger clock. I honestly thought I was done at this point, so I took the time to add Web Assembly support, pretty up the book a bit, and let you play each chapter’s progress in your browser.
I started getting PRs and bug reports on GitHub, a noticeable uptick in donations, and analytics showed me that a handful of people were visiting the book on a daily basis. That made me think, “I know - I’ll write a bit about procedural level generation”. It’s something I’d been wanting to work on anyway, so I knocked out about 20 chapters ranging from your basic BSP-based room dungeon to full-blown Wave Function Collapse - alongside a layered system designed to let you chain lots of “builders” together to make something cool.
I tweeted out my WFC code, and suddenly things exploded. Rust, Rust-GameDev, Amethyst, and a few others picked up my tweet and retweeted. People kept retweeting. At one point, my phone was buzzing so hard it jogged across the table and hit the floor. Suddenly, my tweet had around 20k impressions, 3.5k media views and hundreds of engagements! My analytics showed that I had thousands of impressions on that chapter. Donations exploded, too - both Patreon and one-off. More importantly, contributions to the book and code-base started flooding in, and I found myself maintaining a relatively popular project. There’s now 15 book contributors credited in the latest build.
I decided that I’d wrap-up the book by finishing the game. It’s mostly lessons learned from One Knight, wrapped into a tutorial format. So section 4 was born: starting with a design document, and working through data-driven design, procedural generation tailored to match the design document level outlines, and features ranging from Experience Points to Vendors, Town Portals to Spells. It’s nearly finished, and I’m now averaging around 4,000 unique readers per month (on Google Analytics, which doesn’t count everyone who - like me - blocks trackers; the actual web server logs show about 2-3x that).
One of the folks behind the Amethyst Engine contacted me to let me know that the engine devs were enjoying the project (as I mentioned in RLTK, I promptly supported their engine!). We talked for a bit, and he explained that since they were now maintaining Specs
(the ECS I’ve used), they felt connected to the project - and really liked how it explained the whole ECS setup and brought people into the fold. We continued to talk, they helped me with some rough spots getting the systems talking to one another (and really helped me fix up some issues resulting from my not understanding part of their project!).
2020 Outlook
I have a well-defined “finished” goal for the book, and I’m only a few chapters away. Then, it’ll be time to go back over the book and Fix All The Things - including trimming quite a few chapters that implement things that are now available in the RLTK library (some are way too hard for a tutorial, and belong in libraries; some are just tedious!). Once that’s done, it’s maintenance mode for this book.
Thanks to the book, I’ve gained a couple of consulting tasks! It’s quite unlike consulting I’ve done before: rather than writing code for clients, I’m helping clients write their own code. I really like it, I’m wondering how I can do more of it!
There’s also the Mystery Project, which I really wish I could talk about (I don’t want to announce something that may not happen).
I believe the final version will be hosted by the Amethyst Project. We’re not 100% there on details yet, but it’s in the works. I’m not a big fan of maintaining both the server and the book, so this would be a big weight off of my mind - and since the project is so closely tied to Specs, an Amethyst project - it makes a great deal of sense.
Finally, expect to see some support for Legion - the much faster and generally better ECS successor of Specs in the future!
I’d like to quickly mention the Rust community. They are awesome! Friendly, helpful, and really patient with a C++ guy trying to learn their language. :-)
Links
Nox Futura
2020 Outlook
I basically took 2019 off from NF, so I won’t include a retrospective - but I’d like to mention that I hope to get back to it this year. I feel like the project lost its way when I looked into UE4 as a back-end; it was lovely to look at, but felt too much like trying to write underwater in a straight-jacket. So the eventual failure of One Knight has provided a valuable (if sad!) lesson.
I’m really tempted to migrate to Rust, just because I’ve found a language I love working with. If the “big secret project” falls through, I’m seriously considering using Nox Futura development as a serialized publication. It wouldn’t be that different from my Sharing Saturday essays, but would give me the opportunity to really help some people while doing what I love: making a humorous game in which everyone dies horribly.
Links