Jump to content

User:Tarvis

From UFOpaedia

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=0

Linear Filter=1

Linear Filter=2

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)

Upcoming changes

These are things that are done but not released yet. Waiting for the next UFOExtender release so the changes can be brought up to date. (or I could make .diffs)

  • Windowed mode sets window size properly (accounting for window borders) from D3D Window Height/Width options instead of from D3D Window Position (which now only stores X and Y)
    • 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 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. Instead of specifying a resolution-dependent scale factor for the screen, the setting sets the game's aspect ratio no matter what the D3D resolution is. (Default is 16/10)

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
  • Disable mouse clipping when game is not in focus (alt+tabbed out/minimized)
    • This already happens for Fullscreen mode which is nice
  • 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 is called by the game itself and not the patcher
  • Raise cap for new "Battlescape Speed" value as 5 still seems too slow
The values I put into each setting are just initial values. There is no way for me to evaluate what settings are needed for faster systems. What kind of system are you running (Are you using any other speed mods)? When I set the value to 5, the icon above the current unit and smoke animations are blurrs with an occasional pause. I have a five year old laptop with XP.
update: What are you using to zip the files? I get an 'unknown method' error on all the files except for patcher.dll -Tycho.
I have a Phenom II X4 on Windows 7, with just the stock .EXE and no other speed changes. At setting 5, the unit selection arrow only moves for me at about 3 times a second. FPS setting is not capped. The reason I'd like to uncap the Battlescape Speed value is so that the value can be adjusted for any system since performance on other machines can't be anticipated. Also, I repackaged the .zip (using Windows this time, before I used 7zip) and uploaded it. -Tarvis
Strange. I have a Core Duo, with XP Home that I got in 2006. How does the game run if the option is disabled? The delay at setting five is 34ms-(time to run through the next loop of the battlescape routine[ms]). Are you running with any compatibility options of Windows 7? Thanks for uploading a new version of the zip, BTW!-Tycho
Nope, no other settings. With it turned off it runs at blazing blur speed (unless FPS cap is on, but if I do it that way it's still a bit too fast) I figure if I could set it to 10 or 15 it would be just fine. Weird that it runs slower for me than it does for you, though... -Tarvis
For me, 5 is ploddish (about 3fps sounds about right), 1 is crawling, and 0 is full speed (a blur). Works the same on both my XP and 7 rigs. I'm inclined to blame graphics drivers for any discrepancies people see (over hardware or OS), given that my XP rig used to have usable scrolling without mods until I upgraded them. -  Bomb Bloke (Talk/Contribs) 02:02, 29 December 2012 (EST)
Thanks BB! I'm thinking I'll set the possible delay values at 68, 51, 34, 16, 10, and add and option for 6. - Tycho
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)