User:Tarvis

From UFOpaedia
Jump to navigation Jump to search

UFO Extender D3D tweaks

Get here: ufoe_d3dtweaks.zip

For TFTD: tftde_d3dtweaks.zip


I've added a couple features to d3d.cpp. (Based on UFO Extender v. 1.29. and TFTD Extender 1.061.1)

  • Width/Height options for fullscreen resolution (D3D Width/D3D Height in .ini). Set both to 0 to use current desktop resolution (default/original behavior)
  • Bilinear Filtering option (Linear Filter in .ini) Setting to 2 will prescale the game first, which will be a compromise between blocky and blurry.

Linear Filter=1

Scalers linear1.png

Linear Filter=2

Scalers linear2.png

Linear Filter=0

Scalers none.png

Thanks for the great work! I definitly can tell that the image is sharper with the Linear=2. Although, I don't see much difference if it is =1 vs =0. Bad eyes, old system, or am I not looking for the right things?- Tycho
It's because Imgur converted them to .jpgs. I'll make (smaller) example images and upload them here. (done)

New changes

These are things that have been recently added to the package.

  • Reading the window size from the .ini didn't account for window borders and the title bar, so the actual client resolution was smaller. Fixed that.
    • For clarity, window size is now stored in their own options ("D3D Window Width" and "D3D Window Height") instead of them being tacked on at the end of the D3D Window Position option.
    • D3D buffer is resized when window is resized instead of just scaled
  • Mouse scaling was scaled to height 240 instead of 200, resulting in the cursor moving faster vertically. Fixed; now Scale Mouse=1 makes it 1:1 with the Windows cursor
    • Mouse scaling/clipping is now adjusted to the aspect ratio setting
  • Mouse clipping is always enabled in fullscreen mode
  • Mouse is unlocked when game is unfocused (alt+tabbed out)
  • Mouse no longer goes too far right/down when Scale Mouse=0 (uses mouse clipping to accomplish this; no conflict with Clip Cursor setting since mouse is always scaled in windowed mode)
  • Screen Ratio INI setting behavior is changed. Set to 1 to letterbox the game to 16/10 (if needed), or specify your own ratio to scale the game to, in fraction or ratio form (4/3, 16:9, etc)

Things I'd like to look into eventually

  • Alt+Enter to toggle fullscreen
    • Might have to make it an F# key to avoid conflicts with the keyboard shortcut mod
    • Or make it so holding Alt will disable keyboard shortcuts
  • Make Alt+F4 close the game when fullscreen too
  • Add option to keep redrawing screen even if nothing is changed. This will fix issues with Steam Overlay and others.
    • I'm not sure I can do this without assembly knowledge, since the function to update the screen texture is called by the game itself and not the patcher
    • On further experimentation, a new looping thread calling D3D_Render(); works but I still need to get framerate limit delay working with it properly
  • Raise cap for new "Battlescape Speed" value as 5 still seems too slow
I finally figured out how to get the game to read the value and patch that into the program directly. It was actually quite simple. I was trying to be TOO creative. So, now the player can directly set the delay (in ms) and fine tune it for their particular system.-Tycho 23:20, 31 December 2012 (EST)
  • Perhaps move music/MP3-related settings into its own .ini file (so if someone releases a music pack they can make a music.ini for it instead of making the user copy/paste it into his own UFOExtender.ini file)
  • Get the MP3 engine to play Intro tracks too (AbraM's MP3 and/or FMOD patch does this, perhaps I could look there)
  • Slow down text screens (ending) in TFTD (so you can read them before they switch)
    • Or perhaps an option where they don't automatically advance at all (click/key to advance)