Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

Having tested both 2D and STANDARD, how is 40d19 compared to 40d?

Faster, no (unknown) problems
Faster, problematic
Same speed, no (unknown) problems
Same speed, problematic
Slower, no other (unknown) problems
Slower, problematic
Doesn't work at all

Pages: 1 ... 17 18 [19] 20 21 ... 34

Author Topic: FotF: Dwarf Fortress 40d19  (Read 163426 times)

Quatch

  • Bay Watcher
  • [CURIOUSBEAST_ GRADSTUDENT]
    • View Profile
    • Twitch? Sometimes..
Re: FotF: Dwarf Fortress 40d19
« Reply #270 on: March 12, 2010, 02:15:52 pm »

Encounted a problem in [PRINT_MODE:2D]: (system: OSX 10.6; macbookpro2,1 [intel, ATI])

/Volumes/WinCog/DFcoop/df_osx_d19/df ; exit;
$ /Volumes/WinCog/DFcoop/df_osx_d19/df ; exit;
Loading bindings from data/init/interface.txt
Using 2D mode
2010-03-12 14:05:31.181 dwarfort.exe[29214:903] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.

A window is briefly displayed, then disappears. The program must be force-quit.
Logged
SAVE THE PHILOSOPHER!
>>KillerClowns: It's faster to write "!!science!!" than any of the synonyms: "mad science", "dwarven science", or "crimes against the laws of god and man".
>>Orius: I plan my forts with some degree of paranoia.  It's kept me somewhat safe.

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #271 on: March 12, 2010, 04:31:35 pm »

Could it be that legendsmode is also botched a bit? The map-export has a very odd behavior for me.
Logged
[sarcasm] You know what? I love grammar Nazis! They give me that warm and fuzzy feeling. I am so ashamed of my bad english and that my first language is German. [/sarcasm]

Proud to be a Furry.

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #272 on: March 12, 2010, 04:33:24 pm »

Could it be that legendsmode is also botched a bit? The map-export has a very odd behavior for me.

Known bugs
- Image export is generally broken; some don't work, some actually freeze the game. Don't try it.
Logged

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #273 on: March 12, 2010, 05:03:25 pm »

Could it be that legendsmode is also botched a bit? The map-export has a very odd behavior for me.

Known bugs
- Image export is generally broken; some don't work, some actually freeze the game. Don't try it.

I can actually export maps but in a odd way. The export starts just normal but after the first raw it seems to halt. If i zoom in with the mouse-wheel it does one or two additional rows - if i do that often enough to reach the last row the picture gets exportet.

anyway i did forget to check the first post on that issue. Please excuse me for that.

edit: Baughn i dont know which opengl version you use but the the "khronos group" has released the versions 4.0 and 3.3. The later adds 4.0 features and updates but keeps compatibility to older software.
« Last Edit: March 12, 2010, 08:29:22 pm by Heph »
Logged
[sarcasm] You know what? I love grammar Nazis! They give me that warm and fuzzy feeling. I am so ashamed of my bad english and that my first language is German. [/sarcasm]

Proud to be a Furry.

Xgamer4

  • Bay Watcher
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #274 on: March 12, 2010, 08:03:00 pm »

Yes. As for mac keybindings, I expect we'll just ship a different interface.txt for macs - once the format is settled.

(Well, it pretty much is, but you never quite know.)

Can I make a request to ship with an interface.txt for laptops, too? All you need to do is swap the secondary scrolls to []-=, so they're off the numpad.
Logged
insert something mind-blowing/witty here*

DDR

  • Bay Watcher
    • View Profile
    • Frogatto
Re: FotF: Dwarf Fortress 40d19
« Reply #275 on: March 14, 2010, 01:21:05 am »

Works fine for me, but...
Dwarf Therapist won't read/write to it. :'(

I thank you greatly for the massive improvements you have made to DF. :)
Logged
Il Palazzo: "Urist, quick, grab your ax! There's a troll rampaging through the decimal conversion chambers!"
melomel: DF is like OCD candy, isn't it? existent: No, DF is like the stranger in the trench coat offering the candy.

bombcar

  • Bay Watcher
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #276 on: March 14, 2010, 01:26:18 am »

It should (in theory) be possible to easily switch between multiple interfaces from the game itself.

Anyway, on my Mac OS X system, my "backspace" key is giving me the little home plate icon when trying to delete letters in the Zoom name (F1, etc).

Also, if I go to the "z" menu where you can see all the dwarves and stocks, the first dwarf image is preserved when I look at other things. I'm using 2DASYNC; not sure why. I'll try SHADER again.

Would it be possible to make a small utility that simply reported the scancode of the key you pressed? Especially on Mac OS X, I can't seem to find one, and I want to know if certain keys on my keyboard are the same scancode or different ones (I have 122 keys!).
Logged

Qiu

  • Bay Watcher
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #277 on: March 14, 2010, 02:38:00 am »

Would it be possible to make a small utility that simply reported the scancode of the key you pressed? Especially on Mac OS X, I can't seem to find one, and I want to know if certain keys on my keyboard are the same scancode or different ones (I have 122 keys!).
I use UIbrowser for my applescript needs (it gives the applescript keycode of any key pressed) , not sure it's what you need ??? , pic in the spoiler tag. PreFabUIBrowser205.dmg
Spoiler (click to show/hide)
Logged

Ranzear

  • Bay Watcher
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #278 on: March 14, 2010, 03:30:47 am »

Is it just me, or is the 'Sort by distance/Sort by value' hotkey missing from the trade screen? I'd swear it was X or something, but I've mashed everything now. Probably a broken bind again like inking bridges in d17.

I neeeeed that thing, lol.
For some reason the treasurer screen said I had gotten to highest precision, but the 'sort by value' didn't appear til the next season. Odd.
« Last Edit: March 14, 2010, 05:21:56 am by Ranzear »
Logged

Rafal99

  • Bay Watcher
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #279 on: March 14, 2010, 10:21:03 am »

You need a trader with at least [no label] Appraiser skill to see value of the items, and sort them using that.
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

Linknoid

  • Escaped Lunatic
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #280 on: March 14, 2010, 11:44:39 am »

Hey, I have a little bit of experience with using OpenGL/SDL for 2D graphics.  I wrote a screensaver in SDL, but couldn't get it to work as a screensaver using SDL, so I ported it to use OpenGL.  Anyway, I was kind of interested to see what the graphics code looks like for DF, so I visited the github.com link.  I couldn't find any of the SDL code in there, so I guess that must be basically the initial upload.

Anyway, I just thought I'd share what I learned from optimizing my screensaver, in hopes that maybe I can help a little.  Or maybe not.  A situation where it's redrawing each pixel every single refresh probably has different characteristics than one where it's only redrawing sprites when they change.

I figured the compiler would optimize away some of this stuff, but even with gcc -O3, I got many times speedup doing a few simple things:

1.  Don't mix floating point and integer math.  OpenGL screen coordinates are floating point, but SDL's are integers.  I thought if I stayed in integer calculations as long as possible, and then do a cast to float would be more efficient, but it turned out that even a single cast from int to float was a real performance killer.

2.  Calculating loop bounds early.  If you say something like "for (i = 0; i < Min(x, width); i++)" it has to calculate "Min(x, width)" every single loop, even if it's not changing.

3.  Similarly, one of my biggest speedups was simply not recalculating values that have already been calculated.  I noticed that graphics.cpp had lots of code that looks like this:

Code: [Select]
if(screen[x*dimy*4 + y*4 + 1]==screen[x*dimy*4 + y*4 + 2])screen[x*dimy*4 + y*4 + 1]=0;
 screen[x*dimy*4 + y*4 + 3]=0;
if(screen[x*dimy*4 + y*4 + 1]==0&&screen[x*dimy*4 + y*4 + 2]==0&&screen[x*dimy*4 + y*4 + 3]==0)screen[x*dimy*4 + y*4 + 3]=1;

Notice how "x * dimy * 4 + y * 4" is used over and over.  My initial code was full of stuff like that as well.  But probably half my optimization gains came from simply calculating values like that into a local variable ahead of time:

Code: [Select]
int screenindex = x*dimy*4 + y*4 + 1;
 if(screen[screenindex]==screen[screenindex + 1])screen[screenindex]=0;
 screen[screenindex + 2]=0;
if(screen[screenindex]==0 && screen[screenindex + 1]==0 && screen[screenindex + 2]==0) screen[screenindex + 2]=1;

And it has the side benefit of making the code a bit easier to read.

Obviously, these kinds of optimizations are only really important for stuff that happens in loops on every refresh.
Logged

Jamp

  • Bay Watcher
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #281 on: March 14, 2010, 12:56:32 pm »

First, thanks for great job, I see real improvements from d18 here.
I have reported that big-screen crash bug few times, and this may be connected, but I got it using a bit smaller window, so maybe not. Basically, game crashed with error message when I tried accesing thoughts and preferences (VBO, don't remember exact resolution, just stretched the window not to fit entire screen).
Error message:
Spoiler (click to show/hide)
Logged

bombcar

  • Bay Watcher
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #282 on: March 14, 2010, 01:13:25 pm »

I've updated Dwarf Fortress.app with the latest d19. You can download it here:

http://schnecke.bombcar.com/random/d19.zip

Note that this is NOT the full version! You need to apply it over your normal d19 download! Extract Dwarf Fortress.app from the ZIP file and place it in your DF directory.

You can then delete the df script and dwarfort.exe if you wish; they're not needed.

NOTE: A side effect of this is that the errorlog.txt and gamelog.txt files (or similar) get put in the root of your boot drive. Not sure why. Soon I will write a build script that makes Dwarf Fortress.app.

I cannot move the raw and data directories into the bundle; Toady would have to use NSBundle and CFBundleRef to find them.

I may try to see if I can get Battle Champs to use those.
Logged

jfs

  • Bay Watcher
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #283 on: March 14, 2010, 01:43:37 pm »

I cannot move the raw and data directories into the bundle; Toady would have to use NSBundle and CFBundleRef to find them.
Since those folders contain data the user might want to modify they shouldn't go into the bundle anyway. For example, the data folder contains savegames, those really shouldn't be written into the bundle.
Logged

koitsu

  • Bay Watcher
    • View Profile
Re: FotF: Dwarf Fortress 40d19
« Reply #284 on: March 14, 2010, 02:06:27 pm »

Notice how "x * dimy * 4 + y * 4" is used over and over.  My initial code was full of stuff like that as well.  But probably half my optimization gains came from simply calculating values like that into a local variable ahead of time:

Whatever compiler you're using is amazingly horrible if what you said is indeed true.  Compilers are supposed to do *exactly* what you describe on their own.  You'd have to post the assembly code associated with the C code piece as proof.  I'm pretty certain that if you're using Intel, Microsoft (VC), or gcc 3.2.x+ that the code in question would be optimised to do what you describe (very likely shoving the contents of the "base" calculation into a register if possible/available, otherwise into a temporary variable).  This is, of course, assuming you're building with -O or -O2.  And likely with gcc, there's probably an -f argument which affects the optimisation behaviour in cases like this (can't be bothered to look it up).

Also, you don't want to be using "int" in that statement; you want an unsigned int, preferably uint32_t.  What is it with "programmers" constantly using signed numbers, only to be bit by the mistake years down the road, inducing serious pain as half their functions have been written with the same mistake and all kinds of horribly disgusting typecasts being used to "fix the problem" when in fact they just mask it?  :-)
« Last Edit: March 14, 2010, 02:10:54 pm by koitsu »
Logged
Making life hard for others since 1977.
Pages: 1 ... 17 18 [19] 20 21 ... 34