cancel
Showing results for 
Search instead for 
Did you mean: 

QUAKE [DK2 Support]

mindabuse
Explorer
I've just pushed up changes to my fork of QuakeSpasm-Rift.

v1.91: release post details
v1.90: release post details
v1.85: release post details
UPDATE: See this post on how to configure the Rift DK2 to work properly.

Look for the latest releases here:

https://github.com/jeremiah-sypult/Quakespasm-Rift/releases

This fork is using SDK v0.4.1 with a modified distortion shader to eliminate black smearing (when overdrive is enabled). Both DK1 and DK2 HMDs render with orientation and position tracking.

With your HMD configured in extended mode and as the primary display, fire up the game with:

quakespasm -vr


Configure settings in the Options > VR/HMD Settings menu, or check out the README for all of the cvars, as all the various HMD & Distortion flags can be toggled (multisampling, low persistence, dynamic prediction, vsync, timewarp, etc.).

https://github.com/jeremiah-sypult/Quakespasm-Rift/blob/master/README.md

You must provide the pak files. The free shareware (pak0.pak) as well as registered (pak0.pak + pak1.pak) files must go in a directory called 'id1' inside the folder that QuakeSpasm.app|exe resides in.

./Quake/QuakeSpasm.app|exe
./Quake/id1/pak0.pak

OS X: Since the DK2 appears as 1080x1920, you'll want to rotate it 90 degrees in System Preferences.app. I would suggest making the rift your primary display by dragging the white menu bar in the Arrangement settings to the rift. Then, cleverly find a way to launch the app full screen at 1920 x 1080 with the launcher. It's not the easiest thing to do, but it's not impossible....

Windows: The HMD must be in extended mode and configured as the primary display at the time of launching.

UPDATE: The game originally defaulted to a capped frame rate of 72 fps. To change it, you'll use:
host_maxfps xxx
where 'xxx' is a higher value (as high as you want, if you're interested in keeping vr_vsync disabled). The update is now 240.

There is also joystick/gamepad support. I've tested it with both PS3 and Xbox 360 controllers. The default 'joy_sensitivity' for aiming may be low, so make sure to experiment with different values. I've also added a vr_aimmode 6 which decouples the pitching of the weapon/view. Lastly, vr_deadzone set to 180 will entirely decouple the view + aiming (requested here), but I have no input controllers to test that kind of rig out.

Sounded like a few people were looking forward to this. I apologize I'm only been able to provide OS X binaries thus far, but I hope that folks on the other platforms might be able to help. Please fork on Github and feel free to hit me up with pull requests if any changes are needed.
88 REPLIES 88

mindabuse
Explorer
"Spielor" wrote:
how do you set decoupled aiming?

I can only aim up and down with my head


Go in to the Options menu and make sure that mouse/free look is turned on. If that doesn't work and you're using a gamepad, you'll need to use the joystick Cvars documented in the readme to re-assign the axis:

https://github.com/jeremiah-sypult/Quakespasm-Rift/blob/master/README.md

Moving your head up and down may still move the gun up and down by default. If you don't want to do that, you can set:
vr_aimmode 6


If you want the gun totally decoupled so that it doesn't turn the camera/head view, you can set:
vr_deadzone 180


By default, a deadzone < 180 degrees (the default is 30) will turn the camera/head view when the gun is at that angle.

cybereality
Grand Champion
I had pretty bad judder with head-tracking, but otherwise it looked great.
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

TheBaltar
Honored Guest
All right, im getting frustrated. Tried getting this thing to work multiple times.

Where do I extract the QuakeSpasm folder to? and once I start it, all I need to do is hit ` and then type in vr_ then hit TAB and it should just start it, right?

When I hit QuakeSpasm is get W_LoadWadFile: couldn't load gfx.wad

I can get Quake to run via steam, no VR mode - I try to open QuakeSpasm.exe and all I get is that error.

Can someone break this down and make it really simple cause I feel like steps are being skipped in the instructions or something lol

thanks guys.

Spielor
Honored Guest
Either copy your id1 folder from the steam quake into your extracted quakespasm folder, or copy everything thats in the quakespasm folder into your quake folder.
The quakespasm.exe has to be in the same place where the quake.exe and glquake.exe are.

Hope that helps

mindabuse
Explorer
"TheBaltar" wrote:
All right, im getting frustrated. Tried getting this thing to work multiple times.

Where do I extract the QuakeSpasm folder to? and once I start it, all I need to do is hit ` and then type in vr_ then hit TAB and it should just start it, right?

When I hit QuakeSpasm is get W_LoadWadFile: couldn't load gfx.wad

I can get Quake to run via steam, no VR mode - I try to open QuakeSpasm.exe and all I get is that error.

Can someone break this down and make it really simple cause I feel like steps are being skipped in the instructions or something lol

thanks guys.


If you have the Steam version of Quake you have two options.

1. Drop the QuakeSpasm.exe and all DLL's in to your SteamApps Quake folder
2. Place a copy the 'id1' folder out of your SteamApps Quake folder in to the same folder that the QuakeSpasm.exe file is.

Firing up QuakeSpasm.exe should simply fire up the game in normal 2D mode at first launch.

You can then go to the Options menu and select your video mode (for the DK2, you'll want to do 1920x1080, etc). You can enable VR mode (even without the rift connected) in the Options menu under the VR/HMD menu. All the VR/HMD settings should be saved between launches.

Once you get things set up, then you can try to get it to work with the Rift as your main/primary display.

Hope that helps you out!

jbaxter
Honored Guest
I just wanted to chime in here briefly to say that so far this is the application I've spent the most time in with the DK2. Thanks! Once I settled on aim mode 6 it's felt quite natural.

Sort of surprisingly (to me), I wasn't that jazzed about revisiting the original maps, but I've really enjoyed running through some more recent singleplayer maps that have interesting structures (like the func_msgboard map jam packs).

Quake+Rift is almost as eyeball-grabbing as my first experience with Quake. Admittedly it's sweatier, more uncomfortable on the ears, and smelling of odd industrial chemicals 🙂 but hey everything has tradeoffs.

One issue I'll bring up while I'm here: I can't get vsync enabled. ("Normal" vsync, not vr_vsync, which is enabled.) The in-game video settings menu says "N/A" for the vsync setting, and forcing it through the NVidia control panel doesn't have any effect. I've noticed this before in the original QuakeSpasm, but it didn't bother me. In the Rift, it bothers me. I'm a little surprised that no one else has mentioned it, so maybe there's an obvious solution I've overlooked?

(A little edit: I do manage to get vsync working in other games/apps, so it's not a global issue.)

mindabuse
Explorer
"jbaxter" wrote:
One issue I'll bring up while I'm here: I can't get vsync enabled. ("Normal" vsync, not vr_vsync, which is enabled.) The in-game video settings menu says "N/A" for the vsync setting, and forcing it through the NVidia control panel doesn't have any effect. I've noticed this before in the original QuakeSpasm, but it didn't bother me. In the Rift, it bothers me. I'm a little surprised that no one else has mentioned it, so maybe there's an obvious solution I've overlooked?

(A little edit: I do manage to get vsync working in other games/apps, so it's not a global issue.)


Thanks for the heads up. I'm only a little familiar with how vsync is treated on the game engine side of things (versus the operating system side). The Oculus SDK handles all the vsync control with doing their SDK rendering, so if that isn't working for you I wonder if it is an OS/setup issue. Besides the Oculus SDK, I know that QuakeSpasm uses SDL, so both SDL and the Oculus SDK are likely handling vsync the same way (as far as making the right OpenGL calls to the OS are concerned).

Keep in mind that other games might be using Direct 3D versus Open GL, so it might be working as expected for your D3D titles.

It's been a while since I've done work on Windows (I primarily develop on OS X), so I would suggest trying to disable any application-specific vsync settings. The last time I remember using the Nvidia control panel, I thought there were options to allow the application to handle certain settings (like vsync, anti-aliasing, etc). I would try and set those settings to be application-controlled.

Those are the only things that come to mind. Hope something along those lines might get things working, and glad a fellow QUAKE fan is digging the DK2 support! 🙂

jbaxter
Honored Guest
After a bit more grepping/googling it seems like this may be a limitation of using SDL 1.x with OpenGL, and SDL 2.x has improved on things.

The reason vsync is disabled comes down to this call in VID_SetMode returning -1:
        gl_swap_control = true;
if (SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, (vid_vsync.value) ? 1 : 0) == -1)
gl_swap_control = false;


I'll do a little more testing with SDL 1.x and 2.x Quake engines when I get home.

Edit: I remember that one of the QuakeSpasm developers, ewasylishen, was working on SDL 2 builds for OS X. I dunno if that means that they will soon-ish be switching over to SDL 2 on any or all platforms.

mindabuse
Explorer
"jbaxter" wrote:
After a bit more grepping/googling it seems like this may be a limitation of using SDL 1.x with OpenGL, and SDL 2.x has improved on things.


The Oculus SDK side of things should be setting the vsync property on the OpenGL context. Per CAPI_GL_DistortionRenderer.cpp for DistortionRenderer::EndFrame


bool useVsync = ((RState.EnabledHmdCaps & ovrHmdCap_NoVSync) == 0);
int swapInterval = (useVsync) ? 1 : 0;
#if defined(OVR_OS_WIN32)
if (wglGetSwapIntervalEXT() != swapInterval)
wglSwapIntervalEXT(swapInterval);

HDC dc = (RParams.DC != NULL) ? RParams.DC : GetDC(RParams.Window);
BOOL success = SwapBuffers(dc);
OVR_ASSERT(success);
OVR_UNUSED(success);


With that in mind, some things you could try (do these after a level has been loaded):
1. Try toggling VR Vsync on and off.
2. Enable VR mode and VR Vsync and quit. Those settings should save in the config. Start up QuakeSpasm with those enabled.
3. Disable VR mode and quit. Then restart QuakeSpasm and fire up a map. Enable VR mode after it starts up in normal/2D mode.

All of these things should enable vsync within the Oculus SDK and outside of SDL.

"jbaxter" wrote:
Edit: I remember that one of the QuakeSpasm developers, ewasylishen, was working on SDL 2 builds for OS X. I dunno if that means that they will soon-ish be switching over to SDL 2 on any or all platforms.


Once they finalize the next release I intend to merge all the changes in. I've been holding off to give the QuakeSpasm developers time to finish up the release (not sure if SDL2 is going to hit the next release or if it's only forked in the repo you mentioned). I've been avoiding merging the QuakeSpasm repo changes to dig in to other projects (namely Quake 3 Arena DK2 support).

jbaxter
Honored Guest
Thanks! I'll take a whack at it this weekend if not before.