Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 34 35 [36] 37 38 ... 46

Author Topic: Dfterm2 0.16, server software for playing Dwarf Fortress remotely  (Read 252403 times)

Norgg

  • Escaped Lunatic
    • View Profile
Re: Dfterm2 0.14, server software for playing Dwarf Fortress remotely
« Reply #525 on: February 22, 2012, 11:10:03 am »

Okay, this is awesome.  Just got it running on a server, had to add a #include <string.h> to utf8.cpp in the current git version though.

I've seen mention that this supports http connections through flash, but I've not been able to figure out where to configure that and the manual is broken at the moment, anyone had experience setting this up?

For the people asking about getting this going with Android, if you run the server on a desktop/server and get the connectbot app and connect through telnet from that to your desktop, eg: 192.168.1.5:8000 (with correct IP/domain name/port) it should work.  You'll need either a hardware keyboard or a software keyboard with support for cursor keys though I think.
Logged

Norgg

  • Escaped Lunatic
    • View Profile
Re: Dfterm2 0.14, server software for playing Dwarf Fortress remotely
« Reply #526 on: February 22, 2012, 11:41:12 am »

I've seen mention that this supports http connections through flash, but I've not been able to figure out where to configure that and the manual is broken at the moment, anyone had experience setting this up?

Ah, found the post explaining the set-up for this earlier in the thread, conceptually very cool, I can see why you don't document it yet though.
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dfterm2 0.14, server software for playing Dwarf Fortress remotely
« Reply #527 on: February 22, 2012, 12:24:39 pm »

I setup a server on apcguy.dnsd.me port 8000 (ensure you set window - translation to utf 8 in putty).

Questions:

Anyone recommend a good freeware windows remote application tool so I can share out Dwarf Therapist?

Also, how would I go about password protecting the game if I wanted to start a player registry?

Adeon

  • Bay Watcher
  • Obey.
    • View Profile
Re: Dfterm2 0.15, server software for playing Dwarf Fortress remotely
« Reply #528 on: February 22, 2012, 03:43:52 pm »

Dfterm2 0.15 released. This fixed some bugs introduced by 0.14 release.

Backspace no longer sends shift+backspace.

I've purged the flash interface from the codebase now completely.

Also, how would I go about password protecting the game if I wanted to start a player registry?

You can't password protect games. You can, however, manually add and remove players who can play or watch.
I've seen mention that this supports http connections through flash, but I've not been able to figure out where to configure that and the manual is broken at the moment, anyone had experience setting this up?
Ah, found the post explaining the set-up for this earlier in the thread, conceptually very cool, I can see why you don't document it yet though.
I've seen mention that this supports http connections through flash, but I've not been able to figure out where to configure that and the manual is broken at the moment, anyone had experience setting this up?

Because the flash interface, quite frankly, sucks. I believe the game is almost unplayable with it. It was a gimmick and I've removed the feature just recently because I don't want to maintain it.

It's possible to get a flash interface anyway but you just have to use external software instead of relying on Dfterm2.
Logged
I make dead people. Dfterm3

Adeon

  • Bay Watcher
  • Obey.
    • View Profile
Re: Dfterm2 0.14, server software for playing Dwarf Fortress remotely
« Reply #529 on: February 22, 2012, 04:39:44 pm »

It's also now possible to add configurations for new DF versions without having to recompile. This means you don't need to wait for me to release a new Dfterm2 version when next DF version comes out. I'll post a document on how to do that when I have time.

Here's a quick guide on how to add new addresses when a new DF version comes out.

The addresses are listed in dfterm2.conf (it is read as a Lua script) which is in the installation directory of Dfterm2. This file has entries in this form:

Code: [Select]
addresses = {                                                                   
  { name               = "DF 31.25",                                           
    size_address       = 0x0073507C,                                           
    screendata_address = 0x00734D1C,                                           
    checksum           = 0xFBFF0FC9,                                           
    method             = "PackedVarying" }                                     
}                                                                             

Here, you could add a new DF version, let's say DF 34.2 for example.

Code: [Select]

addresses = {                                                                   
  { name               = "DF 31.25",                                           
    size_address       = 0x0073507C,                                           
    screendata_address = 0x00734D1C,                                           
    checksum           = 0xFBFF0FC9,                                           
    method             = "PackedVarying" },
  { name               = "DF 34.02",                                           
    size_address       = 0x008100F4,                                           
    screendata_address = 0x0080FD94,                                           
    checksum           = 0xD635560F,                                           
    method             = "PackedVarying" }                                     
}                                                                             

You should change the name, the size address, screen data address and checksum for each new version. "PackedVarying" refers to the format in which the screendata is in the memory and it has been the same for all SDL versions since 40d times.

The addresses are relative to the base address of Dwarf Fortress.exe when it's loaded in memory. In older Windows versions that don't have ASLR, the base address is always 0x00400000. Any self-respecting memory inspection tool can give you the base addresses for loaded modules.

In the address specified by size_address, there are two consecutive 32-bit values that tell the width and height of the DF screen. Using search features of a memory inspection tool, this address should be easy to find.

In the address specified by screendata_address, there's another address that points to the screen data. If double buffering is being used, it alternates between the buffers. You can find this address by first finding the actual screen data buffer. What I do is go to the Arena mode, search for + (the arena has a lot of smooth floor), then go to the unit or reports menu and find the letter that used to be occupied by the +.

Then, I view the memory around the address I find and check where the screen data buffer begins. Then, I use a search to find an address that points to that buffer. This should give the address what goes into the screendata_address (just remember to take relative address instead of absolute).

The screen data buffer uses 4 bytes per square. The first one is CP437 code point to the character being used and the other bytes are used for color information.

I've noticed that usually the addresses slightly increase between minor DF versions and more between major releases.

As for the checksum, you can get it by configuring Dfterm2 to load the new DF version (even though it doesn't recognize it). Dfterm2 attempts to load it, notices it doesn't recognize it, and then give you the checksum in its log.

Once you add a new entry to the dfterm2.conf, you need to restart Dfterm2 to get it load the new settings.

Logged
I make dead people. Dfterm3

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dfterm2 0.15, server software for playing Dwarf Fortress remotely
« Reply #530 on: February 22, 2012, 08:41:18 pm »

Now all we need is dwarf therapist working
.  As a side note. If I set the db file to read only will that let me prevent new users?
« Last Edit: February 22, 2012, 09:33:27 pm by thistleknot »
Logged

Adeon

  • Bay Watcher
  • Obey.
    • View Profile
Re: Dfterm2 0.15, server software for playing Dwarf Fortress remotely
« Reply #531 on: February 22, 2012, 10:54:23 pm »

Now all we need is dwarf therapist working
.  As a side note. If I set the db file to read only will that let me prevent new users?

As Dfterm2 needs write access to the database and user data is stored there, it would. It would also prevent you from making any configuration changes. However, the UI doesn't know how to express that so it might act as if changes are being made when in fact no new users or configuration changes can happen.
Logged
I make dead people. Dfterm3

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dfterm2 0.15, server software for playing Dwarf Fortress remotely
« Reply #532 on: February 23, 2012, 12:40:18 am »

I found the option I needed in slot profile.  Thanks

yarr

  • Bay Watcher
    • View Profile
Re: Dfterm2 0.14, server software for playing Dwarf Fortress remotely
« Reply #533 on: February 23, 2012, 05:32:45 am »

Epic tut

Thanks for that Adeon. Can you recommend a windows tool for finding the adresses?
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dfterm2 0.15, server software for playing Dwarf Fortress remotely
« Reply #534 on: February 23, 2012, 09:24:03 am »

I was able to setup dwarf therapist using tightvnc 1.3.  I had to disable windows remote desktop.  I was able to get full desktop sharing using tightnvc 2.  So 1.3 was for just the dt window and 2.0 is for desktop (diferrent port #s of course).

red_29A

  • Bay Watcher
  • [DO_NOT_CULL]
    • View Profile
    • Nexus Page
Re: Dfterm2 0.15, server software for playing Dwarf Fortress remotely
« Reply #535 on: February 23, 2012, 08:08:47 pm »

Will this work over LAN? Sorry if this has been answered before. It would be nice if my room-mate could spectate from his room with out making mine stink from his cheap mexican weed. Or i could take my laptop in the can! Also, i know someone with an Android phone with a hardware keyboard and i really want to check this out. If i could play DF on it during my lunch break that would be amazing. And totally worth the cost of all the monthly bills. Also i need a job.
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dfterm2 0.15, server software for playing Dwarf Fortress remotely
« Reply #536 on: February 24, 2012, 07:26:51 am »

yes, it will work over lan.

Anyone know of a good "graphical" ttf, preferrably 12x12 (not 16x16) or a little bit smaller that works well.  I'm meddling with df2ttf right now, but I was wondering if anything was made from the groundup.  I'm using Maus right now.  I found some 12x12 mayday, I'm going to try and convert that.  Any ideas are greatly appreciated.

Adeon

  • Bay Watcher
  • Obey.
    • View Profile
Re: Dfterm2 0.15, server software for playing Dwarf Fortress remotely
« Reply #537 on: February 24, 2012, 10:41:43 am »

yes, it will work over lan.

Anyone know of a good "graphical" ttf, preferrably 12x12 (not 16x16) or a little bit smaller that works well.  I'm meddling with df2ttf right now, but I was wondering if anything was made from the groundup.  I'm using Maus right now.  I found some 12x12 mayday, I'm going to try and convert that.  Any ideas are greatly appreciated.

http://dffd.wimbli.com/file.php?id=1922
Logged
I make dead people. Dfterm3

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dfterm2 0.15, server software for playing Dwarf Fortress remotely
« Reply #538 on: February 24, 2012, 11:44:27 am »

yeah, I've been using that and df2ttf.  Best I saw was mayday, but I was hoping I could find one that was built from the groundup to represent graphics as much as possible but was specifically for terminals.  The others seem to be converted, and don't look that great.

Quarterblue

  • Bay Watcher
    • View Profile
Re: Dfterm2 0.15, server software for playing Dwarf Fortress remotely
« Reply #539 on: February 24, 2012, 07:07:06 pm »

I'm currently hosting a server at quarterdorf.dnsd.me, port 8000 if you want to join.

We should keep track of every public server, I think there are at least two more up.
Logged
Pages: 1 ... 34 35 [36] 37 38 ... 46