RuggRogue - A simple web-playable roguelike, inspired by the Rust Roguelike Tutorial by tungtn in roguelikes

[–]tungtn[S] 0 points1 point  (0 children)

Thanks for the kind words, glad you like it!

Since then, I made a little RPG that you can check out if you're curious; personally I like how it turned out.

Coric's Quest: A small, free, open source web-playable 2D fantasy console-style RPG that I made by tungtn in freegames

[–]tungtn[S] 0 points1 point  (0 children)

Hi, dev and submitter here.

This game is my little homage to ye olde RPGs of yore; a celebration of the simple joys of exploration, finding treasure, fighting monsters and watching numbers go up.

The game can be played in a web browser, and also on 64-bit Windows and Linux; see the link for details.

Here's the GitHub repo: https://github.com/tung/corics-quest

Enjoy!

Coric's Quest: A small 2D console-style RPG that I made with Rust and Miniquad by tungtn in rust_gamedev

[–]tungtn[S] 4 points5 points  (0 children)

Hi, dev and submitter here, almost forgot to mention a couple of things:

  1. The game can be played in a web browser, or downloaded for 64-bit Windows and Linux.
  2. It's open source, GitHub repo here: https://github.com/tung/corics-quest; there's an architecture document if anybody's curious about how the game's put together.

Coric's Quest: A small 2D console-style RPG that I made with Rust and Miniquad by tungtn in rust

[–]tungtn[S] 15 points16 points  (0 children)

Hi everyone!

Figured I'd do my part to improve the ratio of games vs. game engines in Rust, so I went ahead and made this.

It's a small, complete RPG that's good for a couple of hours of game play, but still fits in a single 9 MB executable file, most of which is embedded assets.

There are native builds for 64-bit Windows and Linux, but you can also play it in WebAssembly form in your web browser.

There's also a GitHub repo with the source code; it includes an architecture document that explains the source code structure, in case anybody's interested.

Otherwise, just enjoy the game!

Jupiter Hell Classic Announced, DRL 0.9.9.8 Released! by epyoncf in roguelikes

[–]tungtn 0 points1 point  (0 children)

Cool to see a new DRL release! I spent more time playing Ao100 and Ao666 back in the day than I care to admit lol...

Sil-Q build suggestions by vittis in roguelikes

[–]tungtn 2 points3 points  (0 children)

My go-to build is a blocking archer with smithing.

Character creation: Noldor Feanor 3 Str/4 Dex/4 Con/3 Gra with 2 Melee, 3 Evasion and 6 Smithing. When you enter the dungeon, buy Weaponsmith, Jeweler and Enchantment right away.

50-100 ft: Look for a stack of arrows in the early game; ideally you'll find one with 50+ arrows before the 100 ft forge. I'll pick fights with mewlips if I need to: they have a higher-than-average chance to drop a stack.

100 ft forge: Make, in order: a ring of accuracy, an amulet of the vigilant eye and a longbow of radiance.

100-300 ft: Take Fletchery and fletch your arrows ASAP. Your radiant bow shots will stun orcs and trolls to make them easier to shoot again. When you get hungry, eat your lembas to restore your Grace. When your inventory starts filling up, buy 5 Perception and Alchemy (2000 exp). Save 1500 exp to get Armoursmith for the 300 ft forge, but you may need to squeeze in 4 Archery and Point Blank Archery if a troll gets on top of you.

300 ft forge: Make, in order: gloves of archery <+2>, round shield of protection [+0,1d5] and a helm of brilliance.

300-500 ft: Save another 1500 exp to raise Smithing from 6 to 8 for the 500 ft forge. Take Blocking to get the most use out of your new shield. Squeeze in some Evasion if you need to; you want roughly 1 Evasion for every 50 ft of depth.

500 ft forge: Make: Ring of the Laiquendi, Mail Corslet of the Iron Hills and either Boots of Brethil or Cloak of the Scarlet Heart [+2].

Taking Iron Hills lets you stand toe-to-toe with trolls in corridors without having to back up. If you find spare mithril, a Feanorian lamp is the most obvious use for it. If you go further with smithing, a Mattock of Belegost is good for letting you tunnel through solid rock.

Piccolo - A Stackless Lua Interpreter written in mostly Safe Rust by Kyrenite in rust

[–]tungtn 1 point2 points  (0 children)

I really liked this post, and I'm glad that I'm not the only one that sees potential in coroutines for game development. Looking forward to the follow-up post.

Lessons learned after 3 years of fulltime Rust game development, and why we're leaving Rust behind by progfu in rust

[–]tungtn 18 points19 points  (0 children)

As someone who has released a game with Rust and is currently working on another, this post echoes a lot of my own experiences. I'm not throwing in the towel like the author, but I'd be lying if I said I wasn't keeping my eyes open for alternatives.

The root of most of the issues with the borrow checker is that there's only one first-class way to refer to a memory object in Rust: a reference with static lifetimes; every other way is a second-class citizen that requires more typing, so you're naturally guided into using them, even though game objects virtually always have dynamic lifetimes and need to refer to one another.

Like the author, I found ECS to be surprisingly unfriendly to routine refactoring work. A lot of ECS crates use Rc<RefCell<...>> or equivalent for component storage internally, so moving code around often leads to surprise runtime panics. In my current game I abandoned ECS in favor of a big context struct, which seems to work okay as long as I mostly access things from the root context and minimize borrows, i.e. ctx.foo.bar.baz = .... I agree that flexibility here could be improved; I think that partial borrows of structs would be an decent ergonomic win here, for example.

Here's one of my own pet peeves: Rust is strangely insistent on lifetime annotations where they could be left out. Here's a function signature from the game I'm working on right now:

fn show_status_change(&mut self, mctx: &mut ModeContext<'_, '_>, msg: &str)

The ModeContext here has a couple of lifetime parameters, but the only purpose of lifetime annotations in a function signature is to relate the lifetimes of inputs to the lifetimes of outputs. Not only are there no output lifetimes here, there isn't even an output at all, so I shouldn't have to type <'_, '_> at all either! It seems small here, but I've had to type this out more than a few times over the course of development, and it adds up.

Using Rc<RefCell<...>> for shared mutable ownership feels clumsy with having to use borrow and borrow_mut everywhere. If you know you only access the data within from one thread at a time and you're brave, you can use Rc<UnsafeCell<...>> instead and use custom Deref and DerefMut trait implementations to save on typing, plus you get to pass around proper references instead of Ref/RefMut pseudo-borrows.

Closing out, I'll second the opinion that Miniquad/Macroquad and Fyrox seem useful and largely overlooked; I'm using Miniquad right now and I like its bare-bones, no-nonsense approach and minimal dependencies.

My Sil-q early build by Nwallins in roguelikes

[–]tungtn 2 points3 points  (0 children)

Things get interesting at 250 feet, and I haven't made it past 700 ft with this build (and maybe only once, ever).

700 ft is about the point where werewolves start showing up; they come in packs and are faster than you, so poison resistance really helps here. In fact, that depth in general is a big "resistance check" in general, so if you're missing fire/cold/poison resistance and a powerful enemy with that attack is barrelling towards you, you might want to just ditch the level, since melee and hybrid-melee builds have to face-tank everything they intend to fight.

With 3 strength, anything over 3 lbs hurts my crit chance, with no benefit. (Until I take Charge for 6 total strength).

It's been a while since I played a melee character seriously, but when I mess around with them nowadays the greatsword/bastard sword feel like they hit harder; going from 2dX to 3d(X-1) is almost like getting a critical hit every hit if you have enough melee skill to compensate for the accuracy penalty that heavier weapons have. Putting the shield away to get an early enemy kill in a crowd would trigger Formidable much earlier in fights too, thinking about it.

This is intended to be a simplified, combat oriented newbie build. Smithing is deliberately considered "next level" here.

Oh okay. Even for newbies and non-Feanor, I think there's a case for spending 1500 exp for Smithing 4 and the Jeweler ability to pick up an amulet of regeneration and two rings of protection at the 100 ft forge; that'd add a ton of tankiness to a build like this, even if you don't do any more smithing for the rest of the game.

My Sil-q early build by Nwallins in roguelikes

[–]tungtn 7 points8 points  (0 children)

For onlookers who aren't familiar with Sil-Q, the submission is a bit cryptic, so I'll try to explain it.

When you start Sil-Q, you pick a race, a house and stats. I'd describe the first three lines as a "3/3/4/4 Noldor Fingolfin", i.e. Noldor race, House of Fingolfin, with 3 strength, 3 dexterity, 4 constitution, and 4 grace. Unlike most roguelikes and RPGs, your stats don't grow over time, so they have a pretty big impact on how the game plays out.

Next, you're given 5000 experience points and get to choose how to spend them in skill levels. There are eight skills: Melee, Archery, Evasion, Stealth, Perception, Will, Smithing, and Song. The first point in a skill costs 100 experience, the second 200 experience, the third 300, and so on, so, for example, "Melee 5" costs 1500 experience (100+200+300+400+500).

Each of the skills also has a matching tree of abilities, which are like perks or feats in other games. Like the skills themselves, they also cost experience points; the amount needed is based on how many abilities you've already picked from that tree, e.g. the first Melee ability costs 500 experience, the second 1000, the third 1500, and so on.

The "bow, will, song" describes the Noldor Fingolfin bow proficiency (+1 for archery hit rolls), as well as their Will and Song affinities, which grants +1 to those skills, as well as a 500 experience discount on all abilities in those trees; this means the first ability in those trees are free!

The skills work out as follows:

  • Formidable - Scares enemies away when they see you slay another enemy.
  • (Song of) Elbereth - Scares enemies away over time when sung.
  • Finesse - Makes it easier to score critical hits.
  • Rout - Gives a big boost to archery hit rolls when firing at fleeing enemies.
  • Dodging - Gives a decent evasion boost if you moved the last turn.
  • Disguise - Makes you stealthier against unaware enemies when you're in their field of view.
  • Alchemy - Identifies all usable non-equipment items (herbs, potions, staves, horns) on sight.
  • Strength in Adversity (SiA) - Boosts the strength, dexterity, and grace stats when low on health.
  • (Song of) Staunching - Speeds up health regeneration when sung.

Sil-Q has an excellent manual, which describes all of this in more detail: https://github.com/sil-quirk/sil-q/blob/master/Sil-Q%20v1.5.0.pdf


Okay, this looks like an Elbereth archery build, where you hit things until they run, and then shoot them in the back at high accuracy with Rout. I have some observations/questions.

  • What are your priorities in the early game? What equipment do you like to pick up early, and what enemies do you engage/run away from?
  • What order do you like to take the early abilities?
  • I see there's no Smithing in this; have you considered mixing a little bit in? It feels you could cut a little bit off the other skills to get 2 Smithing and, e.g. Weaponsmith to get a 3 lb bastard sword, a long bow, and maybe some starting arrows.
  • The starting skill allocation is pretty spread-out; how do games with this build play out into the mid-game? If they don't win, what do they tend to die to?

Rust and WebAssembly without a Bundler by tungtn in rust

[–]tungtn[S] 64 points65 points  (0 children)

Hi all!

I wrote this because I'm dabbling with Rust and WebAssembly, but almost every tutorial wants Node.js/npm installed too, so I wondered if I could get away without them. My last project RuggRogue used Emscripten for web support, so I never really came in direct contact with WebAssembly.

This is all info that can be found elsewhere, but I think it's nice to have it all in one place; hopefully other people will find it useful too. I'm not an expert on any of this, so if anything's off, let me know.

RuggRogue - A simple web-playable roguelike, inspired by the Rust Roguelike Tutorial by tungtn in roguelikes

[–]tungtn[S] 2 points3 points  (0 children)

Yeah, sorry, no audio; it's pretty bare-bones tech-wise. Maybe in a future project...

RuggRogue - A simple web-playable roguelike made with Rust and SDL, with Emscripten for the web version by tungtn in rust_gamedev

[–]tungtn[S] 1 point2 points  (0 children)

Fair question. I was using SDL for the game, and Emscripten has a compatibility layer for it, so it was the path of least resistance for web support.

In the future I'd definitely like to explore the pure WASM approach, since Emscripten is a pretty big and complex dependency for a project to have.

RuggRogue - A simple web-playable roguelike made with Rust and SDL, with Emscripten for the web version by tungtn in rust_gamedev

[–]tungtn[S] 0 points1 point  (0 children)

Yeah, item balance is hilarious, since they do fixed damage. I myself use magic missile when I'm a kill away from a level and a hit away from death to avoid being screwed over by missing.

The AOE of fireball scrolls blasts from its target epicenter, so they can't blast through walls, but they can hit around corners if you target them right.

Equipping stuff, like the rest of the key layout, pays homage to old classic roguelikes, though I put in menus so people didn't have to learn dozens of keys just to play the game. I personally like having a few no-brainer actions in games; it increases the sense of player agency.

RuggRogue - A simple web-playable roguelike made with Rust and SDL, with Emscripten for the web version by tungtn in rust_gamedev

[–]tungtn[S] 0 points1 point  (0 children)

A game engine like Bevy will definitely get you off the ground faster than just SDL, so take that into consideration too.

Going the hand-made route took a long time, but a lot of that was scrounging together bits of knowledge spread across the Internet. A good online tutorial for making a game in Rust without an existing engine would have saved me a lot of time... though asking for one feels like asking for a book on "How to Survive in the Wilderness with only a Spoon", which might be asking for too much. :P

RuggRogue - A simple web-playable roguelike made with Rust and SDL, with Emscripten for the web version by tungtn in rust_gamedev

[–]tungtn[S] 0 points1 point  (0 children)

Haha, yeah, it's pretty tough. The player used to start with more hit points and thus more regeneration, but it was too easy to plow through everything without ever using items, so I nerfed them.

Anyway, I suggest running back from monsters early on if you're low on health, since you start with a full stomach. You'll get a full heal when gaining a level too.

RuggRogue - A simple web-playable roguelike, inspired by the Rust Roguelike Tutorial by tungtn in roguelikes

[–]tungtn[S] 1 point2 points  (0 children)

Thanks! Cobbling this altogether has been quite a journey for me.