Friday, February 7, 2014

Game progress update

It's work... but its feeling more like play now.

Since the last update a couple of weeks ago I've been working on getting the Rift working great in the game. It's had some issues, but its not so bad.

     Multiple Cameras


This is a pretty common issue with FPS games that use a second camera to render the weapon in your view at a different FOV than what you see in front of you. It's not a major issue there because perfect alignment doesn't matter as much, post effects can be different and you have some flexibility between the two cameras.

With the Rift both cameras have to be in perfect alignment or you feel like your eyes are crossed. That means getting post effects identical, doubling the amount of post work being done, and sometimes plugins don't like using multiple cameras at all and you have to address their complaints.. The Rift distortions must be the very last scripts on the camera.

     Shadows, lighting , reflections and culling


Culling for optimizations is common but sometimes there is a breakdown when one camera can see something and the other one can't. The game might use the "main" camera for deciding what to do in certain situations and not consider what the other camera is seeing and thus producing artefacts. Shadows sometimes do not align correctly or might jitter in one eye. I had a rotational script on the camera parent and it was causing some conflicts with the OVR scripts and making only one eye jitter the shadows. This has something to do with the sequencing of scripts being run since the camera rotation was accurate but was being corrected between updates too slow and Sunshine was jittering more frequently, or something.

Reflections/cubemaps might have some issues as well. Still looking into it.

     Rift settings and scale


Aligning all of the settings to yield immersion is probably the hardest part... Building a character setup that fits into your game is tough, there are a bunch of settings to adjust on top of some being changed by the users preferences. Stuff like neck offset makes a big difference when you turn your head and people of different heights will feel the discrepancy between the game's offset and their own offset, character height would be best handled dynamically, injecting the OVR settings into the controller and setting up neck offsets at runtime.

Scale is weird too. It makes a difference how 'big' things are. It's always been important to add details to the world around you so you can get a sense of how big things are but now its like 10x more important. If you're doing something interactive in a semi-real world you won't get the wow-factor unless you have sufficient content and reference points to tell the player how big things are. The OVR scripts for distortion also play a role in how accurate things look and feel.

     Use the Rift as part of your control scheme


This is le importante. It's pretty awesome when you start interacting with the world with your head. Suddenly its not so much about pushing the right buttons and is more about physically doing something to affect the game.

I added look-at target locking to the ship and improved the guided missiles so that now you can just look at an enemy ship and start locking on, a couple of seconds and it will confirm a lock and you can unload a bunch of seeker missiles on it.

It feels pretty awesome, especially with sound feedback - way freaking better than pressing tab to cycle through nearby enemies. I'm going to investigate other ways to use the Rift like this, possibly with gestures.


     Using the mouse kind of sucks now


The Rift is awesome and the mouse is really dragging it down. The problem is that you can turn your character with the mouse and turn the head separately with the Rift. The issue is finding forward again with the Rift. Some demo's have added a dot or something so you can find forward but at some point you'll end up looking off to the side (even a little bit) to walk forward. Some demo's weigh the Rift forward with the Character forward and the mid-point is forward, so its kind of shared and doesn't get as confusing. But either way its very weird and is definitely a breakdown point. I'm looking for ways to fix/improve this.

     Screenspace and GUI


GUI doesn't work at all. You can't do anything in screenspace without custom scripting a solution to mirror it in both cameras perfectly. Which.. is fine.. but zero of the traditional methods and GUI plugins will work out of the box.

Sorry.

The best solutions so far are doing interactive 3D GUI in worldspace (like Brevis will be) or hackup an existing GUI to project its view onto a plane in front of the player's face. Curved surfaces seem to give the best results and flat surfaces feel broken, warped and generally unnatural.

The skies will rain money on whoever builds the first Rift-specific GUI solution.


     Skyboxes


Skyboxes don't work, the way they are processed by the engine disallows them front being distorted properly by the OVR lens scripts.

Bye bye skyboxes.

I'm using a custom skybox which is basically just a huge box spawned at runtime with my skybox textures, an unlit shader on it, a layer that is culled by lens flares and it just follows the position of the player..

It's not as good as the built-in skybox and has some volumetric side effects if you're using any advanced lighting systems like Sunshine it will complicate your problems and change the way things look depending on the scale of the Skybox. Also depending on the scale is the culling. It took me forever to realize that my runtime skybox was cutting off some objects after I moved far enough away (man, I'm stupid huh?) but scaling it up had some side effects for Sunshine..... Balance... Precious balance...

List of recent updates / changelog

  • Removed Ship Building Interface (coming back later when GUI improves)
  • Reduced ship speed by half
  • Added First Person Character control
  • Added look-lock system for targeting with the Rift
  • Added interactive random ship building interface in the hangar
  • Added functional enter/exit scheme to the ship (you can walk in, sit down, fly, get up, then walk back out through the hatch)
  • Added Proportional Navigation algorithm to seeker missiles
  • Added better explosion, impact, launch and missile trail effects
  • Added better sound effects
  • Added various optimizations to all current systems
  • Added new, more advanced GUI interface in Hull_1
  • Added stationary turret enemy system
  • Adjusted sound settings to scale better over distance
  • Adjusted Sunshine and Lighting systems









No comments:

Post a Comment