Nov 14, 2020

Sea of Thieves, Windowed Resolution

For me on Windows 10 using a NVIDIA GeForce RTX 2080 SUPER, Sea of Thieves resolution settings are ignored. When I set to full screen, it works as expected. When I set to windowed mode, it uses the screen's max height, and displays as a borderless window locked size mode. Changing the resolution doesn't change anything. After messing with it for a while, I got the resolution to listen to me.

First, in Steam, Right Click on the game in Library -> Properties... -> Set Luanch Options -> Enter: -WINDOWED
If you aren't on Steam, you should be albe to set launch options in your launch application of choice, or the shortcut of your game (via right click of the desktop icon -> Properties -> Target "[LaunchLocation]" -WINDOWED
Within the game, go to windowed mode in the game's Video Settings
Shift+Right click the program in task bar -> Maximize
This will get the game to display the title bar with Min/Max/Close buttons.
Now, when you change the resolution... it still won't do anything, but then messing with Display mode will get it to apply the given resolution! Having the launch setting set to -WINDOWED locks the game to windowed, which is nessisary for the game to apply this resolution. I think the dev has the resolution being set as you leave windowed mode instead of entering it, causing this bug.

Nov 8, 2020

Data from MDF to SQL Script

I needed to export my data out of a MDF SQLServer file so that I could import it into a PostgreSQL database. In case we figure out time travel, or in a few years I need to remember how to get data out of a mdf, a series of images.

In server explorer, right clicking a connected mdf and selecting Browse in SQL Server Object Explorer provides a way to export a table's schema.
In the SQL Server Object Explorer, Right click on the MDF's table->view data, followed by the second script icon "Script to File" gives the SQL server format insert statements. I still had to convert from that into PostgreSQL, but that wasn't too hard once the data was in my hands.

Aug 19, 2020

Fun with Virtual Monitors

tl;dr: This is a rambly post about trying to get a Virtual Monitor setup to work with a multi monitor display.

Fought with monitors tonight. Couldn't get a second monitor to work (Display Port). I've been using a UHD hdmi monitor for the last two weeks. Even after unplugging the HDMI and only running the DP, nothing would show up. Since the UHD is a smart tv, every time I unplug/replug the monitor, it decides to screw with it and go into detect the device mode.  Mind you, when it does this, the screen comes up normal like it always has for about 3 seconds, then that gets hidden by the detection software of the smart tv, which eventually decides it is a 4096x2160 that I don't want fit to screen so it should display the center 3840x2160 pixels. Now I know how to get to the setting that doesn't fit to screen... but then... if the 4096x2160 is fit to screen, that means it doesn't actually display that size... then why is it reporting to Windows that it can if it is faking that size? Looking at it, I can't tell if anything is stretched or not.

So three restarts later I've got 2 Display Port monitors and an UHD HDMI monitor. Index still throws a 108 with "Last USB device malfunctioned) error, so that doesn't appear to be solved by getting the DPs working. But now, DisplayFussion's taskbars are fighting with Window's taskbars for which should be displayed and how. I've got DF's settings set to use the UHD as a 2 by 2 virtual monitors which does good for maximizing to quadrants of the UHD, and has split up taskbars for these 4 Virtual Monitors (VMs), but now every 10 seconds or so, the taskbars flash back and forth as windows things "Wait... isn't the main bar suppose to be across the entire bottom? and isn't the second monitor's bar supposed to be on top?" and DF replies "No Windows, the main taskbar is supposed to be the bottom left VM, and that's it. Stay on your half of the bottom of the UHD."

Found a post from 5 years ago asking NVidia to handle virtual monitors at the hardware level, telling windows "Yea... I've got 4 screens here, each 1920x1080 in a 2x2 square" and then let windows dictate what happens on these multiple monitors, allowing full screen, toolbars and windows to appear as separate screens, and NVidia pushing those displays out as the one UHD.  This is the way to use UHDs.  A seamless multi monitor. (I don't have a link to that post, as that was a week ago that I read it).

One of the things that DisplayFussion doesn't do right is the windows key + arrow keys. On a monitor, this means "move to this half of the screen", but in Virtual Monitors, it pushes it to the VM on that side, instead of that half of the VM.

Virtual Display Manager V3 is another Virtual Monitor tool. It doesn't do toolbars, but does one up DF in the full screen of a youtube video department. DF's VM full screen takes up the full UHD. VDMv3 correctly full screens to the given VM.
The bottom of my screen is still flickering, even after returning to 3840x2160 without fit to screen. I don't _think_ it's been there all this time.

Jun 26, 2020

Dealing With Cached CSS Files

If a stylesheet is updated and sent to prod, the customer's computer usually won't get the updated version for a while since their computer has a cached version of that file on their machine. This can often make the website look bad. There is a super simple solution to this. Adding a query string to the css request request makes the browser think it is a different file, even if the server still gives the same file regardless of the query string.

<link rel="stylesheet" href="/assets/css/main.css?version=20200626" />

Learnt this from Gordan of WPReset, who was a bit more verbose about this problem and solution.

Jun 7, 2020

VR Room Motion Curator: Hellblade: Senua's Sacrifice

Most of the game plays in Room Motion Level 2 Intensity, using a third person camera that soft follows Senua in a way that I think should be used by other games seeking to use VR with console controller input. A joystick is dedicated to pushing the camera around, which defaults to 45 degree snap rotation with an option to use smooth rotation for those that can handle smooth Yaw rotation.

The game has a lot of cutscenes. When these start, the viewpoint for the VR player shrinks to a theatre like experience, using a mostly black room with a wide window to view the cutscene. These scenes are L5 with a significant blinder, except when the start and end. There is a transition time that the theatre mode pulls in and out, and the scene sometimes starts doing L5 actions before the blinder is in place. The opening cutscene, and a midway cutscene both have long L5 sequences.

In the opening scene, the viewpoint starts floating just above water, catching up to a log canoe that is traveling away from you, and eventually joins into the third person camera while Senua continues to travel the intro scene. The audio queue of "She can't go back now" is about the time that this finally finishes, if you need to keep your eyes closed through-out this.

In the midway cutscene, the theatre mode opens up way too early. Avoiding spoilers, it is a long walking scene of Senua going up a hill while the camera faces her. At the top of the hill, the theatre mode opens up, and the on rails cutscene continues for another few minutes.

Using ladders and traveling up or down stairs can cause vertical camera movement.
I wrote an article about Levels of Room Motion Intensity to make it easier to communicate Room Motion in games.