Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Print Mode  (Read 10501 times)

duckInferno

  • Bay Watcher
    • View Profile
Print Mode
« on: October 12, 2010, 07:11:45 am »

Quote
These settings can have a significant impact on frame rate, especially for people that have slow frame rates on the title screen.  Available modes are 2D, 2DSW, 2DASYNC, STANDARD, PARTIAL:<number>, ACCUM_BUFFER, FRAME_BUFFER and VBO. The number after PARTIAL refers to how many frames it will redo a printed tile before skipping it, so you might try increasing it a bit if you have flickering when PARTIAL is set.  Please note that any of these combinations might cause frame rates to drop significantly or cause unpleasant side effects like flickering.

By and large, 2D should be the most reliable, while STANDARD has a good combination of speed and reliability. However, all 2D modes are normally far slower than even STANDARD, which may be the slowest OpenGL mode.

2DASYNC may be slightly more responsive than 2D on a multi-core machine, but this has recently become doubtful due to improvements to the other modes.
There's not much info here and my google-fu is not strong enough to find any advice on which print mode to select.  I've sort of always just left it on 2D or standard, but for a fast windows PC, would there be any benefit to trying one of the other mysterious options?
Logged
HAHAHA YES MY EXPIDITION LEADER IS PARTYING WITH GHOSTS THIS IS THE BEST UPDATE EVER

negorath

  • Bay Watcher
    • View Profile
Re: Print Mode
« Reply #1 on: October 12, 2010, 08:52:15 am »

Your google-fu is indeed not strong enough :D

Quote
2D: Use 2D graphics (SDL) for everything. This works everywhere; SDL deals with any double-buffering that needs to be dealt with. Kinda slow, though. Otherwise works basically like partial:0.

STANDARD: Actually, rendering the entire screen every frame isn't that slow, if you do it via OpenGL and have reasonable code. That's what this mode does.

PARTIAL: On some setups, just rendering the tiles that changed worked. Partial does just that; PARTIAL:2 renders each changed tile three times, in consecutive frames, to cover triple-buffering. Unfortunately many newer GPUs discard and overwrite the frame-buffer between frames, and then this doesn't work.

ACCUM_BUFFER: Uses the ancient glAccum call to save and restore the contents of the window between frames, working around the driver's discarding its contents. Usually the slowest mode of all, but some people have had good results. Presumably the others are even slower for them.

FRAME_BUFFER: Basically the same thing, but using newer GL frame-buffer extensions to render to a texture instead, and blitting that texture to screen once a frame. It saves at least one copy vs. accum-buffer.

Both frame-buffer and accum-buffer use partial:0 under the covers, they just wrap that method appropriately in order to avoid flickering.

VBO: A variant of STANDARD that uses vertex buffer objects to explicitly tell the GPU what data doesn't change between frames, namely the location of the various tiles. This marginally improves performance vs. standard, if it works, which it should.

SHADER: Dumps the entire DF graphics array to GPU memory, and programs the GPU to interpret it on its own. Dramatically improves performance, but basically only works on geforce 8000-series and above, or the equivalent ATI. I think there's some 7000-series card (7950?) that also supports such shaders, though.
Logged

negorath

  • Bay Watcher
    • View Profile
Re: Print Mode
« Reply #2 on: October 12, 2010, 08:54:42 am »

And to answer your other questions, you get the best quality from 2D, but it's also the slowest mode; and STANDARD is a good all-rounder if you don't have a relatively powerful PC.
Logged

Lordinquisitor

  • Bay Watcher
  • Innocence proves nothing.
    • View Profile
Re: Print Mode
« Reply #3 on: October 12, 2010, 10:01:07 am »

I can only run 2D. If i use standard for example my game crashes upon launch. Any ideas how i might fix that?
Logged

duckInferno

  • Bay Watcher
    • View Profile
Re: Print Mode
« Reply #4 on: October 12, 2010, 02:40:32 pm »

Cheers, informative.  I'll give shader a go :)
Logged
HAHAHA YES MY EXPIDITION LEADER IS PARTYING WITH GHOSTS THIS IS THE BEST UPDATE EVER

thvaz

  • Bay Watcher
    • View Profile
Re: Print Mode
« Reply #5 on: October 13, 2010, 11:50:43 am »

I didn't knew about the Shader option. There is nothing in the file about it.
Logged

negorath

  • Bay Watcher
    • View Profile
Re: Print Mode
« Reply #6 on: October 13, 2010, 06:28:08 pm »

I didn't knew about the Shader option. There is nothing in the file about it.

Think it was something Baughn was working on, but not sure if it's still a WIP or not though. I guess his focus is on TrueType Font support at the moment.
Logged

decius

  • Bay Watcher
    • View Profile
Re: Print Mode
« Reply #7 on: October 13, 2010, 07:22:15 pm »

I can confirm that it will run with
[PRINT_MODE:SHADER]
I don't notice any performance change offhand from
[PRINT_MODE:VBO]

ATI Radeon 5800 series video card, since hardware was mentioned.
Logged
TBH, I think that all dwarf fortress problem solving falls either on the "Rube Goldberg" method, or the "pharaonic" one.
{Unicorns} produce more bones if the werewolf rips them apart before they die.

Fellhuhn

  • Bay Watcher
    • View Profile
Re: Print Mode
« Reply #8 on: October 14, 2010, 02:27:45 am »

I never had the impression that the graphics were killing fps but the huge amount of pathfinding and other calculations.
Logged

Dral

  • Bay Watcher
    • View Profile
Re: Print Mode
« Reply #9 on: October 14, 2010, 01:43:39 pm »

I never had the impression that the graphics were killing fps but the huge amount of pathfinding and other calculations.

Am I the only one that read that and thought of OpenCL?

I am? Oh. Sorry. I'll go back to my cave now.
Logged