Bay 12 Games Forum

Please login or register.

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

Author Topic: Enough talk, get crackin'  (Read 11219 times)

Baughn

  • Noble Phantasm
  • The Haruhiist
  • Hiss
    • View Profile
Re: Enough talk, get crackin'
« Reply #45 on: August 09, 2009, 06:30:14 am »

It's not like you'd type it all in by hand. Running an emacs keyboard macro over the function names will generate the code just fine.

That said, one possibility would be that you graft this code onto the current libgraphics as an optional mode (to be switched to by command-line), then ask Toady to include it in DF proper. There's a pretty good chance he'd accept, I think. It'd probably be a good idea to let me vet it first, though.

To do this as simply as possible, what you ought to do is hook the code between render(setup) and render(complete), skipping the latter entirely; have render(setup) finish off by sending the render data (in partial-print mode!) over to whatever device you're using; that ought to be about sixty bytes per frame, on average, if you don't scroll. Passing it through zlib would help for the larger frames.

Meanwhile, input from the device can be passed off at the SDL event level; don't even think about trying to descramble the input system beyond that. Simple is best. Although, be careful: SDL allows you to construct synthetic events, yes, but don't. For one thing that's a limited buffer that you can easily overrun (causing events to drop), but more importantly, this kind of server ought to have no SDL use at all. There's no need.

Oh, and since going below 80x25 is exceedingly unlikely at the moment, may I suggest you try to replicate the viewport-zoom mechanism currently in used? Eg. just show part of it at a time. This would, of course, work best on an iphone where it's easy to scroll, but I'm sure you can figure something out.
Logged
C++ makes baby Cthulhu weep. Why settle for the lesser horror?

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Enough talk, get crackin'
« Reply #46 on: August 09, 2009, 09:42:44 am »

Update: fixed internet problem and now size of windows is determined at start of server.
http://dffd.wimbli.com/file.php?id=1315

As for colours, I am using non standard palette so I just typed in those values.
Oh and can somebody link me to that libgraphics.so sourcecode?
Logged

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Enough talk, get crackin'
« Reply #47 on: August 09, 2009, 09:52:31 am »

I don't completely understand what you guys have been talking about, but, and let me get this straight, is the end goal to be able to play DF on a computer through systems like the DS (& other computers and consoles)?

Or just to play it on one computer but run it on another?
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

bhelyer

  • Bay Watcher
  • The kart iz not movink!
    • View Profile
Re: Enough talk, get crackin'
« Reply #48 on: August 09, 2009, 10:05:38 am »

Update: fixed internet problem and now size of windows is determined at start of server.
http://dffd.wimbli.com/file.php?id=1315

As for colours, I am using non standard palette so I just typed in those values.
Oh and can somebody link me to that libgraphics.so sourcecode?

git://github.com/Baughn/Dwarf-Fortress--libgraphics-.git

Do everyone a favour and work in a git branch.
Logged

Baughn

  • Noble Phantasm
  • The Haruhiist
  • Hiss
    • View Profile
Re: Enough talk, get crackin'
« Reply #49 on: August 09, 2009, 11:03:00 am »

I don't completely understand what you guys have been talking about, but, and let me get this straight, is the end goal to be able to play DF on a computer through systems like the DS (& other computers and consoles)?

Or just to play it on one computer but run it on another?
Both, theoretically, but the former would be much easier than the latter; thus, currently the former.
Logged
C++ makes baby Cthulhu weep. Why settle for the lesser horror?

Nexii Malthus

  • Bay Watcher
    • View Profile
Re: Enough talk, get crackin'
« Reply #50 on: August 09, 2009, 06:43:08 pm »

Don't you mean rather that the latter is easier? Play it on one computer and run it on another computer?

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: Enough talk, get crackin'
« Reply #51 on: August 09, 2009, 07:06:45 pm »

Don't you mean rather that the latter is easier? Play it on one computer and run it on another computer?
Certainly easier to do it with two computers. Other devices would need some UI overhaul/alternative input. For this to be useful, there has to be a solid spec of the communication protocol. Developing clients is best left to people with experience in programming for the individual devices. I wouldn't even know where to start when it comes to iPhones for example :)

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Enough talk, get crackin'
« Reply #52 on: August 10, 2009, 07:55:52 am »

Tried to make remote DF control, here are the results:
http://dffd.wimbli.com/file.php?id=1315

I think I will need to optimise this very very very much because now client->server has a huge lag. However I don't know if it's network based or is it just because of my crappy programming. Anyway now you can play DF truly remotely!
Logged

axus

  • Bay Watcher
  • Axe Murderer
    • View Profile
Re: Enough talk, get crackin'
« Reply #53 on: August 10, 2009, 11:16:50 am »

nice, good work  ;D
Logged

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Enough talk, get crackin'
« Reply #54 on: August 10, 2009, 12:19:52 pm »

Don't you mean rather that the latter is easier? Play it on one computer and run it on another computer?
Certainly easier to do it with two computers. Other devices would need some UI overhaul/alternative input.
DS version could show a keyboard on the touch screen, DF on the top.  Hypothetically.
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

qwert

  • Bay Watcher
    • View Profile
Re: Enough talk, get crackin'
« Reply #55 on: August 10, 2009, 12:55:45 pm »

Tried to make remote DF control, here are the results:
http://dffd.wimbli.com/file.php?id=1315

I think I will need to optimise this very very very much because now client->server has a huge lag. However I don't know if it's network based or is it just because of my crappy programming. Anyway now you can play DF truly remotely!

The server crashes for me on Windows 7  :'(

Here is what I get when I run it from the console:
Code: [Select]
Microsoft Windows [Version 6.1.7100]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Users\Qwert\Desktop\Online Df alpha4\release>ttt.exe

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

C:\Users\Qwert\Desktop\Online Df alpha4\release>


Also, someone needs to write a client for the g1; it has a physical keyboard and enough screen for an 80:40 grid with a 6x6 tileset  ;D
Logged

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Enough talk, get crackin'
« Reply #56 on: August 10, 2009, 07:30:54 pm »

YAU (Yet another update) http://dffd.wimbli.com/file.php?id=1315
changes:
settings to allow/forbid control of DF, maybe little faster, bug fixes...

PS: I would love to make a client for iphone but can't think of a way to make it easy to use on anything less then a full keyboard. (and dev kit for it is not free...)
PPS:I am thinking about releasing sourcecode if anyone would be interested. So what would be the best way?
Logged

Arkose

  • Bay Watcher
    • View Profile
Re: Enough talk, get crackin'
« Reply #57 on: August 10, 2009, 07:35:37 pm »

6x6 fonts are kind of hard to read, in my experience. 6x8 would get you better readability, and still an 80x30 display area. (Can DF handle tile widths less than 80? That would let us use bigger font sizes; it would be ideal to get at least 8x8 fonts on such devices, since it would be easier to scale down 16x16 sprites to that size.)

As far as sprites go for the 6x8 font form factor, Plac1d's 8x12 is the closest fit; you could probably keep distinctions between dwarves and goblins and such down to 6x8, but probably not profession distinctions.
Logged

qwert

  • Bay Watcher
    • View Profile
Re: Enough talk, get crackin'
« Reply #58 on: August 10, 2009, 08:01:56 pm »

Alpha 5 still crashes on Win 7, worked fine until alpha 4.

Managed to catch what the console window says just as it crashes:
Code: [Select]
Searching for buffer base
With fps,menu
Without fps,menu
Found!

There is also a tiny pure black window that I assume is ordinarily the window where it draws the output.
Logged

PMantix

  • Bay Watcher
    • View Profile
Re: Enough talk, get crackin'
« Reply #59 on: August 10, 2009, 08:35:00 pm »

Also, someone needs to write a client for the g1; it has a physical keyboard and enough screen for an 80:40 grid with a 6x6 tileset  ;D

Yes please.
Logged
Pages: 1 2 3 [4] 5 6 7