RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Add support for xash3D

    Scheduled Pinned Locked Moved Ideas and Development
    xash3dhalflife
    63 Posts 13 Posters 11.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • retropieuser555R
      retropieuser555 @ExarKunIv
      last edited by

      @ExarKunIv in terms of xboxdrv there's this post I made before but I couldn't quite figure out what I'm missing in the end https://retropie.org.uk/forum/topic/25490/xboxdrv-returning-back-to-normal-settings-when-leaving-dosbox?_=1590594996098 Once things get into terminal I am pretty lost what it's trying to do generally.

      Pi 5 4GB

      Retroflag GPI with raspberry pi zero 2 w/ wifi

      Retroachievements:- lovelessrapture

      ExarKunIvE 1 Reply Last reply Reply Quote 0
      • ExarKunIvE
        ExarKunIv @retropieuser555
        last edited by ExarKunIv

        @retropieuser555

        do you have runcommand-onend.sh?

        UPDATE

        im able to get into the gamepad and keyboard options to change anything without crashing

        RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
        RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
        Maintainer of RetroPie-Extra .

        retropieuser555R 1 Reply Last reply Reply Quote 0
        • retropieuser555R
          retropieuser555 @ExarKunIv
          last edited by retropieuser555

          @ExarKunIv No I don't think I've made that file, it should be with runcommand-onstart.sh right? And try to write something that always turns off xboxdrv each time I close a core or program?

          re: xash3d That's interesting. I wonder if I should try and reinstall xash3d, as if I can get the GUI to open up properly perhaps I can edit the controls in there.

          Do you have your config.cfg file from the valve folder please? I suspect that's the file xash3d looks at for this

          Pi 5 4GB

          Retroflag GPI with raspberry pi zero 2 w/ wifi

          Retroachievements:- lovelessrapture

          ExarKunIvE 1 Reply Last reply Reply Quote 0
          • ExarKunIvE
            ExarKunIv @retropieuser555
            last edited by

            @retropieuser555 yes you should have the onstart and onend in the same place, that is why the xboxdrv will not turn off for you before. there is nothing to tell it to turn off

            //=======================================================================
            //			Copyright Flying With Gauss Team 2020 ©
            //			config.cfg - archive of cvars
            //=======================================================================
            MP3Volume "0.8"
            allow_levelshots "0"
            bottomcolor "6"
            cl_allow_fragment "0"
            cl_backspeed "400"
            cl_charset "utf-8"
            cl_cmdbackup "2"
            cl_cmdrate "60"
            cl_draw_beams "1"
            cl_draw_particles "1"
            cl_enable_compress "0"
            cl_enable_split "1"
            cl_enable_splitcompress "0"
            cl_envshot_size "256"
            cl_forwardspeed "400"
            cl_himodels "0.000000"
            cl_laddermode "2"
            cl_lc "1"
            cl_lightstyle_lerping "0"
            cl_lw "1"
            cl_maxoutpacket "0"
            cl_maxpacket "40000"
            cl_maxpayload "0"
            cl_nopred "1"
            cl_nosmooth "0"
            cl_predict "0"
            cl_scoreboard_bg "1"
            cl_showerror "0"
            cl_showfps "0"
            cl_showpacketloss "0"
            cl_showpos "0"
            cl_sidespeed "400"
            cl_smoothtime "0.1"
            cl_sprite_nearest "0"
            cl_trace_events "0"
            cl_trace_messages "0"
            cl_trace_stufftext "0"
            cl_updaterate "60"
            cl_viewbob "0"
            cl_vsmoothing "0.05"
            cmd_scripting "0"
            con_alpha "1.0"
            con_black "0"
            con_charset "cp1251"
            con_fontnum "-1"
            con_fontscale "1.0"
            con_fontsize "1"
            con_halffrac "0.5"
            con_mapfilter "1"
            con_maxfrac "1"
            crosshair "1"
            download_types "msec"
            dsp_off "0"
            fps_max "100.0"
            gamma "2.500000"
            gl_allow_software "0"
            gl_allow_static "0"
            gl_anisotropy "0.000000"
            gl_check_errors "1"
            gl_clear "0"
            gl_compensate_gamma_screenshots "0"
            gl_detailscale "4.0"
            gl_finish "0"
            gl_keeptjunctions "1"
            gl_max_size "256"
            gl_nosort "0"
            gl_overbright "0"
            gl_overbright_studio "0"
            gl_swapInterval "0"
            gl_texture_lodbias "0.0"
            gl_texturemode "GL_LINEAR_MIPMAP_LINEAR"
            hand "0"
            host_allow_materials "0"
            host_mapdesign_fatal "1"
            hostname "unnamed"
            http_autoremove "1"
            http_timeout "45"
            http_useragent "xash3d"
            hud_capturemouse "1"
            hud_centerid "0"
            hud_classautokill "1"
            hud_draw "1"
            hud_fastswitch "0"
            hud_scale "0"
            hud_takesshots "0"
            hud_textmode "0"
            hud_utf8 "0"
            joy_axis_binding "sfpyrl"
            joy_enable "1"
            joy_forward "1"
            joy_forward_deadzone "0"
            joy_forward_key_threshold "24576"
            joy_lt_threshold "-16384"
            joy_pitch "100"
            joy_pitch_deadzone "0"
            joy_rt_threshold "-16384"
            joy_side "1"
            joy_side_deadzone "0"
            joy_side_key_threshold "24576"
            joy_yaw "100"
            joy_yaw_deadzone "0"
            joystick "0.000000"
            look_filter "0"
            lookspring "0"
            lookstrafe "0"
            m_enginemouse "0"
            m_enginesens "0.3"
            m_forward "1"
            m_ignore "0"
            m_pitch "0.022000"
            m_side "0.8"
            m_yaw "0.022"
            menu_mp_firsttime "1"
            model "gordon"
            mp_decals "300"
            mp_logecho "1"
            mp_logfile "1"
            name "Player"
            net_drawslider "0"
            net_graph "0"
            net_graphheight "64"
            net_graphpos "1"
            net_graphsolid "1"
            net_graphwidth "192"
            net_scale "5"
            net_speeds "0"
            r_adjust_fov "1"
            r_bump "1"
            r_customdraw_playermodel "0"
            r_detailtextures "0"
            r_drawentities "1"
            r_dynamic "1"
            r_fastsky "0"
            r_flaresize "200"
            r_lighting_ambient "0.3"
            r_lighting_extended "1"
            r_lighting_modulate "0.6"
            r_oldparticles "0"
            r_speeds "0"
            r_sprite_lerping "1"
            r_sprite_lighting "1"
            r_strobe "0"
            r_strobe_cooldown "3"
            r_strobe_debug "0"
            r_strobe_swapinterval "0"
            r_studio_drawelements "1"
            r_studio_lambert "2"
            r_studio_lerping "1"
            r_studio_lighting "1"
            r_studio_sort_textures "0"
            r_studiocache "1"
            r_underwater_distortion "0.4"
            r_vbo "1"
            r_vbo_dlightmode "1"
            r_wadtextures "1"
            rate "30000"
            s_combine_sounds "0"
            s_cull "0"
            s_lerping "0"
            s_phs "0"
            s_reverse_channels "0"
            s_samplecount "0"
            s_show "0"
            sensitivity "3"
            sleeptime "1"
            snd_mute_losefocus "1"
            suitvolume "0.250000"
            sv_aim "1"
            sv_allow_PhysX "1"
            sv_allow_compress "1"
            sv_allow_download "0"
            sv_allow_fragment "0"
            sv_allow_joystick "1"
            sv_allow_mouse "1"
            sv_allow_noinputdevices "1"
            sv_allow_rotate_pushables "0"
            sv_allow_split "1"
            sv_allow_studio_attachment_angles "0"
            sv_allow_touch "1"
            sv_allow_vr "1"
            sv_check_errors "0"
            sv_corpse_solid "0"
            sv_downloadurl ""
            sv_enttools_enable "0"
            sv_enttools_maxfire "5"
            sv_fixmulticast "1"
            sv_log_onefile "0"
            sv_log_singleplayer "0"
            sv_maxpacket "2000"
            sv_precache_meshes "1"
            sv_quakehulls "0"
            sv_reconnect_limit "3"
            sv_sendvelocity "1"
            sv_skipshield "0"
            sv_stepsize "18"
            sv_trace_messages "0"
            sv_userinfo_enable_penalty "1"
            sv_userinfo_penalty_attempts "4"
            sv_userinfo_penalty_multiplier "2"
            sv_userinfo_penalty_time "0.3"
            sv_validate_changelevel "1"
            topcolor "30"
            touch_config_file "touch.cfg"
            touch_enable "0"
            ui_borderclip "0"
            ui_language "english"
            ui_renderworld "0"
            ui_show_window_stack "0"
            ui_showmodels "0"
            vgui_utf8 "0"
            vibration_enable "1"
            vibration_length "1.0"
            viewsize "120.000000"
            violence_ablood "1"
            violence_agibs "1"
            violence_hblood "1"
            violence_hgibs "1"
            volume "0.800000"
            exec keyboard.cfg
            exec userconfig.cfg
            // end of config.cfg
            

            RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
            RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
            Maintainer of RetroPie-Extra .

            retropieuser555R 2 Replies Last reply Reply Quote 0
            • retropieuser555R
              retropieuser555 @ExarKunIv
              last edited by

              @ExarKunIv Thanks for that! I'm gonna mess around with xash3d a little more tonight or tomorrow and see if I can figure out where the differences are.

              I'm gonna mess around with those run commands. At the moment I'm loading xboxdrv as part of the .sh files of the dosbox games, but I'll try this way around instead and see if it's more successful than what I was doing before. Thanks for your help with that!

              Pi 5 4GB

              Retroflag GPI with raspberry pi zero 2 w/ wifi

              Retroachievements:- lovelessrapture

              1 Reply Last reply Reply Quote 0
              • quicksilverQ
                quicksilver
                last edited by

                Do you guys know a way to get the constant console messages to stop appearing onscreen?

                C 1 Reply Last reply Reply Quote 0
                • C
                  Cesarpuig @quicksilver
                  last edited by

                  @quicksilver delete -console fron launch command

                  LD_LIBRARY_PATH=/home/pi/RetroPie/roms/ports/Half-Life /home/pi/RetroPie/roms/ports/Half-Life/xash3d -console -clientlib cl_dlls/client.so -dll dlls/hl.so
                  
                  1 Reply Last reply Reply Quote 0
                  • retropieuser555R
                    retropieuser555 @ExarKunIv
                    last edited by

                    @ExarKunIv Bingo! I got the gamepad working, the joystick.cfg file isn't called by the game in the file so I could either call it or add the binds into the keyboard.cfg. Oddly modifying my keyboard.cfg file has stopped the crash when I select the option in the GUI as well. But if I go to edit entries there in the GUI it causes a crash. But I can just edit the file manually anyway.

                    So yeah, if anyone is ever hunting down gamepad controls on this port, it's definitely possible.

                    Pi 5 4GB

                    Retroflag GPI with raspberry pi zero 2 w/ wifi

                    Retroachievements:- lovelessrapture

                    ExarKunIvE 1 Reply Last reply Reply Quote 0
                    • ExarKunIvE
                      ExarKunIv @retropieuser555
                      last edited by

                      @retropieuser555 can you post what you did, i might want to try it that way. if you dont mind

                      RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                      RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                      Maintainer of RetroPie-Extra .

                      retropieuser555R 1 Reply Last reply Reply Quote 0
                      • quicksilverQ
                        quicksilver
                        last edited by quicksilver

                        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

                        ExarKunIvE retropieuser555R 2 Replies Last reply Reply Quote 0
                        • ExarKunIvE
                          ExarKunIv @quicksilver
                          last edited by

                          @quicksilver thanks for the update,

                          RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                          RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                          Maintainer of RetroPie-Extra .

                          1 Reply Last reply Reply Quote 0
                          • retropieuser555R
                            retropieuser555 @ExarKunIv
                            last edited by

                            @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.

                            Pi 5 4GB

                            Retroflag GPI with raspberry pi zero 2 w/ wifi

                            Retroachievements:- lovelessrapture

                            1 Reply Last reply Reply Quote 1
                            • retropieuser555R
                              retropieuser555 @quicksilver
                              last edited by

                              @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.

                              Pi 5 4GB

                              Retroflag GPI with raspberry pi zero 2 w/ wifi

                              Retroachievements:- lovelessrapture

                              quicksilverQ 1 Reply Last reply Reply Quote 0
                              • quicksilverQ
                                quicksilver @retropieuser555
                                last edited by quicksilver

                                @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.

                                1 Reply Last reply Reply Quote 1
                                • quicksilverQ
                                  quicksilver @retropieuser555
                                  last edited by quicksilver

                                  @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.

                                  1 Reply Last reply Reply Quote 0
                                  • quicksilverQ
                                    quicksilver
                                    last edited by quicksilver

                                    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 controller joy_axis_binding "sflpyr is correct. The joystick deadzone functions are in multiples of 10,000. So for example joy_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.

                                    retropieuser555R J 2 Replies Last reply Reply Quote 1
                                    • retropieuser555R
                                      retropieuser555 @quicksilver
                                      last edited by

                                      @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.

                                      Pi 5 4GB

                                      Retroflag GPI with raspberry pi zero 2 w/ wifi

                                      Retroachievements:- lovelessrapture

                                      quicksilverQ 1 Reply Last reply Reply Quote 0
                                      • quicksilverQ
                                        quicksilver @retropieuser555
                                        last edited by

                                        @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.

                                        1 Reply Last reply Reply Quote 2
                                        • quicksilverQ
                                          quicksilver
                                          last edited by

                                          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. 😂

                                          retropieuser555R 1 Reply Last reply Reply Quote 2
                                          • retropieuser555R
                                            retropieuser555 @quicksilver
                                            last edited by

                                            @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?

                                            Pi 5 4GB

                                            Retroflag GPI with raspberry pi zero 2 w/ wifi

                                            Retroachievements:- lovelessrapture

                                            quicksilverQ 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.