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.