Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: would love to see an android port  (Read 1428 times)

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
would love to see an android port
« on: January 16, 2013, 03:06:56 pm »

DF uses ncurses and sdl for is 3 existing ports (macosX, windows, linux), so an android port looks like it would be possible with some tweaking. As far as I know, android has a minimalist linux (with ncurses) underneath its dalvik virtual machine, and there are sdl lib ports for android already.

Using the depreciated (but still active) mouse support to control the interface via the touchscreen would get around the lack of the keyboard.

While I don't know what the fps would be like, given the often wimpy cpus inside phones and tablets, I would still like to see it offered.
Logged

10ebbor10

  • Bay Watcher
  • DON'T PANIC
    • View Profile
Re: would love to see an android port
« Reply #1 on: January 16, 2013, 03:33:50 pm »

Forget it. Suggested a hundred times, and quite frankly, most all android devices don't have the power to run the game. Also, mouse support on dwarf fortress (especially with touchscreen) is going to be seriously frustrating.

Between the horrible performance, coupled with horrible controls, I'm of the opinion that in this case no product is better than a bad product. (Also, development time is a rather precious thing)
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: would love to see an android port
« Reply #2 on: January 16, 2013, 04:19:54 pm »

I don't know about that... many modern android devices with tegra based gpus have graphical performance on par with a lower end PC graphics chipset, and arm CPUs are gaining in clockspeed quite impressively.

It is important to remember that DF is a singlethreaded application, and runs the way it does on modern PCs because the clockspeeds of modern cores haven't improved much over the past decade. (Still between 2 and 3ghz, at the fastest. Cpus now hold more cores, which DF does not take advantage of.)

The deveopment time issue is a valid concern, but most of the others cited in previous threads are presuppositions that are not/may not be current for very long.

It might surprise you to learn that intel is developing a very low power atom processor in the (approx)2ghz range explicitly for use inside tablets and smartphones, for instance, to compete with tegra and other arm SoC designs, and released working prototypes at CES this year.

Then you have the recent "ubuntu phone" project, aiming at getting straight up linux software to run on android arch devices without any special headaches other than a recompile for the processor arch.

What I am trying to tactfully say here, is that the "it won't work, bcause $outdatedexcuse" line is not keeping pace with the reality of the market.

Just saying.
« Last Edit: January 16, 2013, 04:41:17 pm by wierd »
Logged

10ebbor10

  • Bay Watcher
  • DON'T PANIC
    • View Profile
Re: would love to see an android port
« Reply #3 on: January 16, 2013, 04:43:59 pm »

Still, I don't see the interface working on a touchpad.

On a side note, there used to be a community project involving running DF on a computer/server, and playing with your phone/other computer. Closest thing to multiplayer it ever had. Not sure they finished porting it to phone's.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: would love to see an android port
« Reply #4 on: January 16, 2013, 05:21:34 pm »

I dunno.. other than the teensy weensie text, (and the issues with tapping a finger on it), and drawing designation rectangles with precision, I don't see a problem.

Map 2 of the hardware buttons to "zoom in/zoom out", and you get around that fine.

It would require a little thought, but I could see it working.

The *real* issue with trying to run DF on a tablet would be the RAM requirements. On big embarks, DF can easily gobble down over 1gb of ram, and sit on it. More with lots of entities and items at the site.  If I were to try implementing a DF port, I would see about setting up means of gzip compressing blocks of DF's memory, and paging them in and out as needed to conserve resources. (DF's memory space is very repititious, and should compress with gzip compression algos very well.)

Then again, waiting a few more years, tablets will probably come with several gigs of ram from the factory anyway, given the "media consumption" nature of the platform.

Logged

JanusTwoface

  • Bay Watcher
  • murbleblarg
    • View Profile
    • jverkamp.com
Re: would love to see an android port
« Reply #5 on: January 16, 2013, 07:46:22 pm »

Using the depreciated (but still active) mouse support to control the interface via the touchscreen would get around the lack of the keyboard.
Eesh. I would rather a virtualized keyboard. Or rather a proper UI first.

I don't know about that... many modern android devices with tegra based gpus have graphical performance on par with a lower end PC graphics chipset, and arm CPUs are gaining in clockspeed quite impressively.
Graphics really aren't the bottleneck for DF though. Although the ARM CPUs gaining will help.

It is important to remember that DF is a singlethreaded application, and runs the way it does on modern PCs because the clockspeeds of modern cores haven't improved much over the past decade. (Still between 2 and 3ghz, at the fastest. Cpus now hold more cores, which DF does not take advantage of.)
Interestingly, there's also a pretty big push for multicore processors in phones / tablets now. So we're seeing the same shift from faster clocks to multiple cores that desktops did, just a few years delayed.

On a side note, there used to be a community project involving running DF on a computer/server, and playing with your phone/other computer. Closest thing to multiplayer it ever had. Not sure they finished porting it to phone's.
DFTerm. Officially, it's no longer supported, but you can still get the code and run it with some versions of DF. I tried it on my iPhone once (all you need is a Telnet client). The control issue was the biggest problem.

I would suggest either running it on a Linux box and SSHing into it (if you know how to do that sort of thing) or trying to run DFTerm and seeing how the control is on an Android device. That'll give you an idea for how rough it would be to run it natively.
Logged
You may think I'm crazy / And I think you may be right
But life is ever so much more fun / If you are the crazy one

My blog: Photography, Programming, Writing
Novels: A Sea of Stars, Confession

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: would love to see an android port
« Reply #6 on: January 16, 2013, 08:29:13 pm »

I can't see anything short of a virtual keyboard being used for this kind of idea. That reduces available screen space, and since you need to press the spacebar to pause, it would need to be open...pretty much all the time.

Oh, and:
I don't know about that... many modern android devices with tegra based gpus have graphical performance on par with a lower end PC graphics chipset...
Some problems. One: Graphics are NOT the problem. If you can co-opt the graphics into pathfinding, great, but I doubt it. Two: DF makes low-performance computers cry. My netbook struggles with more than a simple, fairly small fortress (well, 60-70 FPS at best, but that's almost ideal circumstances); imagine something not quite as powerful as that. And most Android devices aren't the best. Yeah...DF won't be playable on phones for a long time.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: would love to see an android port
« Reply #7 on: January 16, 2013, 09:25:38 pm »

nVidia has been attempting just that (use the GPU for general computing) for quite awhile actually. *CLICKY!*.  Specifically, because of the high performance of shader units for solver some types of vectorized math equations, and the desire to leverage the strengths of their chips for more efficient mobile applications.  Wrapping CUDA functions into a callable library for invokation where appropriate would give exacty the processing boost you are talking about.

Another important factor to consider about why low-end chip systems run DF like dogs, is due to poor cache offerings. Many low end chips have abysmal L1 and L2 caches, meaning the chip has to grunt harder when doing instructions. (A cache miss increases execution time in a very considerable manner.) Higher end chips have larger caches, wider pipelines, and more ALUs. I would have to see the specifics of the mobile cpus in question to give a fair breakdown.
« Last Edit: January 16, 2013, 09:33:01 pm by wierd »
Logged

Baccar Wozat

  • Bay Watcher
  • [VAMPOW]
    • View Profile
    • My Fortresses
Re: would love to see an android port
« Reply #8 on: January 18, 2013, 05:26:41 pm »

A port where the android sailors live! Brilliant! Then Toady could finally add robots, er I mean rowboats.
Logged

Cool Guy

  • Bay Watcher
  • inlcude <iostream>
    • View Profile
Re: would love to see an android port
« Reply #9 on: January 18, 2013, 10:07:38 pm »

Your Android would explode. There have been hundreds of suggestions for mobile dwarf fortress but nothing has the capabilities. Use the search function next time.
Logged

HavingPhun

  • Bay Watcher
    • View Profile
Re: would love to see an android port
« Reply #10 on: January 19, 2013, 09:44:29 pm »

DF uses ncurses and sdl for is 3 existing ports (macosX, windows, linux), so an android port looks like it would be possible with some tweaking. As far as I know, android has a minimalist linux (with ncurses) underneath its dalvik virtual machine, and there are sdl lib ports for android already.

Using the depreciated (but still active) mouse support to control the interface via the touchscreen would get around the lack of the keyboard.

While I don't know what the fps would be like, given the often wimpy cpus inside phones and tablets, I would still like to see it offered.
Ok so this could happen. But you will have to wait for DF to be finished. By then phones will hopefully be stronger and strong enough to handle it. Or not knowing that df will get more power hungry as time goes on. Then add all the time it would take to port it. Also who knows what phones will look like when df is finished. So get ready to wait a while.
Logged

King Mir

  • Bay Watcher
    • View Profile
Re: would love to see an android port
« Reply #11 on: January 20, 2013, 07:05:54 am »

nVidia has been attempting just that (use the GPU for general computing) for quite awhile actually. *CLICKY!*.  Specifically, because of the high performance of shader units for solver some types of vectorized math equations, and the desire to leverage the strengths of their chips for more efficient mobile applications.  Wrapping CUDA functions into a callable library for invokation where appropriate would give exacty the processing boost you are talking about.
Although some general programming code can be vectorized to run efficiently on a GPU style architecture, this narrow performance optimization is would not be near enough to make DF run on mobile devices.

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: would love to see an android port
« Reply #12 on: January 20, 2013, 01:12:52 pm »

DF uses ncurses and sdl for is 3 existing ports (macosX, windows, linux), so an android port looks like it would be possible with some tweaking. As far as I know, android has a minimalist linux (with ncurses) underneath its dalvik virtual machine, and there are sdl lib ports for android already.

Using the depreciated (but still active) mouse support to control the interface via the touchscreen would get around the lack of the keyboard.

While I don't know what the fps would be like, given the often wimpy cpus inside phones and tablets, I would still like to see it offered.
Ok so this could happen. But you will have to wait for DF to be finished. By then phones will hopefully be stronger and strong enough to handle it. Or not knowing that df will get more power hungry as time goes on. Then add all the time it would take to port it. Also who knows what phones will look like when df is finished. So get ready to wait a while.
Oh, and another bonus to waiting: Toady won't have to recode things for the Android port.

...Although...could one program a Windows emulator for Android and run DF on the emulator?
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.