How to make roguelike games in Rust
bfnightly.bracketproductions.com
bfnightly.bracketproductions.com
The bfnightly tutorial is a very good tutorial, but I do want to warn that it's not always terribly idiomatic Rust: Herbert was using the writing of the tutorial as a way of practicing Rust, so there are places where the explanations aren't quite correct and other places where the code isn't what an experienced Rust programmer would write. An example that jumped out at me (this from Chapter 1.7) was the use of
&s.to_string()
which is an expression that could be shortened to just s. (Specifically, s has type &str, calling to_string() on it converts it to a String, and borrowing it allows it to be coerced back to a &str but now with unnecessary copying.) Elsewhere (this from Chapter 1.2) it has explanations like> Copy and Clone allow this [type] to be used as a "value" type (that is, it just passes around the value instead of pointers)
which is also not a correct explanation, or at least is a misleading one: things can still be passed by value even without Copy and Clone and without any pointers at all. (Arguably, he meant, "You can share the value without using borrows," but that's not what the explanation said.)
That said, all this is nitpicky (and I suspect that Herbert would be receptive to feedback along these lines—I just haven't had a chance yet to provide it!) because the tutorial's explanation of roguelike-writing is still very good, and in fact I've been following it as a rough guide for writing a tutorial on top of a different Rust library myself! But I do want to warn about using it as a model for learning Rust specifically.
They mean a nonlinear (or nonaffine) type, as opposed to a affine type - that can only be passed by reference if you don't want to get rid of it yet - which they would presumably call a "reference" (or "by-reference") type. It's a correct explanation, but ambiguous (not misleading, but perhaps confusing) terminology.
- rogue - (net)hack - moria, angband, etc
So it's... technically doable.
https://roguebit.bigosaur.com/
And it sold over 25000 copies so far.
It would still be trivial for the developer to add an “textshot” feature to export a frame to .txt, so I’d still qualify it as fitting the ASCII art aesthetic.
I was at first confused. Of course "real ttys" have some metal in their back end! (I'm too young and my default mental image of a "real tty" contains a CRT, but there's probably even more metal in a teletype.)
Any pointers on how to set up a grid of ASCII characters? That'd be what I would use tcod for. It seems like it should be easy, but I guess I don't know how to look for it.
Here, try looking at this gameplay video:
https://www.youtube.com/watch?v=u4RskXHDLzo&t=183s
It's hard to pick any point in that 75 minute video that would be a good trailer material. There's nothing visually spectacular except some static ASCII art and there's no surprise mechanics that would draw attention. The game itself isn't about ASCII art anyway, so having that in the trailer wouldn't make you learn much.
But then again, it isn't a game for everyone. It's for people who are into hacking, computer internals, binary/hexadecimal numbers or assembly/machine language.
http://www.zachtronics.com/tis-100/
https://store.steampowered.com/app/504210/SHENZHEN_IO/?curat...
https://store.steampowered.com/app/716490/EXAPUNKS/?curator_...
I think a gameplay trailer could be made from content from that video, by stringing together a series of short clips. Show the player moving around, manipulating things. Each clip a few seconds in length. Similar to the trailer for Exapunks, you could display text like "Solve puzzles" "Manipulate bits" "Hack your way to safety" (or whatever makes sense). Maybe end with a sequence where something drastic happens (the player does something and the whole screen changes), fade to black.
I think it'd be useful to show the player what the gameplay is actually like. Sure, it's not for everyone, but you can still show what it is.
Did you sell a lot more on Switch or something? I really would be surprised if an ASCII game could sell 20k on Switch.
I have 4 games on Steam, and "review to sale number" ratio is all over the place, so it isn't that easy to use for estimation. You can get some idea, but 2500 is nowhere close really.
> Did you sell a lot more on Switch or something? I really would be surprised if an ASCII game could sell 20k on Switch.
About 2/3 of the sales were on Switch. I was surprised as well. I meant the game to be Steam-only, and then some of the players asked for a Switch version. I was blown away after the first month of release.
IMHO, turn based (or just slow paced) puzzle games are awesome for Switch because of the portability. In the evening when the kids have finished playing their Zeldas and Dragon Quests, you can lay back and solve a couple of puzzles until it's time to sleep. Looking at my personal play times, the game I play on Switch the most is "Baba is You".
I know that review ratio isn't perfect but it's still a good rough estimate. It did in fact clue me in that the majority of your sales were probably from Switch.
Thanks for the response!
I'm creating a game right now and I can't get them to respond. I'd love to hear what worked well for you.
It's got features from festivals like IndieCade, and had really good Steam reviews during Early Access, so getting a dev. kit was relatively easy.
Rogue Bit came afterwards.
BTW, I tried to check out your game, but your websites (both .com and .us from HN profile) seem to be unreachable? If you're pitching to Nintendo, you need to make sure everything works and you present yourself as an established studio.
And thank you for the heads up, that means a lot to me -- There is intentionally nothing there at the moment.
Door in the Woods is ASCII only and has sold ~5,000 copies in about a month. In fact this game has inspired me to try to work on a pure ASCII roguelike for my next commercial project.
Not sure if that's a "YES" or a "NO" given your question.
I'm also excited to see that this one looks wasm compatible.
Mac OS would be a plus because both me and my friend use mostly Apple stuff at home.
I highly recommend Children of Morta for a co-op roguelike.
A telnet program should basically be enough to start playing. There are some "MUD client" programs that enhance the interface (dunno about MAC OS), and some sites offer enhanced web interfaces as well.
One of the most popular, Aardwolf [2] is very newbie-friendly.
For serious pvp+rp, Carrion Fields.
For non-ROM based RP MUDs, Achaea or the like (although these days you'd likely have to spend real cash there as well).
We used Discord voice chat to coordinate.
(I think it can scale to up to 4 different cooperative players - of course it is not turn based but from my previous experience with Torchlight first edition I think it is playable even if your reflexes are just average).
As a result, they've never really satisfied my roguelike itch tbh.
Also, if that multiplayer + grind/trade/build characters + sets is the main value you get from Torchlight, then probably consider path of exile, which pretty much optimizes purely on the multiplayer aspects of Diablo 2 (Torchlight lacks some purpose imo; they set out to do a better Diablo 2, but didn't really pick a place to optimize, and didn't do well enough at optimizing everything, and didn't really remove any fundamental flaws)
My theory that it won't happen without some form of inheritance-like structure. Games, like many forms of simulation, are inherently stateful and tends to fall hard on the OO-side of the Expression Problem spectrum. Traits tend to give you the best of both worlds, but in very important aspect it falls short: the traits themselves do not have data members. I saw a proposal where you could link object data members explicitly to data members that the trait required, which would probably fill that gap...but I don't think it has gone anywhere. Anybody know what I'm talking about so I can look up the progress?
I write rust professionally and people seem to strangely hype the language for many of it's non-usecases. A jackhammer should not be used to change your car tires.
Personally doubt the benefits outweigh the extra energy expenditure required over traditional options but good luck to them I guess, especially in an ever-monetised MMO world rife with cheating.
As someone who's poked around in the current Rust gamedev ecosystem a bit, the publicly available libraries and frameworks aren't quite there yet for mid-large games (and are probably 1-2 years away at least for serious 3D development), though recent developments like the Legion ECS[2] (Amethyst, imo the most promising Rust 3D game engine seems like it will be switching from specs to Legion[3]), and Ultraviolet[4] (linear algebra library specifically for games & graphics which is faster than the alternatives for both runtime and compile times) are very promising.
1. https://twitter.com/AndreaPessino/status/1021532074153394176
2. https://crates.io/crates/legion
3. https://github.com/amethyst/rfcs/issues/22 for a discussion about potentially moving from specs to Legion
`specs` takes advantage of Rust’s compiler to provide very clean separation of concerns, opportunities for parallelism, and a clear path for unit testing. It just takes longer for entrenched technologies to change in the big-budget space.
I’d contrast this with a more traditional “OO” game or Unity’s actor/prefab way of doing things.
It's clean, fast, readable, it supports themes.
I now want a LaTeX to HTML converter to this HTML.