Bay 12 Games Forum

Please login or register.

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

Author Topic: What would it take to make Dwarf Fortress take advantage of Retina displays?  (Read 3683 times)

jecowa

  • Bay Watcher
    • View Profile

A Retina-aware Dwarf Fortress would be really convenient for running 32x32 graphics packs (e.g. Meph, Vordak, Dawn Fortress, Tergel) on 13 to 22-inch screens without having to change the screen resolution to something that makes the text really tiny in other apps.

To properly use a 32x32 graphics pack that's being scaled to 2x, it would take a 5K display (5120 pixels wide).

How impossible exactly would Retina support be?
Logged

falcn

  • Bay Watcher
    • View Profile

I'm pretty sure that you can utilize retina to its full potential by specifying physical display resolution as your full screen resolution, and going fullscreen.

If I remember it correctly, TWBT allows you scale playing field and menu text independently. I will try it tomorrow when I'll get home.
« Last Edit: January 19, 2018, 02:56:46 pm by falcn »
Logged

jecowa

  • Bay Watcher
    • View Profile

The downside to this is that it makes the UI and text in other apps really tiny. There's an app that will switch your resolution for you automatically whenever you switch between apps. I'm guessing that switching resolutions all the time would be annoying even if it's automatic, though.

It'd be nice to be able to tell the computer to not use resolution doubling on Dwarf Fortress.
Logged

falcn

  • Bay Watcher
    • View Profile

No, I meant setting real resolution (2880x1800 for 15" retina) in DF settings (or LNP->Advanced->Fullscreen) and press F11 in game.

It will not affect OS X.
Logged

jecowa

  • Bay Watcher
    • View Profile

Oh, sorry. Thank you for the suggestion! It sounds promising.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki

I was recently trying to add full retina support, this requires a patched version of SDL and support in TWBT. It sort of worked, but number of things needed fixing. Eventually I'll do it.

Unfortunately the old SDL 1.2 which DF is using does not support retina, so Toady can't easily do it.

jecowa

  • Bay Watcher
    • View Profile

I was recently trying to add full retina support, this requires a patched version of SDL and support in TWBT. It sort of worked, but number of things needed fixing. Eventually I'll do it.

Unfortunately the old SDL 1.2 which DF is using does not support retina, so Toady can't easily do it.

I was worried that Leopard wouldn't work with SDL 2.0, but it looks like it does
Quote from: SDL FAQ
SDL 2.0.0 supports Mac OS X 10.5 and newer, using either Xcode or the classic Unix-style build system.

Eventually I'll do it.

Oh, you can add Retina support even without Toady's help? That would be awesome! This feature is becoming more useful with higher-resolution graphics packs becoming more common. It would make both the 13- and 15-inch Retina Macbook Pro models great choices for use with 32x graphics packs.
Logged

Shonai_Dweller

  • Bay Watcher
    • View Profile

Toady asked recently for people to let him know what the advantages of upgrading to SDL 2.0 were. I don't know if the conversation continued offline, but on the forum it kind of went nowhere. Concluded with 'lots of things' and 'not worth the effort'. Pity.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki

The main advantage that it's supported - upgrade once and rest assured it won't break on newer OS versions and will support whatever new features they will get.

Feature-wise, apart from retina support, I don't know.

jecowa

  • Bay Watcher
    • View Profile

Japa wanted SDL 2.0 to integrate Armok Vision more closely into the game using the multiple windows feature. I think it would help him allow players to use Armok Vision as their main window into the game by allowing the directional commands to be given from the viewpoint of the Armok Vision window instead of the normal bird-eye-view game window.

SDL2 adds support for:
  • hardware-accelerated graphics
  • multiple displays
  • proper Unicode
  • multi-touch
  • clipboard (copy-paste)
  • OpenGL 3
Here's the full list:
Spoiler (click to show/hide)

I think the only disadvantage is that it would take time to do it. SDL2 uses a different API than SDL1.

The SDL2 frameworks all say that they are compatible with OS that SDL 1 is. The files are a bit larger, but not by too much. If an SDL upgrade is going to have to happen eventually, it might be better to do it sooner than later. I'm curious about the DFHack developers thoughts on SDL 2.0, though. I think SDL is really important to DFHack.
Logged

falcn

  • Bay Watcher
    • View Profile

Just a reminder that you already can get 100% Retina support for 32px tilesets by pressing 1 button (F11). Community awareness of this fact is low, but it can be easily addressed by "Lazy packs" maintainers. Rename "Fullscreen" to "Fullscreen Retina support - press F11 in game" and auto fill physical screen resolution, or instruct the player to type it manually.

The only problem with that is inability to multitask as easily as with DF in window mode, since you can't CMD-Tab out of full screen DF. When I need to look up something in wiki, or use Dwarf Therapist, I need to go back to windowed mode first (F11).

Windowed mode retina support (switch to SDL 2) will address multitasking issue.
Logged

jecowa

  • Bay Watcher
    • View Profile

I haven't tested the full screen Retina support trick yet. Have you tried it out?

Maybe Spaces could be some how used to make Cmd-Tabbing possible while in full-screen mode? Sometimes I think I accidentally activate this feature while in Firefox.

Another problem with using full screen is that F11 is used by Exposé to show the desktop. Either this has to be changed in the System Settings or the DF keyboard config needs to be edited to use a different key.

For Lazy Newb Packs, I think some lines added to the DF and DFHack launch scripts could check the user's screen resolution and edit the init file based on it every time the game is launched. It might be possible to make the feature toggleable with a DFHack tab setting.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki

Just a reminder that you already can get 100% Retina support for 32px tilesets by pressing 1 button (F11).

Have you tried this yourself? I didn't work for me.

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki

Another thought - I believe all SDL code should be in libgraphics source code for which is available. We can migrate it to SDL 2 ourselves and give the code to Toady.

falcn

  • Bay Watcher
    • View Profile

Just a reminder that you already can get 100% Retina support for 32px tilesets by pressing 1 button (F11).
Have you tried this yourself? I didn't work for me.
I'm playing DF with retina support since 2014. This is Meph tileset on my 12" Macbook. Everything is razor-sharp, and I can zoom in and out both the tileset and text without unexpected drops in visual quality.
Code: [Select]
[FONT:curses_vector_48x72.png]

[GRAPHICS:YES]
[GRAPHICS_WINDOWEDX:1152]
[GRAPHICS_WINDOWEDY:710]
[GRAPHICS_FONT:Meph_32x32.png]
[GRAPHICS_FULLFONT:Meph_32x32.png]
[GRAPHICS_FULLSCREENX:2304]
[GRAPHICS_FULLSCREENY:1440]
Maybe Spaces could be some how used to make Cmd-Tabbing possible while in full-screen mode?
No, you can't multitask from fullscreen DF without pressing F11. There is no other way. You can Command-Option-Esc, but it will close DF. Many Mac fullscreen games behave like that.
Another problem with using full screen is that F11 is used by Exposé to show the desktop.
Press Fn-F11. I agree, remapping full screen key by default in Mac starter packs to something more accessible is a good idea. Remapped mine to `

Updated the post to use GRAPHICS_FULLSCREENX, since FULLSCREENX is not relevant
« Last Edit: January 21, 2018, 07:12:31 am by falcn »
Logged
Pages: [1] 2