Add support for xash3D
-
@retropieuser555 can you post what you did, i might want to try it that way. if you dont mind
-
Hey guys I was able to successfully build the newer version of xash3d (xash3d-fwgs) on my Pi 4 (link to the binary below):
https://mega.nz/folder/xBpAgYYb#arEdY1Y2DVere_gGRqeFjw
You can do a direct swap of the binary (only if you built from source, I dont know if this will work if you installed from binary. If you installed from binary, go back and update from source first) in your
/home/pi/RetroPie/roms/ports/Half-Life/
folder (make a back-up first just in case!). I have tested it lightly and I can confirm it works but I have only played a few minutes into the game. Performance is better if set to 720p or lower in runcommand menu (before doing this, go into the game video settings and change to windowed mode - and set resolution to window resolution otherwise it will still try to run 1080p even when you selected 720p in runcommand. This results in a black screen.)Link to the source:
https://github.com/FWGS/xash3d-fwgs -
@quicksilver thanks for the update,
-
@ExarKunIv Sure thing!
So I edited the launch Xash3D.sh that's sitting in /opt/retropie/ports/xash3d similar to @Cesarpuig had above, but I added in the -sdl_joy_old_api option.
LD_LIBRARY_PATH=/home/pi/RetroPie/roms/ports/Half-Life /home/pi/RetroPie/roms/ports/Half-Life/xash3d -clientlib cl_dlls/client.so -dll dlls/hl.so -sdl_joy_old_api
And then for the keyboard.cfg file I found this for the guys who edited xash3d for the playstation mini and it worked for the gamepad binds for me first time:-
//======================================================================= // Copyright Flying With Gauss Team 2018 © // keyboard.cfg - archive of keybindings //======================================================================= unbindall bind ESCAPE "cancelselect" bind SPACE "+moveup" bind 1 "slot1" bind 2 "slot2" bind 3 "slot3" bind 4 "slot4" bind 5 "slot5" bind KP_UPARROW "+forward" bind KP_LEFTARROW "+left" bind KP_RIGHTARROW "+right" bind KP_DOWNARROW "+back" bind ALT "+strafe" bind SHIFT "+speed" bind F1 "botstop" bind F2 "botgo" bind F3 "pause" bind F4 "addbot" bind F5 "menu_startserver" bind F6 "savequick" bind F7 "loadquick" bind F8 "stop" bind F10 "menu_quit" bind F12 "screenshot" bind DEL "+lookdown" bind PGDN "+lookup" bind END "centerview" bind KP_PGDN "+lookup" bind KP_DEL "+lookdown" bind KP_END "centerview" bind PAUSE "F3" // Controller mapping by Advokaten // D-Pad bind UPARROW "invprev" bind DOWNARROW "invnext" bind LEFTARROW "impulse 100" bind RIGHTARROW "+speed" // Face buttons bind A_BUTTON "+jump" bind B_BUTTON "+duck" bind X_BUTTON "+reload" bind Y_BUTTON "+use" // Shoulders and triggers bind L1_BUTTON "+attack2" bind L2_BUTTON "savequick" bind R1_BUTTON "+attack" bind R2_BUTTON "+attack2" // Start bind START "cancelselect" // Select bind BACK "+showscores" // end of keyboard.cfg
My only issue I have left is I've found turning on the flashlight drops the framerate from a pretty much perfect 60FPS down to 15FPS. So I think I need to change something in the config.cfg to get that working better.
Oh I fixed my xboxdrv issue, thanks again for that! I'll have to try and pick another dosbox game to test out and try it again so I can make sure I can do it again.
-
@quicksilver Thanks! roughly what framerate are you getting? As I am surprised oddly how well it seems to work on the pi3b. But then maybe I haven't got far enough into the game for it to get so hectic that the framerate will freeze on me.
-
@retropieuser555 said in Add support for xash3D:
@quicksilver Thanks! roughly what framerate are you getting? As I am surprised oddly how well it seems to work on the pi3b. But then maybe I haven't got far enough into the game for it to get so hectic that the framerate will freeze on me.
60fps mostly at 720p but does drop a little when a lot is going on. I'll have test with the flashlight and see what happens. I'm having issues with the controller so I might have to use xboxdrv. I can map face buttons but I don't understand the xash3d axis mapping page at all.
Edit:I believe the mapping screens in the newer version may be different than the old version.
-
@retropieuser555 said in Add support for xash3D:
But once I'm in the game there doesn't appear to be any mapping for any of the actions. Jump, attack etc, the controller doesn't do anything.
The newer version I posted allows controller and keyboard button remapping in game. The issue I am having is getting the analog sticks working right. The left analog seems to work well but my right analog has me looking up and down when I push left and right. Right trigger does nothing and left trigger makes me spin indefinitely (even when I release the trigger Im still spinning)
Edit: SUCCESS! I got the analog/axis map figured out and they now work properly. Just had to keep swapping the mappings until they lined up with their intended function. Now I just need to get the dead-zones figured out so im not drifting all over the place and map my face buttons. Looks like I wont need xboxdrv after all.
-
To anyone having issues getting the joystick axis's set correctly you'll need to edit this section of the
config.cfg
joy_axis_binding "sflpyr" joy_enable "1" joy_forward "0.700000" joy_forward_deadzone "10000" joy_forward_key_threshold "24576" joy_lt_threshold "+16384" joy_pitch "90.300003" joy_pitch_deadzone "10000" joy_rt_threshold "+16384" joy_side "0.700000" joy_side_deadzone "10000" joy_side_key_threshold "24576" joy_yaw "90.300003" joy_yaw_deadzone "10000" joystick "0.000000"
The first line
joy_axis_binding
is what axis controls Side/Forward/Left Trigger/Pitch/Yaw/Right Trigger. So you'll need to rearrange those letters until your axis and triggers are controlling the correct functions. For my wireless xbox 360 controllerjoy_axis_binding "sflpyr
is correct. The joystick deadzone functions are in multiples of 10,000. So for examplejoy_pitch_deadzone "10000"
is a 10% deadzone (took me forever to figure that out since for example dosbox uses a value of "10" for a 10% deadzone)Now on to map the controller buttons. Hopefully this will be more straight forward.
-
@quicksilver Wow that's so weird with the axis, I never would've figured that out. Good to know, although on a practical basis I'm not sure how you'd go about getting that standardised for each user? I guess it's different for every controller, as I'm using a 8bitdo controller with the receiver in the xbox/Xinput mode so I'd imagine it acts as an xbox 360 controller. And yet it still needs a different arrange to yours on the joy_axis_binding command.
-
@retropieuser555 said in Add support for xash3D:
Good to know, although on a practical basis I'm not sure how you'd go about getting that standardised for each user?
In the new version of xash3d you can swap the axis's around through the in-game menu. Mapping buttons to my controllers face buttons was a breeze too. So at this point I have everything configured using my gamepad without using xboxdrv.
-
Well I got half-life running on my pi zero/GPi case. But with only a dpad it's a little hard to control.
I was so preoccupied with whether I could, I didnt stop to think if I should. 😂
-
@quicksilver I realised why my mapping was getting messed up, stupid curly speech marks from my MacBook keyboard! Such a little thing that I completely forgot about and so was messing up anything I was writing for binds.
Btw I couldn't get your upload to run, you're just putting those files into /ports/Half Life right?
-
@retropieuser555 yes but make sure they have the right permissions or they won't work. Since I compiled that binary on my pi 4, it's possible it will only work on a pi 4/raspbian buster.
-
@quicksilver it could be, I'm running it from my usual Nas drive but the permissions are ok as far as I can see.
Silly noob question, what did you do to recompile it? As originally I just followed the details here https://github.com/sergiopoverony/xash3d
Which I guess installs the earlier version.
-
@retropieuser555 are you using a pi 4? How did you install xash3d originally? Source or binary?
-
@quicksilver I'm pretty sure I always pick source & I'm on the pi3b+. In fairness I'm not too worried as half life does run atm anyway, I was just curious if the flashlight is fixed in the later version.
-
@retropieuser555 fps still drops with flashlight on.
-
@quicksilver ah fair, I'll probably stick with what's on there for now anyways then
-
@retropieuser555 does the hazard course work for you on the old version?
-
@quicksilver I played it right through just now, I can't remember what the original game on PC was like as I only ever played it a little bit. The flashlight drops the framerate to around 10-15FPS, and grenades freeze the game up briefly when they go to explode but honestly it's not bad at all and it works way better than I'd imagine the pi3 would handle it.
Time to give the main game a bash and see how far I can get without the flashlight ha!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.