Live data from Hacker News

How to make roguelike games in Rust

bfnightly.bracketproductions.com

21–30 of 77 posts

Re: How to make roguelike games in Rust

#21
post #19

Ask HN: are there any roguelike games that can be played (collaboratively) by two players on remote connection? Mac OS would be a plus because both me and my friend use mostly Apple stuff at home.

Steam has a remote play feature now that allows another player to join a game, even if they don't own it. It's been semi-spotty.

I highly recommend Children of Morta for a co-op roguelike.

Re: How to make roguelike games in Rust

#22
post #19

Ask HN: are there any roguelike games that can be played (collaboratively) by two players on remote connection? Mac OS would be a plus because both me and my friend use mostly Apple stuff at home.

There is a wonderful multiplayer roguelike for the Commodore 64. https://m.youtube.com/watch?v=ASGn5J9PHbs

Re: How to make roguelike games in Rust

#23
post #2

This is great, thanks for sharing it. I started a Rust project awhile ago to do something similar but based on a boardgame. It was fun but I didn't keep up with it. I'll try to get back at it using this as inspiration!

Was it to learn Rust or were you already familiar with the language?

Re: How to make roguelike games in Rust

#24
post #2

This is great, thanks for sharing it. I started a Rust project awhile ago to do something similar but based on a boardgame. It was fun but I didn't keep up with it. I'll try to get back at it using this as inspiration!

Yeah, I agree - this is a terrific read, and seems like a nice way to jump into Rust, a language I am eager to explore .. lots of strange new idioms, and from the perspective of a rogue-like, nicely done .. will give me a bit of Rust chops anyway! Thanks!

Re: How to make roguelike games in Rust

#26
I said this in a previous comment on a different story, so I'm going to copy-paste the content of that comment with some minor edits:

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.

Re: How to make roguelike games in Rust

#27
post #3

Are there commercially successful roguelikes that use ascii art only? Dwarf Fortress is the only one I know of and it's getting an official makeover for the Steam release.

I don't know about roguelikes success (Cogmind comes to mind), but I can tell you that ASCII games can be successful if you have a good idea. For example, I spent about 2 months making Rogue Bit just over a year ago: https://roguebit.bigosaur.com/ And it sold over 25000 copies so far.

The trailer did not really show me any game play. So I can not judge it and see if I want to buy.

Re: How to make roguelike games in Rust

#28
post #19

Ask HN: are there any roguelike games that can be played (collaboratively) by two players on remote connection? Mac OS would be a plus because both me and my friend use mostly Apple stuff at home.

Mangband (multiplayer-angband) has a Mac OS port of both client and server: https://mangband.org/

Re: How to make roguelike games in Rust

#29

Earlier quoted context omitted.

I don't know about roguelikes success (Cogmind comes to mind), but I can tell you that ASCII games can be successful if you have a good idea. For example, I spent about 2 months making Rogue Bit just over a year ago: https://roguebit.bigosaur.com/ And it sold over 25000 copies so far.

The trailer did not really show me any game play. So I can not judge it and see if I want to buy.

Showing gameplay would be pointless because 99% of the gameplay is in player's head, analyzing the code, maybe even writing some down on paper. If you just look at the screen, it doesn't make much sense.

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.

Re: How to make roguelike games in Rust

#30

I said this in a previous comment on a different story, so I'm going to copy-paste the content of that comment with some minor edits: 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…

> > "value" type

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.

Post reply on HN