Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 5

Author Topic: Proof of Concept: DF Text Mode (works over SSH!)  (Read 25792 times)

FeepingCreature

  • Bay Watcher
    • View Profile
Proof of Concept: DF Text Mode (works over SSH!)
« on: November 24, 2009, 09:20:34 am »

This paste contains a rough patch against the Git repository to implement console-based Dwarf Fortress interactivity.


Beware: this is merely a proof of concept. It guts the SDL-based graphics of the game, implementing UTF8 output in their hollowed-out husk.

Screenshot:


  • What does this mean?
    • It means a thus patched copy of Dwarf Fortress can be run over ssh or in screen sessions.
  • What do I need to know?
    • This will break the normal SDL-based output. If you want to switch back and forth regularly, it is recommended to make a backup of the SDL-based libgraphics.so.
    • The output of the program is in UTF-8. You may need to configure your SSH client or terminal emulator to handle it.
       
      • xterm: hold control, click-and-hold the right mouse button. Enable "UTF-8".
      • screen: Make sure to start your session with "screen -U". Also use the "-U" flag when reconnecting.
       
  • But how fast is it?
    • No slower than graphics :) The updater code only prints the characters that changed from the last frame. The "Updates" entry in the infodump bar at the bottom reflects this, being the number of characters changed from the last frame.


  • How do I use this?
    • How do I check out a git repository?
      • git clone [repository_url]
    • How do I apply a patch?
      • patch -p1 < [patch_file]
    • How do I build the repository?
      • Install scons, SDL and OpenAL's respective development packages.
      • In the main folder, run "scons ."
    • How do I revert the patch?
      • git checkout .

Have fun!
« Last Edit: January 26, 2010, 08:52:21 am by FeepingCreature »
Logged

eerr

  • Bay Watcher
    • View Profile
Re: Proof of Concept: DF Text Mode
« Reply #1 on: November 24, 2009, 09:34:16 am »

but how fast does it display?
Logged

FeepingCreature

  • Bay Watcher
    • View Profile
Re: Proof of Concept: DF Text Mode
« Reply #2 on: November 24, 2009, 11:22:19 am »

but how fast does it display?

As fast as your network connection allows it. :)
Color/formatting codes are only retransmitted when they change, and characters that are unchanged from the last frame are not updated. In my experience, it's very much playable. :)
Logged

Danarca

  • Bay Watcher
  • [MILL_CHILD:ONLY_IF_GOOD_REASON]
    • View Profile
Re: Proof of Concept: DF Text Mode
« Reply #3 on: November 24, 2009, 12:43:07 pm »

No doubt about it being playable, but the main FPS-drag is not the graphics, it's the CPU cycles it runs in a heavily populated fort.

But the attracting thing you've made here are the possibility of playing Dwarf Fortress on a remote computer using Telnet, for example, an often requested.. Request.

Good show, but can you post a guide for those of us who have not meddled with Baughns source code? >.<
Logged
Clutter god the god of godly gods.
Om Nom nom nom nom
Ah yes the god of stone stockpiles, long randomly generated names, and gods.

FeepingCreature

  • Bay Watcher
    • View Profile
Re: Proof of Concept: DF Text Mode
« Reply #4 on: November 24, 2009, 03:54:12 pm »

Sure. :)

Just use the following shellscript (copy it into a file called "install-patched.sh", then from a shell, run "sh install-patched.sh"): http://pastebin.ca/1686670

Good luck!
« Last Edit: November 25, 2009, 05:48:37 am by FeepingCreature »
Logged

kiffer.geo

  • Bay Watcher
    • View Profile
Re: Proof of Concept: DF Text Mode
« Reply #5 on: November 24, 2009, 04:20:10 pm »

omg...
Now I can play df over ssh on my phone...
Nerd-gasm!
Hum... A reason to upgrade my little server... I might need nano fortress.
Logged

Danarca

  • Bay Watcher
  • [MILL_CHILD:ONLY_IF_GOOD_REASON]
    • View Profile
Re: Proof of Concept: DF Text Mode
« Reply #6 on: November 24, 2009, 04:30:19 pm »

...
I thank you for the effort of putting together the script, but that doesn't help me <:(

What version of DF do I need?
Which of your files?
Then what?

EDIT:
Also, change the title to something else, you got 160~ views even though this is a revolutionary step towards playing DF on a remote computer, hell, even a possible co-op multiplayer mode!
Something like.. "Remote Dwarf Fortress.. CHECK!" or "Dwarf Fortress Telnet: The first step"
Hell, I don't know, but this deserves way more attention, you've actually accomplished something note-worthy!
« Last Edit: November 24, 2009, 04:37:27 pm by Danarca »
Logged
Clutter god the god of godly gods.
Om Nom nom nom nom
Ah yes the god of stone stockpiles, long randomly generated names, and gods.

ShadeJS

  • Bay Watcher
    • View Profile
Re: Proof of Concept: DF Text Mode (works over SSH!)
« Reply #7 on: November 25, 2009, 02:00:28 am »

I'm going to yell:

YOU SHOULD TRY TO GET THIS MERGED TO THE D* RELEASES AS A FORMAL [PRINT_MODE].

So a player could [PRINT_MODE:ASCII], and oh say, ssh to his $HOME, then when they get home they could either change it or learn to love the ASCII.

Also this would be very good when people break or have broken OpenGL implementations.
Logged

Nexii Malthus

  • Bay Watcher
    • View Profile
Re: Proof of Concept: DF Text Mode (works over SSH!)
« Reply #8 on: November 25, 2009, 02:57:54 am »

Very cool. But its not the first remote-thingy.

There is this too, Remote DF View. It is a bit heavier on bandwidth I think and is usable by windows users. Has a basic chatroom and ability to transfer control to other users.

FeepingCreature

  • Bay Watcher
    • View Profile
Re: Proof of Concept: DF Text Mode (works over SSH!)
« Reply #9 on: November 25, 2009, 05:10:56 am »

I'm sorry, but this patch cannot possibly be merged in its current state. As I said, it completely breaks normal graphical output because I basically had no idea what I was doing and ripped functions out indiscriminately when creating it. If anybody (who actually knows what he's doing) wants to go ahead and use the code as the basis for a "proper" ASCII mode, I explicitly relinquish all potential claims of intellectual ownership I may or may not have on that code. Knock yourself out :)  (Sorry)
Logged

bhelyer

  • Bay Watcher
  • The kart iz not movink!
    • View Profile
Re: Proof of Concept: DF Text Mode (works over SSH!)
« Reply #10 on: November 25, 2009, 05:16:41 pm »

This is really awesome. True text mode DF is something that should've happened a long time ago!

(fyi, bernardh from #D)
Logged

ShadeJS

  • Bay Watcher
    • View Profile
Re: Proof of Concept: DF Text Mode (works over SSH!)
« Reply #11 on: November 26, 2009, 06:47:28 am »

I'm sorry, but this patch cannot possibly be merged in its current state. As I said, it completely breaks normal graphical output because I basically had no idea what I was doing and ripped functions out indiscriminately when creating it. If anybody (who actually knows what he's doing) wants to go ahead and use the code as the basis for a "proper" ASCII mode, I explicitly relinquish all potential claims of intellectual ownership I may or may not have on that code. Knock yourself out :)  (Sorry)

I didn't mean to put any undue pressure on you or anything... It was more of a, "If you move forward beyond the proof of concept stage" thingy.
Logged

Superlagg

  • Escaped Lunatic
    • View Profile
Re: Proof of Concept: DF Text Mode (works over SSH!)
« Reply #12 on: November 26, 2009, 10:22:22 am »

Does this mean that people with weaker computers could be able to play DF with decent FPS over SSH, if it were hosted on a strong enough server?
Logged

Danarca

  • Bay Watcher
  • [MILL_CHILD:ONLY_IF_GOOD_REASON]
    • View Profile
Re: Proof of Concept: DF Text Mode (works over SSH!)
« Reply #13 on: November 26, 2009, 10:35:18 am »

Does this mean that people with weaker computers could be able to play DF with decent FPS over SSH, if it were hosted on a strong enough server?
Yep.
Logged
Clutter god the god of godly gods.
Om Nom nom nom nom
Ah yes the god of stone stockpiles, long randomly generated names, and gods.

kaypy

  • Bay Watcher
    • View Profile
Re: Proof of Concept: DF Text Mode (works over SSH!)
« Reply #14 on: November 26, 2009, 11:33:16 am »

I have visions of a succession fortress run on a "whoever logs in gets the fort, turn ends when they log out" basis...
Logged
Pages: [1] 2 3 ... 5