Hacker News new | ask | show | jobs
Show HN: You Are Merlin – a Rust CLI and WASM Text Adventure Game (hseager.github.io)
12 points by hseager 766 days ago
This is my first Rust project which I got a bit carried away with. It was a great way to learn different parts of Rust and had jump some hurdles when building for WASM, like not having access to loops, std or DateTime.

I'd appreciate any feedback of improvements, new features or themes to add. Thanks!

Github: https://github.com/hseager/you-are-merlin

2 comments

Very fun! Short little games where it's possible to power level, spend 30 minutes playing and then move on. Not bad.

Replayability is low, once you have the structure of "take down a few monsters, get some items, rest often, rinse and repeat until your power level is high enough to steamroll the enemy" then that's about it, but it was still a fun 30 minutes figuring it out.

I also felt that little dose of dopamine/serotonin when I got cool items whose names I knew, so that was very cool.

Played it in LotR mode. The attack speed system was quite interesting!
Thanks for playing!

I had issues implementing the attack speed because it requires the current time, and WebAssembly doesn't have the concept of date time that I'm aware of (or at least Rust's std lib for it).

I ended up sending up the current epochmilli from the client as an i32 and used that to check the timings, which seems to work well enough for this.