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

JSFW, source port for Shadow Warrior now available

Scheduled Pinned Locked Moved Ideas and Development
portsjfsw
14 Posts 12 Posters 4.0k 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.
  • D
    dudleydes
    last edited by 18 Dec 2018, 20:46

    After a discussion at the Raspberry Pi forum, the developer, JonoF, has made recent changes to the source code so that it is now possible to build JFSW with OpenGL disabled.

    The code is still in development at the moment so there may be improvements made before a scriptmodule can be developed.

    Having never played the game before, I may not be the best person to offer feedback so it would be good if members of the community could do some testing, especially as the game assets are available for free from GOG.

    Building JFSW

    To build the JFSW binary, run the following commands on your Pi:

    git clone https://github.com/jonof/jfsw.git
    cd jfsw
    git submodule init
    git submodule update
    make USE_POLYMOST=0 USE_OPENGL=0
    

    If successful, then there should be the sw binary.

    Adding JFSW to RetroPie

    The sw binary needs to be in the same folder as the game data. (It may be possible to run sw from a different folder but I haven't worked it out.)

    In the ports folder, I created a folder jfsw into which I copied the sw binary as well as the game assets, sw.grp and sw.rts from the GOG release. These assets need to be in lower case so they may need to be renamed. You can use the following command to do this:

    rename 'y/A-Z/a-z/' *
    

    Then I created a bash script, Shadow Warrior.sh, in the ports folder and added the following:

    #!/bin/bash
    /home/pi/RetroPie/roms/ports/jfsw/sw >/dev/null
    

    JFSW produces quite a bit of output to the console regarding available resolutions so I added > /dev/null to the launch command to suppress it.

    Music

    The GOG release of Shadow Warrior includes music in .ogg format in the MUSIC folder which is support by JSFW.

    I copied the MUSIC folder to the jfsw folder on my Pi. JFSW expects the music tracks to be in the same folder as the binary so I edited the config file, /home/pi/.jfsw/sw.cfg and added the music folder as below:

    OggTrackName = "MUSIC/track??.ogg"
    

    Controls

    JFSW supports joysticks, which should be enabled by default. If they are not, then check in the config file, sw.cfg, that UseJoystick is set to 1.

    With the default settings, I found that the analog stick controls to be far too sensitive and I spent most of my time spinning around in-game. To fix this, I edited the config file, sw.cfg, and changed the JoystickAnalogScaleX parameter, where X is 1, 2, 3, 4, to 32767, the max/min axis value given when running jstest.

    It is possible to bind buttons, axes and keys to actions in-game inInput Setup found in the Options menu. These bindings are stored in the config file, sw.cfg.

    Expansions Packs

    The GOG release of Shadow Warrior includes the Wanton Destruction and Twin Dragon expansion packs, both of which are supported by JFSW.

    To add Wanton Destruction, I copied WT.GRP to the jfsw folder on my Pi and created the following bash script, Shadow Warrior : Wanton Destruction.sh:

    #!/bin/bash
    /home/pi/RetroPie/roms/ports/jfsw/sw -gWT.GRP  >/dev/null
    

    In GOG release, the Twin Dragon expansion pack is included in the /data/dragon folder. I zipped the files with the extensions .VOC, .MAP, .ART and .ANM into an archive, dragon.zip, which I then copied to the jfsw folder on my Pi. I then created a bash script, Shadow Warrior : Twin Dragon.sh containing the following:

    #!/bin/bash
    /home/pi/RetroPie/roms/ports/jfsw/sw -gdragon.zip >/dev/null
    

    The downside of using the GOG expansion packs is that the descriptions in the in-game menus and level names are missing, though both are perfectly playable. According to the documentation, JFSW can use customisation files, SWCUSTOM.TXT, to add the descriptions but they had no effect for me.

    A preferred route may be to use the specially prepared .GRP files available on the internet that include the menu and level descriptions. I don't know if I can post links to these. As both packs have been released for free, I hope the mods can confirm that I can do so.

    If you have any questions or feedback, then please leave them here. If you would like to talk to the developer, then it may be better to post at the Raspberry Pi forum or at the project Github page.

    F B 2 Replies Last reply 12 Nov 2020, 01:35 Reply Quote 4
    • M
      mitu Global Moderator
      last edited by mitu 19 Dec 2018, 04:51

      That looks really nice. I always thought that would run using eduke32, since it uses the same engine as Duke Nukem, but it seems it's a modified engine. I'll be looking over the forum post on the RPI site to see the progress, would be really cool to have it running using the legacy VC4 driver using GLES and not depend on X.org and the new OpenGL driver.

      Now I only have to get on the Steam/Gog winter sales page and buy Shadow Warrior :).
      EDIT: Wait a minute, it's actually free on both GOG and Steam (GOG has the 'complete' version).

      E T 2 Replies Last reply 19 Dec 2018, 07:18 Reply Quote 2
      • E
        EctoOne @mitu
        last edited by 19 Dec 2018, 07:18

        @mitu said in JSFW, source port for Shadow Warrior now available:

        EDIT: Wait a minute, it's actually free on both GOG and Steam (GOG has the 'complete' version).

        Thanks for the info.

        1 Reply Last reply Reply Quote 0
        • T
          tpo1990
          last edited by tpo1990 19 Dec 2018, 07:43

          Wonderful work you have done. Since i first started with Raspberry Pi and RetroPie, i always wanted to get Shadow Warrior to play on it. Now this has come true. Thank you

          I might be able to help with creating a scriptmodule for making it easier to install JFSW and i will be testing this very soon. Let me know if you need some help with this.

          Also feel free to check out my project for RetroPie: The Hexen 2 Hammer of Thyrion port Install script for Raspberry Pi in my signature.

          Greetings from Denmark. :-)

          Developer of install scripts for ports such as Hexen 2, Return to Castle Wolfenstein and Caesar III. See my other projects at my profile.

          1 Reply Last reply Reply Quote 0
          • T
            tpo1990 @mitu
            last edited by 19 Dec 2018, 07:51

            @mitu I know that there is someone on the internet who tried to get eduke32 to work with Shadow warrior but could not get it to work completely bug free. It has to do something with being that Shadow warrior uses a modified Duke Nukem 3d engine. This is also true for Quake 1 and Hexen 2, since Hexen 2 uses a modified Quake engine and that makes Hexen 2 its own game.

            As long as the original games source files has been released it will be possible for a developer to create a source port and then build it to support ARM architecture. Of course it will need some library files that the building will be depending on for Raspberry Pi to be able to run the source port.

            Greetings from Denmark. :-)

            Developer of install scripts for ports such as Hexen 2, Return to Castle Wolfenstein and Caesar III. See my other projects at my profile.

            1 Reply Last reply Reply Quote 0
            • E
              Efriim
              last edited by Efriim 3 May 2019, 07:48 5 Mar 2019, 06:44

              This isn't working.

              Unable to init server: Could not connect: Connection refused

              Edit: I'll figure it out, its probably the sw.cfg

              EditEdit: I couldn't figure it out.

              I mistook this game for something else anyway.

              T 1 Reply Last reply 16 Sept 2019, 01:58 Reply Quote 0
              • S
                Superman550
                last edited by 6 Mar 2019, 03:14

                hey i keep getting a permission denied error do you have a list of the files i need to include other than the three you mention

                1 Reply Last reply Reply Quote 0
                • T
                  terrorpup @Efriim
                  last edited by 16 Sept 2019, 01:58

                  @Efriim I am having the same issue, there no sw.cfg in /home/pi/jfsw/, so who writes it. I try to start it under X, and I can hear the game but the screen is going crazy.

                  RetroPie 4.4

                  Can give more info upon request.

                  1 Reply Last reply Reply Quote 0
                  • ectoE
                    ecto
                    last edited by ecto 16 Sept 2019, 13:44

                    Hi,
                    I managed to compile jfsw with the instructions of the first post. I have managed to start the game, but I have the following issues:
                    My display is a tv with 1920x1080 and the game window is displayed in its native resolution in the top left corner of the screen. If I change the game's resolution to 1080 I have a full screen display, but it is very sluggish.
                    Also, when I access the advanced mouse configuration, the game crashes with a segmentation fault.
                    I know this is all wip, but I just wanted to let you know.
                    Cheers!

                    Edit
                    The segmentation fault is gone... idk, but maybe it had someting to do with mc being loaded in the background. That has also caused leakage of the keyboard input into the Shell, so maybe that's related.

                    I managed to get a full screen with a lower resolution set in the game by launching jfsw through runcommand.sh with a matched resolution.
                    All is well! :D

                    1 Reply Last reply Reply Quote 0
                    • YarmongrelY
                      Yarmongrel
                      last edited by 15 Oct 2019, 20:35

                      I'm not sure if this is useful for Retropie, but Jonof's JSFW was updated by ProASM into SWP. This, in turn, was mantained by Hendricks266 (one of the leads behind eDuke32) into SWP v4.3.3b3:

                      https://github.com/Hendricks266/SWP

                      Hendrick266's release is supposed to be a bit more stable, with several bugfixes. It also supports the current HRP and Voxel packs.

                      1 Reply Last reply Reply Quote 0
                      • F
                        Firebird_WS6 @dudleydes
                        last edited by 12 Nov 2020, 01:35

                        @dudleydes I know this post is quite old, but I just installed jfsw on my PiBoy DMG with pi4 installed, running Retropie 4.7 and it works great! However I can't get the music tracks to play.

                        I copied track02.ogg through track14.ogg (renaming because the originals were TrackXX.ogg using a capital T instead of t) to /home/pi/RetroPie/roms/ports/jfsw/MUSIC. I changed the music location in /home/pi/.jfsw/sw.cfg to OggTrackName = "MUSIC/track??.ogg". However I don't get any music.

                        I also tried the default location /home/pi/RetroPie/roms/ports/jfsw/ and reverted the .cfg file back, but that didn't work either.

                        Any ideas?

                        P 1 Reply Last reply 12 Nov 2020, 07:43 Reply Quote 1
                        • P
                          Proletariate1984 @Firebird_WS6
                          last edited by 12 Nov 2020, 07:43

                          @firebird_ws6 Sup dude, I think we're talking on FB. I cannot get this running. I'm getting the permission denied error that someone mention above. I copied everything into the jfsw folder. Do know which specific files you included in the /ports/jfsw folder?

                          F 1 Reply Last reply 14 Dec 2020, 20:50 Reply Quote 0
                          • F
                            Firebird_WS6 @Proletariate1984
                            last edited by Firebird_WS6 14 Dec 2020, 20:50

                            @proletariate1984 Copy the following files from your GOG Shadow Warrior folders into /home/pi/RetroPie/roms/ports/jfsw all files must be in the same folder as the sw binary:
                            from the GOG Shadow Warrior folder top level: sw.grp and sw.rts
                            from the MUSIC folder, Track02.ogg though Track14.ogg

                            Change file permissions to 755 for /home/pi/RetroPie/roms/ports/Shadow Warrior.sh and /home/pi/RetroPie/roms/ports/jfsw/sw

                            FYI, I solved the music problem. SW needs sudo apt install libvorbis-dev libfluidsynth-dev in order to compile the music dependencies.

                            1 Reply Last reply Reply Quote 0
                            • B
                              boolean @dudleydes
                              last edited by boolean 25 Jan 2021, 02:38

                              @dudleydes said in JSFW, source port for Shadow Warrior now available:

                              Building JFSW

                              To build the JFSW binary, run the following commands on your Pi:

                              git clone https://github.com/jonof/jfsw.git
                              cd jfsw
                              git submodule init
                              git submodule update
                              make USE_POLYMOST=0 USE_OPENGL=0
                              

                              Why not build using OpenGL ES 2.0 acceleration?

                              make USE_OPENGL=USE_GLES2 USE_POLYMOST=1 CFLAGS="-march=native -DSDLAYER_USE_RENDERER"
                              

                              I've done this myself and Shadow Warrior plays at 1920x1080 (32bpp) at a blazing speed without any glitches/hiccups or slowdowns.

                              1 Reply Last reply Reply Quote 1
                              • S sleve_mcdichael referenced this topic on 11 Mar 2022, 23:10
                              • S sleve_mcdichael referenced this topic on 17 Mar 2022, 00:17
                              • 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.

                                This community forum collects and processes your personal information.
                                consent.not_received