Bay 12 Games Forum

Please login or register.

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

Author Topic: Odd problem - Dwarf fortress *not* pegging my processor out  (Read 1680 times)

helf

  • Bay Watcher
    • View Profile

Hi. I'm kinda new to dwarf fortress, just learning to play it. Well, I decided to load it up on my fujitsu u810 and while I had windows xp on it it of course pegged out my poor little 800mhz a110 cpu but it was staying around 50-60fps all the time. Which is pretty awesome all things considered. I got tired trying to get xp to work properly with the laptop so I slapped Ubuntu 10.04 on it, installed WINE, then ran DF (latest) and it is crawling along at 7-11fps and my cpu usage is hovering around 2%! What gives? Any ideas? The laptop has 1gb of ram, but DF is all that is running and the laptop isn't thrashing.

Thought it bizarre, especially since DF pegs out one core on my q9550 box easily. :)
Logged
YOUR GAMES GLITCH: Hey, I got out of the map boundry!
OUR GAMES GLITCH: Hey, a horrid monstrosity just migrated to my fortress! Let's recruit it!

Vicomt

  • Bay Watcher
  • Just call me Vic.
    • View Profile
    • Steam Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #1 on: May 12, 2010, 12:15:56 pm »

getting strangled displaying graphics? what's your tileset, grid size and resolution? is it an integrated card (probable as it's a lappy)

I'm sure others can think of other possible reasons, that's all I got.

Dave Mongoose

  • Bay Watcher
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #2 on: May 12, 2010, 01:34:05 pm »

Just a guess because I haven't used WINE, but are there any priority settings or similar?

Maybe WINE isn't being allowed to use all of your processor.
Logged

BubbaBrown

  • Bay Watcher
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #3 on: May 12, 2010, 03:16:23 pm »

DF uses VERY INEFFICIENT drawing, rendering, and simulation routines.  WINE has a pretty long call and wrapper pipeline.  Chances are DF is drowning in excessive API calls and is having to wait for the calls to complete before doing anything else that requires the CPU.

You might be out of luck, until significant changes happen in DF's code.
Logged

LeegleechN

  • Bay Watcher
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #4 on: May 12, 2010, 03:19:50 pm »

It's almost certainly a graphics card bottleneck.
Logged

helf

  • Bay Watcher
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #5 on: May 12, 2010, 03:57:57 pm »

huh. Seems weird. It is a GMA950 gpu (heh, if you can call it that :p) and my old acer core duo laptop has the same gpu and it runs fine under ubuntu 10.04 + wine. Guess ill mess with it some more.
Logged
YOUR GAMES GLITCH: Hey, I got out of the map boundry!
OUR GAMES GLITCH: Hey, a horrid monstrosity just migrated to my fortress! Let's recruit it!

Oglokoog

  • Bay Watcher
  • [INTERNET_DEPENDENT]
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #6 on: May 12, 2010, 04:20:19 pm »

I play DF on wine quite regularly and while I don't get very good FPS, it maxes out my CPU usage just fine.
Logged
So we got monsters above, monsters below, dwarves in the middle and a party in the dining hall. Sounds good to me.
If all else fails, remember one thing:  kittens are delicious, nutritious little goblin-baiters, cavern explorers, and ambush-finders.

ItchyBeard

  • Bay Watcher
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #7 on: May 12, 2010, 05:42:48 pm »

Mess around with PARTIAL_PRINT in the init.txt file. That may give you a boost. Went from 5fps -> 30fps on one of my machines (running under wine).
Logged

BubbaBrown

  • Bay Watcher
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #8 on: May 12, 2010, 07:43:54 pm »

It's almost certainly a graphics card bottleneck.

Doubt it.  DF is a 2D game.  It's very improbable that there is any kind of graphics bottleneck.  The issue being had is something in the software pipeline.

To the OP:  I'd suggest running a few different games with WINE and see if the issues is consistent across all of them or with DF.

EDIT:  Started up an Ubuntu 10 box under VirtualBox with both 2D and 3D accelerations turned on.  Ran DF and initially the performance was horrific.  Turned on partial print and it helped somewhat.  But it seems the rendering system of DF is to blame.  For comparison, I ran Voxlap, a CPU based 3D voxel game engine example and it didn't have the slightest problem when rendering.  http://advsys.net/ken/voxlap.htm

My best guess is the wrappers and long call chains involved in WINE aren't tolerant of DF's code.
« Last Edit: May 12, 2010, 09:39:12 pm by BubbaBrown »
Logged

Corona688

  • Bay Watcher
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #9 on: May 13, 2010, 01:40:07 am »

It's almost certainly a graphics card bottleneck.

Doubt it.  DF is a 2D game.  It's very improbable that there is any kind of graphics bottleneck.
Just because its 2D doesn't mean it's not work!  It uses OpenGL and a strange and uncommonly used form of alpha-masking for rendering, which may or may not end up rendering in hardware depending on graphics hardware and drivers.  I've had horrible performance on a fast computer because of poor hardware acceleration on my video card.
Logged
You never know when you might need a berserk dwarf to set loose somewhere.

Baughn

  • Noble Phantasm
  • The Haruhiist
  • Hiss
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #10 on: May 13, 2010, 01:59:43 am »

Using a better known form of blending is something that's on my List, but it's not like the current one is marked as "slow and rarely implemented" anywhere in the opengl standard. Other than simple experience.. where did you find out that it is?

Oh, and the next version will use a separate rendering thread, so this problem gets fixed one way or another.
Logged
C++ makes baby Cthulhu weep. Why settle for the lesser horror?

Corona688

  • Bay Watcher
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #11 on: May 13, 2010, 02:20:39 am »

Using a better known form of blending is something that's on my List, but it's not like the current one is marked as "slow and rarely implemented" anywhere in the opengl standard.
Neither's variable size dots, but I've never seen anything but quadro or some odd matrox cards implement them as anything but straight pixels.
Quote
Other than simple experience.. where did you find out that it is?
Bubba wasn't wrong to be surprised that rendering was a bottleneck:  2D graphics have been hardware-accelerated for 15 years already.  Even the cheapest Intel garbage chipsets have fairly competent 2D acceleration within their limited feature-set.  But cheap chipsets mean incomplete implementations and corners cut, and 'cheap' is a frequent synonym for 'common'.
Logged
You never know when you might need a berserk dwarf to set loose somewhere.

Baughn

  • Noble Phantasm
  • The Haruhiist
  • Hiss
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #12 on: May 13, 2010, 02:29:11 am »

..in other words, nvidia/ati should be fine?

Good enough. There's a perfectly good 2D (non-opengl) mode in the code too.
Logged
C++ makes baby Cthulhu weep. Why settle for the lesser horror?

helf

  • Bay Watcher
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #13 on: May 13, 2010, 08:05:04 am »

Mess around with PARTIAL_PRINT in the init.txt file. That may give you a boost. Went from 5fps -> 30fps on one of my machines (running under wine).

Yeah, up till I got my new tower running last week, all my old boxes HAD to have partial print enabled to be playable. One of the first things I do when I download DF on a machine is enable that.

The laptop is running partial print 1.

I'm going to install some other games like was suggested and see how they do.
Logged
YOUR GAMES GLITCH: Hey, I got out of the map boundry!
OUR GAMES GLITCH: Hey, a horrid monstrosity just migrated to my fortress! Let's recruit it!

Corona688

  • Bay Watcher
    • View Profile
Re: Odd problem - Dwarf fortress *not* pegging my processor out
« Reply #14 on: May 13, 2010, 08:19:48 am »

..in other words, nvidia/ati should be fine?
Increasingly so, though not always.
Logged
You never know when you might need a berserk dwarf to set loose somewhere.
Pages: [1] 2