Quake3e icon indicating copy to clipboard operation
Quake3e copied to clipboard

Question: this version support Xinput controller and Vibration ?

Open luca2125 opened this issue 4 years ago • 9 comments

Hi,

I ask if this version support Xinput controller and vibration.

Thanks !

luca2125 avatar Jun 28 '21 18:06 luca2125

I guess not, this is a very odd feature as for any Q3 engine

ec- avatar Jun 28 '21 21:06 ec-

Thank you I have post this question because quake 3 spearmint ( fork of ioquake3) support it.

luca2125 avatar Jun 29 '21 07:06 luca2125

It may require mod-side support too, however spearmint is GPLv3 so its code cannot be simply borrowed by this project

ec- avatar Jun 29 '21 07:06 ec-

Thank you, I will try to add it myself without copy spearmint code when I can.

luca2125 avatar Jun 29 '21 09:06 luca2125

Ioquake3 has support without vibration built in with SDL which is v2+. As does spearmint.

SDL isn't used on Windows builds of quake3e.

To support vibration you'd need mod support indeed. Also menu support isn't going to be the best without deeper UI mod integration. Therefore it isn't great for existing mods that most people play where the source is lacking.

ensiform avatar Jun 29 '21 11:06 ensiform

Actually I have added Vibration support to Quake I (darkplace) without SDL

typedef struct xinput_vibration_s
{
    WORD    wLeftMotorSpeed;
    WORD    wRightMotorSpeed;
} 
xinput_vibration_t;

DWORD (WINAPI *qXInputGetState)(DWORD index, xinput_state_t *state);
DWORD (WINAPI *qXInputSetState)(DWORD index, xinput_vibration_t *vibration);
DWORD (WINAPI *qXInputGetKeystroke)(DWORD index, DWORD reserved, xinput_keystroke_t *keystroke);

by using native windows xinput API

for Quake 2 XP the author was added vibration and work fine.

In both case no need to add a mod becouse the modification is inside the exe and is not necesssary modify the UI for vibration just add some lines in the config: ex XINPUT_VIBRATION =1

However when I can I will try to "complete the circle" with Quake 3 that actually is the last "Quake" game that not support it.

luca2125 avatar Jun 29 '21 13:06 luca2125

What game event should trigger vibration?

ec- avatar Jun 29 '21 13:06 ec-

When shoot and when get damage.

luca2125 avatar Jun 29 '21 13:06 luca2125

You'll not have access to those without mod support.

Those events are detected by cgame. and UI is handled in its own mod module unlike Quake 2 :)

Keybinds would be not detected by old (but most popular) mods and there is no easy way to distinguish when the sticks should move the cursor vs apply a bind axis action from the engine. The engine also does not know when the user is awaiting to bind a key in the menu.

ensiform avatar Jun 29 '21 19:06 ensiform