mifki / df-twbt

Text Will Be Text
187 stars 30 forks source link

twbt graphic mode not work in RDP session #26

Open AndyScull opened 9 years ago

AndyScull commented 9 years ago

System: Win7 x64, connecting through rdp from same OS. Plugin throws error about GPU acceleration after I enter fortress mode (menu and loading screen work fine). All other vanilla DF graphic modes do not produce the error TWBT_LEGACY mode crashes on df startup

Lucatir commented 9 years ago

I could be wrong, but as I recall, RDP does not support hardware graphics acceleration and if that is the case, I think that DF fallbacks to 2D rendering when it can't use the GPU and since TWBT requires hardware acceleration, it naturally will error out.

AndyScull commented 9 years ago

Guess the main page should have system requirements added. I wonder in that case, would it be possible to make multilevel part of plugin active with vanilla DF graphic options? It's the only functionality I use. Or, even better, add software accel option to twbt.

pronvit commented 9 years ago

Oh well I never thought anyone would run it via RDP so never tried it either.

Multilevel requires shadows and fog to distinguish between levels which is too much work to implement again for non-opengl mode. I'll check what's the problem with RDP.

AndyScull commented 9 years ago

OpenGL is acting strange in rdp sessions... For example - I can run DF in opengl mode (frame_buffer) while at the computer, and later connect to it through rdp and previously ran DF instance will work. That's why I was asking about pure software implementation

Lucatir commented 9 years ago

Like I said, it could just flalback to 2D rendering when it fails to do so with OpenGL. That feature at least is programmed into DF.

Edit: not sure if it can do that after the game has launched, though.

daagar commented 9 years ago

I realize this is a very rare use-case, but I do actually play via RDP on occasion and was bitten by this same issue. AndyScull's post made me realize it wasn't a lost cause.

There is a hackish way to work around it though. Create a simple .bat script that does the following (the below code assumes the .bat file is in your Dwarf Fortress directory):

tscon <sessionid> /v /dest:console
"Dwarf Fortress.exe"

You can find the correct session id by running "qwinsta.exe"

This simulates just what AndyScull's example above did: It disconnects your RDP session, and launches Dwarf Fortress locally on the host. You then simply reconnect your RDP session and voila - DF will be there running as expected. No need to actually be at your host machine to launch it.

daagar commented 9 years ago

Turns out this is fairly easy to integrate into pyLNP as well (ie., the Launcher utility used by the DF Start Pack) so you don't lose out on the goodies the Starter Pack provides:

df_filename = 'Dwarf Fortress.exe'

to instead be

df_filename = '<your batch file>.bat'

All your settings from the regular DF Starter Pack will be recognized and used.