Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 8 9 [10] 11 12 ... 46

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

Adeon

  • Bay Watcher
  • Obey.
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3a - 2/4/2010)
« Reply #135 on: April 06, 2010, 12:49:59 am »

i'm having some problems, i logged into my server, everything seems ok, i can chat, but... the commands to the game does not work, simply nothing happens when i input something to the game, but the chat works normal...

anyone has any idea what the problem could be?

When you resize the terminal and see your nick to the right, does it turn red when you press CTRL+A? Means you have input.

And in case this does happen but you still get no input...

Take your configuration file (see manual) and write "VERBOSITY: 1" there. It will make any keypresses from clients to be outputted to the server console. See if the keypresses go through (almost certainly will...but I guess it could be double-checked). I've heard about this bug(?) once before, but at the moment I have no idea what could be causing it or if it's really dfterm related. Also check if input works on the same machine where you run dfterm and in DF window itself. If nothing works, I could take your information on what software you have (Operating system/DF version and dfterm version at least) for future reference if this comes up again.

I am also having this problem, so here's my info.

Server side:
Dwarf Fortress 0.31.01
DFTerm 0.1.3a
Operating System: Windows 7 64-bit

Client side:
Ubuntu 9.10 64-bit
Running telnet in gnome-terminal
I also tried running it from the server machine via PuTTY with the same result.

I turned VERBOSITY up to 1 and verified that the server is indeed receiving the keypresses. Like lokis, I can use the chat interface, but when I hit Ctrl-A, my name goes red and I can't do anything.

I have tried both starting DF before launching DFTerm and launching from DFTerm. The game starts just fine and I can see the menu, but I can't interact with it.
When you upgrade to the latest version of the DFTerm, you must include the new 'glue' DLL and read the instructions.

spokehedz: This is a fresh installation. I've never used DFTerm in the past, so there's no upgrading. The glue dll is present in the Dwarf Fortress directory.

EDIT:
Odd thing. I tried again a few hours later. Didn't modify anything, but it works now.

You are the third one to have this input problem. The other two had the same problem and also for them it just spontaneously started working.

I'm not sure what is causing this. I believe it might be because dfterm takes the wrong window to interact with and doesn't send keypresses to correct one. This can happen, for example, in startup when DF asks if you want fullscreen or windowed mode. If dfterm is attached at this point, it may take the window of the dialog instead of the main window. Or then it might be something completely different...
Logged
I make dead people. Dfterm3

kurokikaze

  • Bay Watcher
  • Man of the black wind
    • View Profile
    • Mechanical World
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3a - 2/4/2010)
« Reply #136 on: April 06, 2010, 11:52:44 am »

Whoa, you rock. I was thinking of doing this sort of thing myself, but in-browser instead of terminal. I ever tested some output variants (http://kuroikaze85.wordpress.com/2010/03/01/colored-console-in-javascript/), but never got to finish it. You inspired me to give it another try :)
Logged
It's black as pitch 'cause we're trapped by our violent souls
In a deep mine, where deep rhymes won't keep my self-control
Too many foes, we feel snakebit, and we won't take it
Enemies need their face hit, we goin' ape shit!

Adeon

  • Bay Watcher
  • Obey.
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3a - 2/4/2010)
« Reply #137 on: April 06, 2010, 01:53:37 pm »

Whoa, you rock. I was thinking of doing this sort of thing myself, but in-browser instead of terminal. I ever tested some output variants (http://kuroikaze85.wordpress.com/2010/03/01/colored-console-in-javascript/), but never got to finish it. You inspired me to give it another try :)

Ooh! Browser DF is still in my todo-list. I tried to make it work with a software called shellinabox with dfterm but the thing was horribly slow and unplayable and unwatchable, while otherwise working just like I wanted it to. Making my own version just for dfterm has been hard, because I have almost 0 experience in JavaScript or AJAX stuff. Also tried anyterm but that one didn't display dfterm correctly and included some unnecessary elements on the browser side. Not to mention all the input problems...

Anyway, good luck to you :) I'd be interested in any terminal-in-a-browser software that can be used to show dfterm. I have not found anything that can handle dfterm.




Logged
I make dead people. Dfterm3

kurokikaze

  • Bay Watcher
  • Man of the black wind
    • View Profile
    • Mechanical World
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3a - 2/4/2010)
« Reply #138 on: April 06, 2010, 01:56:51 pm »

Also, how do you handle interactions with DF in windows? Entirely with DFhack?
Logged
It's black as pitch 'cause we're trapped by our violent souls
In a deep mine, where deep rhymes won't keep my self-control
Too many foes, we feel snakebit, and we won't take it
Enemies need their face hit, we goin' ape shit!

Adeon

  • Bay Watcher
  • Obey.
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3a - 2/4/2010)
« Reply #139 on: April 06, 2010, 02:26:03 pm »

Also, how do you handle interactions with DF in windows? Entirely with DFhack?

For the moment, I read DF's memory (without DFHack). Earlier versions of dfterm did it in a kind of lazy and unportable way so people had problems. As of v0.1.3a, no one as reported that they can't see DF screen anymore (except for DF2010's partial print stuff, but that's not because dfterm is not working correctly).

Input system had some problems. For example, I discovered fooling other program to think shift has been pressed down can be a huge problem depending on the program. DF happens to be one of those pesky little programs. Before DF2010, I supplied a modified SDL.dll to catch window messages. DF2010 doesn't use SDL.dll anymore so I turned into DLL injection instead and inline API hooked GetKeyState() and DefWindowProc(). Dfterm sends WM_USER messages to DF and the injected DLL is supposed to catch them from DefWindowProc. Using the catched data, I return my own stuff when asked about VK_SHIFT from GetKeyState(). And everything works and no one complains...

Edit: Oh, and input to DF is given by standard PostMessage(df_window, WM_KEYDOWN, wparam, lparam); PostMessage(df_window, WM_KEYUP, wparam, lparam);
Might need to change the method later...
Logged
I make dead people. Dfterm3

Calhoun

  • Bay Watcher
  • Reusable-Box
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3a - 2/4/2010)
« Reply #140 on: April 07, 2010, 12:54:25 pm »

With the new version, the control key may need to be changed, as it conflicts with the Return to Arena key in arena mode.

You can rebind the key in DF however, so it's not 100% necessary.
Logged
I know it's unrealistic, but I can't help but imagine little bearded babies for dwarves. In my mind, they come out of the womb fully bearded. That's how the mother carries them around, too, she just drags them around by the beard or ties it to her belt. When the father's on duty, he just ties their beards together and the baby just kind of hangs there, swinging to and fro with Urist McDaddy's movements.

Adeon

  • Bay Watcher
  • Obey.
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3b - 8/4/2010)
« Reply #141 on: April 08, 2010, 11:28:41 am »

Released dfterm 0.1.3b to support Dwarf Fortress v0.31.02. There are no other changes.

Logged
I make dead people. Dfterm3

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3b - 8/4/2010)
« Reply #142 on: April 10, 2010, 12:39:21 pm »

I've been messing with this all afternoon. It's well documented, but still have a few questions.

How do I attach running instances to my slots? When I run dfterm I get "A running DF instance can be attached to slot #." I have more than one DF running.

How did you create the yukkuris, you didn't just type them up into the code did you?

And finally, how much of a pain would it be to make this work with the old 2D 23a version? I'm sure many people, including myself, would appreciate it.

This is full of awesome, if I had another rig I would definitely host a server.
Logged

Calhoun

  • Bay Watcher
  • Reusable-Box
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3b - 8/4/2010)
« Reply #143 on: April 10, 2010, 01:16:43 pm »

How do I attach running instances to my slots? When I run dfterm I get "A running DF instance can be attached to slot #." I have more than one DF running.

If DF is already running, the /launchDF command will attach it'self to the already running copy,
Logged
I know it's unrealistic, but I can't help but imagine little bearded babies for dwarves. In my mind, they come out of the womb fully bearded. That's how the mother carries them around, too, she just drags them around by the beard or ties it to her belt. When the father's on duty, he just ties their beards together and the baby just kind of hangs there, swinging to and fro with Urist McDaddy's movements.

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3b - 8/4/2010)
« Reply #144 on: April 10, 2010, 01:29:24 pm »

Yes, but for some reason it doesn't do that. I have two instances of df running, and when using /launchdf both slot one and slot two attach themselves to the first instance.

side note: I also did play around with the config file and set it so I have two valid slots.
Spoiler (click to show/hide)
« Last Edit: April 10, 2010, 01:33:31 pm by ILikePie »
Logged

Adeon

  • Bay Watcher
  • Obey.
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3b - 8/4/2010)
« Reply #145 on: April 10, 2010, 02:29:40 pm »

Yes, but for some reason it doesn't do that. I have two instances of df running, and when using /launchdf both slot one and slot two attach themselves to the first instance.

side note: I also did play around with the config file and set it so I have two valid slots.
Spoiler (click to show/hide)

Dfterm will attach to *any* running DF process. This includes DF processes running in other slots. What you want is to host a server that only has one slot that can attach running slots or have dfterm launch all DF processes by itself.

Fixes coming up in next version where it will not attach to DF processes already in other slots. Also, the old 23a version is probably going to be easy to add support. There's also probably going to be a generic Windows console program support (someone requested DoomRL support for dfterm on Windows) later.


Oh, and the yukkuris (as I call them), were created using a special little tool that spat out some lua code from 80x25 images. The process of adding yukkuris is very unfriendly to users so I didn't include it in the package. Do you *really* want to add some images? Or maybe have some complaints about the present ones?
« Last Edit: April 10, 2010, 02:34:08 pm by Adeon »
Logged
I make dead people. Dfterm3

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3b - 8/4/2010)
« Reply #146 on: April 10, 2010, 02:54:09 pm »

Dfterm will attach to *any* running DF process. This includes DF processes running in other slots. What you want is to host a server that only has one slot that can attach running slots or have dfterm launch all DF processes by itself.

Oh, I get it now, Thanks.

Edit: I changed windowed prompt to yes, when running normally I don't get a prompt, but when using dfterm I do. It seems I also need to extract dfterm to the dwarf fortress's folder for it to work, is this normal?

Quote from: Adeon link=topic=50643.msg1154285#msg1154285  date=1270927780
Fixes coming up in next version where it will not attach to DF processes already in other slots. Also, the old 23a version is probably going to be easy to add support. There's also probably going to be a generic Windows console program support (someone requested DoomRL support for dfterm on Windows) later.
23a and console support would be great, I'd love to host a server with some roguelikes to play remotely, and dgamelaunch is confusing.

Quote from: Adeon link=topic=50643.msg1154285#msg1154285  date=1270927780
Oh, and the yukkuris (as I call them), were created using a special little tool that spat out some lua code from 80x25 images. The process of adding yukkuris is very unfriendly to users so I didn't include it in the package. Do you *really* want to add some images? Or maybe have some complaints about the present ones?
Complaints? No. I'd just love add a few of my own, to further customize it. Maybe a pie or something.

Now to further mess around with that lua code you have there...

'nighty night all
« Last Edit: April 10, 2010, 03:10:57 pm by ILikePie »
Logged

daoist

  • Bay Watcher
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3b - 8/4/2010)
« Reply #147 on: April 10, 2010, 03:44:49 pm »

Some problems we've had:

1. colors. In putty need to change the color of black bold to be brighter. Not really an issue though.
2. the numpad isn't sent properly. I remapped the secondary up and down to [ and ] so that works.
3. F-keys don't send right at all. dfterm doesn't recognize the esc-sequence the terminal sends.
4. shift+arrow and shift+enter don't work.

Any tips?
Logged

daoist

  • Bay Watcher
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3b - 8/4/2010)
« Reply #148 on: April 10, 2010, 04:54:17 pm »

Not really sure what I changed, if anything, but the F-keys seem to work.

Did some playing around, and it seems that Putty doesn't send some chordic special keys, e.g. shift+"left arrow" sends just "left arrow", so not sure what can be done about that. shift or ctrl + enter send just enter. alt+enter sends a null byte.
Logged

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: Dfterm, Dwarf Fortress in a terminal (v0.1.3b - 8/4/2010)
« Reply #149 on: April 10, 2010, 10:07:29 pm »

Just poping in to say that this is a very cool program. If it weren't for the fact that my laptop's an awesome gaming rig, I'd probably use it a LOT. As is, i might see about getting some friends at school to try DF via this...
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch
Pages: 1 ... 8 9 [10] 11 12 ... 46