Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4832

Gaming • GZDoom Controller Setup with jstest-gtk

$
0
0
Image
GZDoom with Perdition's Gate DOOM2 WAD with the Brutal Doom Community Expansion Doom Mod

There are times when I am interested in playing console games, more specifically console games that were released on PC, and will support USB controllers as well as user made mods. To enhance the gameplay experience of a game, I would search the internet for any mods that were released for the game. There are games that will have source ports that will run on Linux, and these source ports are often times released as open source software. Then I realized the games were not released as open source software, which would be the reason why most commercial games will not have high quality mods regardless of the age of the game, even games from the 1990's will not have any mods.

The game source port is open source, but the game is not open source, and even though the game is not open source, this will not prevent anyone from reverse engineering the game, then port the game code to a different graphics engine. This saves the developers from going through the challenges of remastering a game with the same bugs, but with shinier graphics as well as support for modern computer hardware, and instead of waiting for a game to be re-released, build the game yourself. This is where the GZDoom source port gets involved, because mods for GZDoom are in development all the time, and will actually have the capabilities to even rival commercial games.

disable any overclock parameters on your computer before compiling any programs.

You are able to install jstest-gtk with the command in the terminal:

Code:

sudo apt install jstest-gtk
jstest-gtk GitHub Website
GitHub - Grumbel/jstest-gtk
https://github.com/Grumbel/jstest-gtk

GZDoom GitHub website
GitHub - ZDoom/gzdoom: GZDoom is a feature centric port for all Doom engine games, based on ZDoom, adding an OpenGL renderer and powerful scripting capabilities
https://github.com/ZDoom/gzdoom

Install the Dependencies:

Code:

sudo apt install cmake git pkg-config libgtkmm-3.0-dev libsigc++-2.0-dev
Download the jstest-gtk source code:

Code:

git clone https://github.com/Grumbel/jstest-gtk.git
Access the jstest-gtk directory:

Code:

cd jstest-gtk
Add the build directory:

Code:

mkdir build
Access the build directory:

Code:

cd build
Run the cmake command:

Code:

cmake ..
Build the jstest-gtk source code:

Code:

make -j4
Execute the jstest-gtk binary:

Code:

./jstest-gtk
You will see no controller will be detected if a controller was not plugged in, and now close the jstest-gtk program.

Plug in a USB controller then launch the jstest-gtk program:

Code:

cd jstest-gtk/build

Code:

./jstest-gtk
JSTEST-GTK
You will see the controller was detected, press the Refresh Button, and click on Properties. This is where the magic happens with controller calibration, because there is a real chance the controls are out of synchronization. Click on Mapping to change the assigned axis number for each joystick axis, remember the Digital Pad is considered an axis as well as the triggers if the triggers are analog controlled. Understanding how to assign the axis number to the controller axis is all about trial, and error which shouldn't be difficult to adjust, but adjusting the joystick axis is necessary or the controller will be unusable.

After calibrating the joystick axis numbers, feel free to close the jstest-gtk program unless you need to verify the button numbers on the controller. Not all buttons on a controller with be compatible with the Linux Operating System. After you close the jstest-gtk program, the adjusted controls for the controller will stay the same until you restart your computer, and you will have to calibrate the controller again. If you remap the controls on a controller enough times, eventually you will know how to remap the controller without any problems.

GZDOOM
Launch the GZDoom program, access the Options Menu, and in the Options Menu, access Joystick Options. In Joystick Options change Enable controller support to Yes, and Block controller input in menu to Yes. If you do not block controller support in the menu, the menu cursor will spin out of control, which means you will have difficulties accessing the menu in game, and you will need to disconnect the controller to be able to control the menu. After you disconnect the controller, you will be able to change Block controller input in menu to Yes.

Unfortunately running GZDoom with the controller is not a keyboard, and mouse free experience, because you will not be able to control the menu with the controller, but the in game experience is 100% compatible with the controller, which will provide the player with the home console experience. The home console experience is based on the controller, the button layout on the controller, and wired controllers are easier to setup compared to wireless controllers. Click on the Controller in Controller Options to adjust the joystick axis properties.

CONFIGURE CONTROLLER
This is the challenging part of setting up a controller for GZDoom, because you will need to determine the function of each axis in the menu to setup the controller successfully. With the newer releases of GZDoom, XBox based controllers should be setup out of the box, and you will only need to adjust the camera turn speeds, but if your controller is not setup, then you will have to setup the controller manually including the Deadzone values. Not adjusting the Deadzone values will throw off the precision of the joystick, which will cause the joystick to be more difficult to control in game.

Do not adjust the sensitivity of the movement controls, otherwise you will not be able to move at full speed, and only adjust the camera turn speed. I recommend adjusting the sensitivity of the Turning speed by values of 0.1 until the controls meet your expectations then fine tune the controls with either the mouse or left/right keys, because the Turning speed is very sensitive, and lower values is better starting out. I recommend adjusting the Turning speed to be greater than the Looking Up/Down speed for enhanced controls with the Turning speed being 2X the speed of the Looking Up/Down speed to be similar to the home console experience.

CUSTOMIZE CONTROLS
The original DOOM game does not have many controls, and will be compatible with the Super Nintendo Style Controllers if you have any of these controllers sitting on a shelf somewhere. The game controls are affected by the GZDoom mods that were loaded after launching GZDoom, and you will be able to configure the controls the same as configuring the controls in any PC game that supports controllers.

For reference, my go to game is Wolfenstein 2009, because the controls are easy to find on the internet, easier to understand, and are more adaptable:

Left Bumper - Throw Grenade.
Left Trigger - Zoom, Iron Sights.
Right Bumper - (Tap) Cycle last weapon. (Hold) View weapons menu.
Right Trigger - Fire weapon.
Left Stick - Move. (Click) Sprint.
Right Stick - Look/Aim. (Click) Melee.
Y Button - Use (when prompted).
B Button - Crouch.
A Button - Jump.
X Button - Reload weapon.
D-pad UP - Toggle Shield
D-pad DOWN - Toggle Veil Sight.
D-pad LEFT - Toggle Empower.
D-pad RIGHT - Toggle Mire.
Back Button - View Journal.
Start Button - Pause menu.

Here are the Quake 4 Xbox 360 Controls which will be an alternative controller layout:

Left Bumper - Previous Weapon
Left Trigger - Zoom/Weapon Special
Right Bumper - Next Weapon
Right Trigger - Attack
Left Stick - Move, Click Down to CROUCH
Right Stick - Look/Aim
Y Button - Flashlight
B Button - Use/Talk
A Button - Jump
X Button - Reload
D-pad - Quick Weapon
Back Button - Objectives/Score
Start Button - Pause

As you will see both games have a controller layout that is not completely compatible with the GZDoom mods, but are a useful reference in the event you do not remember know how to configure the controller. Not every GZDoom mod will require all buttons on a controller either, which means there is room for customization, but regardless of the controller layout, you will still need access to a mouse/keyboard.

HUD OPTIONS
In GZDoom Options, go to Full options menu, and click on HUD Options to access the HUD controls which controls the Heads Up Display. The HUD options are very customizable but this does not imply DOOM mods have customizable HUDS, which means adjusting the HUD Options in GZDoom will either not affect the in game HUD or the HUD Options will cause visual anomalies with the HUD. Adjusting the HUD is necessary if the in game HUD is either difficult to see or is oversized, and the scaling of the HUD will need to be adjusted in HUD Options.

The original DOOM game did not require a crosshair with modern source ports adding crosshairs in the options, because of the adjustments to the visuals, and this indicates the source port is running at a different aspect ratio. The original DOOM game ran at a resolution of 320 X 200 (4:3 Ratio) with modern source ports running at screen resolutions of 1920 X 1080 or greater (16:9 Ratio) which either stretches the screen or extends the screen. A wider screen resolution means the game will not handle the same, because the movement, and turn speeds are affected.

CONCLUSION
Adjusting the settings in GZDoom will not only improve your gameplay experience as well as provide controller support to the original DOOM game or mod, fine tuning the settings will improve your gaming capabilities. You are not restricted to large sized Heads Up Displays or tiny dot crosshairs, and instead you are able to adjust the HUD based on your preferences, because there are people who prefer a minimal sized HUD. GZDoom is more customizable outside of everything that was included in this Build Guide, which only includes the controller setup instructions, and fine tuning the controls as well as the HUD.

The game will be unplayable if you are not able to see the HUD or be able to control your character, which means the controls or the HUD will need to be adjusted. Setting up the controller for GZDoom will be challenging starting out, but if you have done this enough times, eventually you will know how to setup a controller for any game. Remember not every DOOM mod is customizable with the Options Menu, which means you are stuck with what is included in the mod for better or worse.

This will conclude the GZDoom Controller Setup with jstest-gtk Build Guide.

Statistics: Posted by Moonmarch — Sat Oct 26, 2024 2:01 am



Viewing all articles
Browse latest Browse all 4832

Trending Articles