JSFW, source port for Shadow Warrior now available
-
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 runsw
from a different folder but I haven't worked it out.)In the
ports
folder, I created a folderjfsw
into which I copied thesw
binary as well as the game assets,sw.grp
andsw.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 theports
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 theMUSIC
folder which is support by JSFW.I copied the
MUSIC
folder to thejfsw
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
, thatUseJoystick
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 theJoystickAnalogScaleX
parameter, where X is 1, 2, 3, 4, to 32767, the max/min axis value given when runningjstest
.It is possible to bind buttons, axes and keys to actions in-game in
Input Setup
found in theOptions
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 thejfsw
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 thejfsw
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.
-
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). -
@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.
-
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.
-
@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.
-
This isn't working.
Unable to init server: Could not connect: Connection refused
Edit: I'll figure it out, its probably the sw.cfgEditEdit: I couldn't figure it out.
I mistook this game for something else anyway.
-
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
-
@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.
-
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 -
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.
-
@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?
-
@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?
-
@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.oggChange 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. -
@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.
-
-
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.