1. 33

Posted in the what are you working on thread earlier this week, and finally consider this releasable.

Armok Web Services is a collection of scripts and frontend JS code that lets you host a Dwarf Fortress session in a web browser using xpra. For now, the frontend is partially pulled from the xpra reference client, but the plan is to modify it a bit to fix some more issues. It also includes configs to deploy the whole package as a NixOS container.

Play (and try not to ruin the AWS instance I made for you all) at https://lobsters:armokweb@armokweb.numin.it (that’s https://armokweb.numin.it, username lobsters, password armokweb).

Source is available at: https://github.com/numinit/armokweb. It should work on multiple Linux distributions.

That AWS instance will go down when the money runs out. Using dfhack to mine cryptocurrencies on the AWS instance will accelerate this greatly. And, no, the container doesn’t have network access. Play nice :-)

  1. 10

    Community projects + fun like this are one of the most rewarding features of an online community. When this ends, please do post a writeup and I’ll add it to the site trivia.

    1. 3

      I’ll make sure to upload the world somewhere too, if it’s intact once the money runs out.

      1. 5

        upload the world somewhere too, if it’s intact once the money runs out.

        Out of context, that quote feels eerily descriptive of the current state of affairs in meatspace.

        1. 1

          We’re currently at a pretty reasonable burn rate, so my AWS budget should last a few days.

          I’m doing 30 minute interval snapshots in case things get borked beyond repair, so someone let me know if that happens.

      2. 2

        Oh, wow that’s pretty neat. I might install an instance somewhere on my server…

        Super awesome work!

        1. 3

          Thanks! In case it’s useful, here’s the full /etc/nixos/configuration.nix for the AWS instance.

        2. 2

          Moving the viewport works, including in the z axis, but various menu keys like k and a don’t seem to work for me. Mouse input worked so I was able to inspect things without k, but the mouse cant cover every function. Is this me doing something wrong or is there an issue with the keyboard input?

          Also, I was not clear on whether each player has their own viewport rendered or, whether it is simply a standard df client rendered in the browser. i.e. If I change z levels, does that change it for every user or just for me?

          1. 3

            It’s shared between everyone. As for keyboard input… try toggling caps lock. That’s one area that needs some work.

            1. 1

              I believe it’s literally just shared windows.

            2. 2

              I feel like this would be a great way to help teach someone how to play Dwarf Fortress. Cool project.

              1. 2

                This is awesome! I’ve actually been tinkering with the idea of hosting a DF instance elsewhere and playing remotely. Anything to keep my laptop from burning my legs. You read my mind!

                1. 1

                  down already?

                  1. 1

                    It cost $25 to host for a week on AWS. Not the cheapest thing. :(

                  2. 1

                    Doesn’t seem to work for me; it feels like I have a CTRL key pressed down, because hitting “l” in the Lua console clears the screen.

                    In the DF window, only my arrow keys work, and “i” for some reason - I appear to be able to designate zones, but not view units.

                    1. 2

                      There are a ton of keyboard issues that xpra is probably having a hard time handling. It might be holding a key that someone else pressed, so you might have to send both a keydown and keyup event to cancel it.

                      In any case, just restarted it to fix a DPI scaling issue with Therapist that’s been on the backlog but I haven’t been able to figure out yet.