Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Online DF game server: DorfServer 1.0  (Read 7627 times)

johnstein

  • Escaped Lunatic
    • View Profile
Online DF game server: DorfServer 1.0
« on: July 19, 2014, 01:19:34 pm »



If you've ever played Dungeon Crawl: Stone Soup, you are familiar with how this kind of online (ssh only for now) game server works.  You connect to the server lobby, log in to your account, then select the game version you want to play.  The game server fetches the version you requested and off you go to play it.  Other people connected to the lobby can even watch you play, LIVE.



The way that crawl does this is via something called dgamelaunch, which is a custom shell that a ssh user uses to interact with the server. (Crawl also has a webtiles server, which is beyond the scope of this post)

I've used the crawl setup as a template to get Dwarf Fortress working the same way.
Connect to the lobby, log in, select DF version, and the server does some behind-the-scenes magic to serve you the game and add you to the current games list in the lobby.

It's pretty rough so far, but it (mostly) works.



Current Github
Wiki outlining the arcane steps required to set up your own server

You can also test it out for yourself by ssh-ing to the following location:
Spoiler (click to show/hide)

If things look 'funny' you may need to tweak your ssh client.
Spoiler (click to show/hide)

I consider this a prototype rather than a nicely polished "production" solution. It works, but there's a lot of rough spots still. The biggest is the resource overhead. DF likes to peg my VPS processor to 100%.  For this reason I've had to limit the number of simultaneous players on my server.

I don't plan on working much on developing the idea further. I'm looking at some alternative options for DorfServer 2.0, but those are long-term plans.  I want to share what I've been able to get working with folks who may be interested in adopting it or taking it further. 

Ideally, someone far smarter than I can address some of the rough spots I wasn't able to polish and can afford to throw more hardware to power a bigger server (and have the time to properly admin it).

Please go nuts and do whatever you feel you need to do to make this work better. I'm not an expert on the dgamelaunch stuff, but I do run a (the smallest) official Crawl Server, so I do have a bit of background. I leaned heavily on the other Crawl server admins for help when setting this up for DF, so don't hesitate to ask questions if you get stuck.

Known Issues:
Spoiler (click to show/hide)


Here is the GitHub README with a bit more info
Spoiler (click to show/hide)



« Last Edit: July 19, 2014, 11:53:42 pm by johnstein »
Logged

Bloax

  • Bay Watcher
    • View Profile
Re: Online DF game server: DorfServer 1.0
« Reply #1 on: July 19, 2014, 02:31:46 pm »

The only downfall of this is that you're stuck with whatever fonts you have, and there aren't any decent DF fonts available.
Logged

oh_no

palu

  • Bay Watcher
  • Viva la resolution
    • View Profile
Re: Online DF game server: DorfServer 1.0
« Reply #2 on: July 19, 2014, 03:42:51 pm »

Another DFterm clone. Cool. I'll have to check this out when I get the chance.
Logged
Hmph, palu showing off that reading-the-instructions superpower.
The internet encourages thoughtful, intelligent discussion and if you disagree I hate you.
DFHack DF2015 progress:

Nopenope

  • Bay Watcher
    • View Profile
Re: Online DF game server: DorfServer 1.0
« Reply #3 on: July 19, 2014, 04:41:37 pm »

This is extremely cool but you should probably post it on the Utilities forum.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Online DF game server: DorfServer 1.0
« Reply #4 on: July 20, 2014, 08:18:53 pm »

The only downfall of this is that you're stuck with whatever fonts you have, and there aren't any decent DF fonts available.
I have one particular font which works quite well with Nethack in IBMgraphics mode (I use it on nethack.alt.org), and I've successfully used it with Dwarf Fortress in TEXT mode; unfortunately, it's a Codepage-437 bitmap font and thus won't work properly in PuTTY's UTF-8 mode.
« Last Edit: July 20, 2014, 08:20:38 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

illiterate

  • Bay Watcher
  • [THRIVES_ON_OBSCURITY]
    • View Profile
Re: Online DF game server: DorfServer 1.0
« Reply #5 on: July 21, 2014, 02:18:36 pm »

I'm feeling a bit ignorant here. I specified the ppk key in putty but I still just get the login prompt when I connect.

What am I missing on how to create a login?

Logged
"I accidentally dislodged a single tile at ground level while trimming the hill around the fortress entrance, and it punched through a lava moat, a gem stockpile and a bone stockpile before coming to a halt in someone's bedroom.  The bedroom's owner, a planter, was in bed at the time, and he got up and walked to the door just in time to get a coating of lava, gems, bones and scorched legendary miner chunks."  -NCarter

johnstein

  • Escaped Lunatic
    • View Profile
Re: Online DF game server: DorfServer 1.0
« Reply #6 on: July 21, 2014, 10:38:37 pm »

illeterate:

After you ssh in (as ssh user dorf, using the putty key), you then need to register a player account (press R at the main menu).

Then after registering you can log in (L).  Then head to the DF versions menu (D) and select the version on want to play, or P for the latest version.

Currently I'm only hosting 40.04.

(on a related note, I updated the server to 40.04 and copied over the 40.03 saves.  First time I tried it so it's possible I botched something.  mWiki has yet to be updated)
Logged

Nopenope

  • Bay Watcher
    • View Profile
Re: Online DF game server: DorfServer 1.0
« Reply #7 on: September 11, 2014, 08:19:15 pm »

Are there any plans to update this to more current versions (such as .40.1x)?
Logged