Ok so here we go:
Awesome job on this! Glad you finally got some closure on a good thing!
Another thing to include in the zdoom.ini file is
snd_mididevice=-2
if you also want to have music.
This activates Timidity++.
Iāve added a forced resolution into my *.sh launch script, forcing the 320x240 resolution. (Iām guessing the 324x240 resolution specified was an error?)
eg.
zdoom -width 320 -height 240 -iwad /home/cpi/games/ChocoDM/DOOM2BFG.WAD -file /home/cpi/games/ChocoDM/brutalv20b.pk3
(Iāve installed the launch files to the /usr/games/zdoom directory, so I can just use the shorter alias to start it, but thatās just my own OCD preference)
Running the script without any parameters telling it where to find PAK files can allow you to choose which WAD file to use. Youāll need to specify the directory in the zdoom.ini file.
eg.
[IWADSearch.Directories]
Path=~/games/ChocoDM
[FileSearch.Directories]
Path=~/games/ChocoDM
I chose to have the WAD directory as ROM=/home/cpi/games/ChocoDM, since this is a path already installed on a stock 0.5 system, and is where the chocoDM built in wrapper expects WAD files to be. Just keeping things tidy.
Alternatively, if youāve got a lot of .WAD/.pk3 files, you can make an action.config file to specify which WAD to use. Unfortunately I donāt know how to independently choose both -file and -iwad arguments, besides having discrete action.config files for each -file combination.
ROM=/home/cpi/games/ChocoDM
ROM_SO=
EXT=wad, WAD, pk3, PK3
LAUNCHER=zdoom -width 320 -height 240 -iwad
TITLE=Zdoom
EXCLUDE=
SO_URL=
Keep in mind, this wonāt load the Brutal Doom mod. If you want it to, youāll need to provide -file /home/cpi/games/ChocoDM/brutalv20b.pk3
before -iwad in the launcher line. I didnāt include it, since other WADS such as Heretic, Hexen and Strife are incompatible with Brutal Doom.
Unfortunately, zdoom doesnāt save any mappings you make within the wrapper. Youāll need to specify your keys yourself in the zdoom.ini. Hereās the problem. Not all of the variables are there for you to map. Not very convenient. Worse still, the key binds that are there arenāt really in any particular order, so it will take forever to find what you need.
Iāve written out all of the key bind options, in the order that they appear in the Doom 2 key config menu in game. That way, you can map something that feels comfortable in game, test it out, and then copy down what you want in the zdoom.ini file. If you want to clear an entry within zdoom, push shift+menu (which is the back space key)
Youāll need to find the [ Doom.Bindings ] section in the zdoom.ini file, and delete everything up until the next heading, replacing it with this. You can also apply it to Hexen.Bindings, Heretic.Bindings, Strife.Bindings etc, since they all pretty much use the same format.
[Doom.Bindings]
=+attack
=+altattack
=+reload
=+zoom
=grenadetoss
=+user1
=+user2
=+user3
=+user4
=+use
=+forward
=+back
=+moveleft
=+moveright
=+left
=+right
=+jump
=+crouch
=crouch
=+moveup
=+movedown
=land
=+mlook
=+klook
=+lookup
=+lookdown
=centerview
=+speed
=toggle cl_run
=+strafe
=+showscores
=togglescoreboard
=messagemode
=messagemode2
=weapnext
=weapprev
=slot 1
=slot 2
=slot 3
=slot 4
=slot 5
=slot 6
=slot 7
=slot 8
=slot 9
=slot 0
=invuse
=invuseall
=invnext
=invprev
=invdrop
=invquery
=weapdrop
=togglemap
=chasecam
=spynet
=screenshot
=toggleconsole
=showpop 1
=showpop 2
=showpop 3
=menu_main
=menu_help
=menu_save
=menu_load
=menu_options
=menu_display
=menu_quit
=menu_endgame
=pause
=quicksave
=quickload
=sizedown
=sizeup
=bumpgamma
=togglemessages
Any entries you donāt put in an entry for will be erased, so donāt worry about deleting any unused lines, or commenting them out.
Hereās the keys/letters to put in, corresponding to each key. In particular, it refers to the up/down/left/right as arrows. Hereās how Iāve bound mine, simulating a WASD configuration.
uparrow=+forward
leftarrow=+moveleft
rightarrow=+moveright
downarrow=+back
Shift+Select (-) and Shift+Start (+) are referring to their Keypad variants, and are prefixed with ākpā.
I have them mapped to advancing menu items backwards and forwards like this. (mainly for Hexen)
kp-=invprev
kp+=invnext
(PgDown is referred to as pgdn)
The light key bindings are all backwards, re: holding shift. This means that the shift+ABXY will all end up bring duplicates of the light key buttons. Be careful when considering mappings not to double up!
Thanks for these infos!
In the zdoom.ini I provided the controls are already mapped.
Aha! I didnāt check that! Just thought it had the resolution and efx fixes! All good!.
Just providing it, in case people want to map their own. Eg, I personally prefer to not have the light key module installed, so have a VERY different mapping! Plus there are a lot more of the commonly used bindings that are automatically removed from the zdoom.ini file.
Who knows? Someone might really want the spy net feature.
Imagine. Being at a LAN party. Everyone has a gameshell, and spy net is allowed. Screen cheating, via a small handheld device. This legitimately sounds fun, and I am tempted to do this!
I have updated my zdoom.ini on dropbox with:
snd_mididevice=-2
Potentially, you could probably do away with all of the FMOD references in the build process to save a bit of time and space, since weāre now using a working openal sound driver.
Basically, omit
-f output_sdl/liboutput_sdl.so f='-UFMOD_LIBRARY -UFMOD_INCLUDE_DIR' && [ -d fmodapi44464linux ] && f="-DFMOD_LIBRARY=fmodapi44464linux/api/lib/libfmodex{a}-4.44.64.so
-DFMOD_INCLUDE_DIR=fmodapi44464linux/api/incā
and not bothering with doing
wget -nc http://zdoom.org/files/fmod/fmodapi44464linux.tar.gz
tar -xvzf fmodapi44464linux.tar.gz
cmake ā¦ -DNO_FMOD=ON
The fact that weāre doing cmake ā¦ -DNO_FMOD=ON
, disabling FMOD anyway kinda makes it redundant going to all the trouble of installing it.
I think you might be doubling up on make, doing it both in the above step 4, and using the cmake ā¦ -DCMAKE_BUILD_TYPE=Release
later on, in step 5.
Also, step 2 finishes with cd zdoom/build. Assuming weāre in the same session, you technically wouldnāt need to have another cd zdoom/build in step 4.
Speaking of the make process, the .sh script from the original post is referring to the file thatās still in the build directory. If youāve installed it to the /usr/games/zdoom directory (along with zdoom.pk3), you can remove the entirety of the /home/cpi/zdoom directory, cleaning up your home directory and saving space. Iām just extremely pedantic about leaving installation files behind!
Looking at the zdoom wiki linux installation page, it looks like youāve basically followed it all, but stopped at the installation stage.
https://zdoom.org/wiki/Compile_ZDoom_on_Linux
a='' && [ "$(uname -m)" = x86_64 ] && a=64
h="$(sed -n 's/.*#define GIT_HASH "\(.*\)".*/\1/p' ../src/gitinfo.h)"
d='' && [ -z "$(git describe --exact-match --tags $h 2>/dev/null)" ] && d=-alpha
o=output_sdl/liboutput_sdl.so && l='' && [ -f "$o" ] && l="$o \
fmodapi44464linux/api/lib/libfmodex${a}-4.44.64.so"
chrpath -r '$ORIGIN' zdoom
sudo cp -v zdoom zdoom.pk3 $l \
/usr/games/zdoom$d/
The problem here is, chrpath -r '$ORIGIN' zdoom
doesnāt appear to work. (changing the root path)
You can work around it, using patchelf instead.
sudo apt-get install patchelf
Then instead of chrpath -r '$ORIGIN' zdoom
, run:
patchelf --set-rpath '$ORIGIN' zdoom
It doesnāt appear to install a non alpha/developmental copy of the files, by simply copy pasting whatās on the wiki page. Run this to fix this:
a='' && [ "$(uname -m)" = x86_64 ] && a=64
h="$(sed -n 's/.*#define GIT_HASH "\(.*\)".*/\1/p' ../src/gitinfo.h)"
d='' && [ -z "$(git describe --exact-match --tags $h 2>/dev/null)" ] && d=-alpha
o=output_sdl/liboutput_sdl.so && l='' && [ -f "$o" ] && l="$o \
fmodapi44464linux/api/lib/libfmodex${a}-4.44.64.so"
patchelf --set-rpath '$ORIGIN' zdoom
sudo cp -v zdoom zdoom.pk3 $l \
/usr/games/zdoom/
And then create a different launch script, running:
h="$(sed -n 's/.*#define GIT_HASH "\(.*\)".*/\1/p' ../src/gitinfo.h)"
d='' && [ -z "$(git describe --exact-match --tags $h 2>/dev/null)" ] && d=-alpha
printf %s "\
#!/bin/sh
exec /usr/games/zdoom/zdoom \"\$@\"
" > zdoom.sh
chmod 755 zdoom.sh
sudo mv -v zdoom.sh /usr/bin/zdoom
After doing all this, you shouldnāt need the contents of /usr/games/zdoom
ever again, so remove it.
sudo rm -r /home/cpi/zdoom/
And one final small fix to the tutorial: Steps 7 and 8 refer to the files Doom2.wad
and doom2.wad
. They should both be the same file name, including capitalisation, so either change the Doom2.wad
to doom2.wad
, or change the path in your SH file.
lol I will read all of this and try to learn from it for sure.
Thanks
I've cleaned up your installation
A lot of the steps you included, copied from the wiki include a lot of a=, h=, d= etc statements. This is great for having it installed on various configurations and systems. But since we all have basically the same configurations and even usernames (cpi), we can possibly clean it up and make it more elegant, putting in the exact input required.
Itās basically like doing algebra, re how to work out where each defined variable goes. It will clean up the installation A LOT. Hell. We could even write an automated script to install it all.
Eg.
Reviewing step 5.
a=āā && [ ā(uname -m)" = x86_64 ] && a=64 c="(lscpu -p | grep -v ā#ā | sort -u -t , -k 2,4 | wc -l)ā ; [ āc" -eq 0 ] && c=1 rm -f output_sdl/liboutput_sdl.so f='-UFMOD_LIBRARY -UFMOD_INCLUDE_DIR' && [ -d fmodapi44464linux ] && f="-DFMOD_LIBRARY=fmodapi44464linux/api/lib/libfmodex{a}-4.44.64.so
-DFMOD_INCLUDE_DIR=fmodapi44464linux/api/incā
cmake ā¦ -DCMAKE_BUILD_TYPE=Release $f &&
make -j$c
The first line includes definitions. If we know what we want to type, we can just remove them.
The second line we can just ignore, since weāre probably not going to need to install anything to do with fmod.
In the third line, the $f is referring to f="-DFMOD_LIBRARY=fmodapi44464linux/api/lib/libfmodex{a}-4.44.64.so
Again, weāre not working with fmod, so we can remove it. cmake ā¦ -DCMAKE_BUILD_TYPE=Release
In the fourth line, the -j$c is referring to c="(lscpu -p | grep -v ā#ā | sort -u -t , -k 2,4 | wc -l)ā ; [ āc" -eq 0 ] && c=1
, ie an identifier for how many cores we have.
Just change the $c to 4, because we know that we have 4 cores. make-j4
So after all of that, we can simplify the entirety of step 5 to:
cmake .. -DCMAKE_BUILD_TYPE=Release && make-j4
(note: I have also fixed up a typo, where you have used three dots (ā¦) instead of two (ā¦)
Of course, we still need to edit the oalsound.cpp
before doing make, but thatās easily achievable with this:
sed -i "42 a #include <functional>" /home/cpi/zdoom/src/sound/oalsound.cpp
This is basically step 3, done a bit more eloquently.
Putting it all together, I would say that we can probably skip the entirety of step 4. This simplifies the entire process down to:
sudo apt-get -y install g++ make cmake libsdl2-dev git zlib1g-dev libbz2-dev libjpeg-dev libfluidsynth-dev libgme-dev libopenal-dev libmpg123-dev libsndfile1-dev libwildmidi-dev libgtk-3-dev timidity nasm tar chrpath patchelf
git clone git://github.com/rheit/zdoom.git
sed -i "42 a #include <functional>" /home/cpi/zdoom/src/sound/oalsound.cpp
mkdir -pv zdoom/build
cd zdoom/build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4
(I added the -y argument, so you donāt need to push y to confirm installing each package. I also added patchelf to the install list, since weāll need it for a step later re: installing)
Hereās the step to install the files we just made with cmake. I guess this is kinda optional, but isnāt? Not doing it is the equivalent of installing a game on your computer in your desktop folder. I prefer to install things in a more conventional installation path.
sudo mkdir -pv /usr/games/zdoom
patchelf --set-rpath '$ORIGIN' zdoom
sudo cp -v zdoom zdoom.pk3 \
/usr/games/zdoom/
printf %s "\
#!/bin/sh
exec /usr/games/zdoom/zdoom \"\$@\"
" > zdoom.sh
chmod 755 zdoom.sh
sudo mv -v zdoom.sh /usr/bin/zdoom
Then finally, we can delete all of the files we just used to make the files. Consider this like doing your dishes after making dinner. You donāt have to do it, but someoneās going to get antsy if you donāt.
sudo rm -r /home/cpi/zdoom/
Test if it works with export DISPLAY=:0 zdoom -width 320 -height 240
As for running it on the gameshell, make an action.config file wherever you want, containing this. (assuming youāve got a whole bunch of WAD files saved to the /home/cpi/games/ChocoDM directory)
ROM=/home/cpi/games/ChocoDM
ROM_SO=
EXT=wad, WAD, pk3, PK3
LAUNCHER=zdoom -width 320 -height 240 -iwad
TITLE=Zdoom
EXCLUDE=
SO_URL=
All of that should be able to be added to a single script in order to streamline the process. Iām a bit lazy when it comes to making verbose visual output, so just make sure you kinda know what youāre doing if you do decide to do this. Otherwise there will be a hell of a lot of troubleshooting!
Here is a much simpler and cleaner way to install zdoom.
SSH into your gameshell, and run this.
wget -O /home/cpi/zdoom.sh https://www.dropbox.com/s/j2fu7twdrw7ec72/zdoom.sh?dl=1
chmod +x /home/cpi/zdoom.sh
./zdoom.sh
In case the dropbox links ever go down, and the script breaks, I have provided the essential files below:
Here are the contents of the script
#!/bin/sh
# WRITEN BY JAVELINFACE FOR THE GAMESHELL FEB 5 2020
echo "----------INSTALL PACKAGES----------"
sudo apt-get -y install g++ make cmake libsdl2-dev git zlib1g-dev libbz2-dev libjpeg-dev libfluidsynth-dev libgme-dev libopenal-dev libmpg123-dev libsndfile1-dev libwildmidi-dev libgtk-3-dev timidity nasm tar chrpath patchelf
echo "----------CLONE ZDOOM FILES----------"
git clone git://github.com/rheit/zdoom.git
echo "----------FIX ERRONEOUS FILES----------"
sed -i "42 a #include <functional>" /home/cpi/zdoom/src/sound/oalsound.cpp
echo "----------MAKE ZDOOM----------"
mkdir -pv zdoom/build
cd zdoom/build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4
echo "----------INSTALL ZDOOM----------"
sudo mkdir -pv /usr/games/zdoom
patchelf --set-rpath '$ORIGIN' zdoom
sudo cp -v zdoom zdoom.pk3 \
/usr/games/zdoom/
printf %s "\
#!/bin/sh
exec /usr/games/zdoom/zdoom \"\$@\"
" > zdoom.sh
chmod 755 zdoom.sh
sudo mv -v zdoom.sh /usr/bin/zdoom
echo "----------ADD LAUNCHER MENU ITEMS----------"
mkdir -pv /home/cpi/apps/Menu/20_Retro\ Games/05_zdoom
printf %s "ROM=/home/cpi/games/ChocoDM
ROM_SO=
EXT=wad,WAD,pk3,PK3
LAUNCHER=zdoom -width 320 -height 240 -iwad
TITLE=Zdoom
EXCLUDE=
SO_URL=" > /home/cpi/apps/Menu/20_Retro\ Games/05_zdoom/action.config
mkdir -pv /home/cpi/apps/Menu/20_Retro\ Games/06_brutal
printf %s "ROM=/home/cpi/games/ChocoDM
ROM_SO=
EXT=wad,WAD,pk3,PK3
LAUNCHER=zdoom -width 320 -height 240 -file /home/cpi/games/ChocoDM/brutalv20p.pk3 -iwad
TITLE=Brutal Doom
EXCLUDE=
SO_URL=" > /home/cpi/apps/Menu/20_Retro\ Games/06_brutal/action.config
echo "----------GIVE IT AN ICON----------"
wget -O /home/cpi/apps/Menu/20_Retro\ Games/05_zdoom/zdoom.png https://www.dropbox.com/s/z4eezhuzhbdxi8t/zdoom.png?dl=1
wget -O /home/cpi/apps/Menu/20_Retro\ Games/06_zdoom/brutal.png https://www.dropbox.com/s/hc6ye5w9yqjazjd/brutal.png?dl=1
echo "----------MODIFY INI FILE----------"
mkdir -pv /home/cpi/.config/zdoom
wget -O /home/cpi/.config/zdoom/zdoom.ini https://www.dropbox.com/s/9reeu639xn403l7/zdoom.ini?dl=1
echo "----------DOWNLOAD BRUTAL DOOM----------"
wget -O /home/cpi/games/ChocoDM/brutalv20b.pk3 https://www.dropbox.com/s/hc0sz5j2vun2t8d/brutalv20b.pk3?dl=1
echo "----------CLEANUP----------"
sudo rm -r /home/cpi/zdoom/
rm /home/cpi/zdoom.sh
Here are the contents of zdoom.ini
Great! Now itās all clear and works like a charm.
Thanks!!
Excellent. There were a lot of typos, and redundant errors in the original instructions. Plus, itās way easier to just script the edits to be done to the erroneous file, as opposed to opening a separate text editor. I think that may have been part of the problem, ie @Lix 's text editor making auto corrections. He types with ellipsisās quite a lotā¦ like thisā¦ So I think his computer tried to auto correct itā¦
Iāve updated the script to also include downloading and installing brutal doom. Depending on when you ran the script, it might not be there. Also, Iāve made a separate script, if youāre using my custom DEOT OS image. It just respects the directory heiracy, and uses a matching icon.
Thanks!
For the Typo I donāt know I typed everything in the reply box directly.
For the rest, I am far from being able to simplify a compile script yet. I am a big NOOB in all of this.
I try things, sometimes it work, sometimes its a messā¦
But with all of you guys to clean up things we are in business!
So is there a simple way for me to take your post a put it at the top of this page?
I would like people to see the correct way first.
Hey, haha Iām a huge noob as well. Iām a musician by trade, so donāt deal with this on a day to day basis like a lot of the other people here! Iām just extremely pedantic about tiny details, and basically treat code like writing music. Itās the same haha. Iām guessing itās the same with you too and your graphic design work.
If you just copy the link, and add it to the the first post, that could work!
this one
Then you can comment out your original post. That said, for educational purposes even keeping mistakes is a great way for people to learn the thought process of how to work things out. Itās always tricky seeing solutions to your problems, asked and solved by people leagues ahead of you in skills and knowledge.
@javelinface sorry to disturb but I tried using your ssh script, worked like a charm zdoom is way better but I had 2 problemsā¦
- ZDoom wonāt launch Brutal doom and dont know of a way to do it. Tried changing the global autoload on zdoom.ini but it didnt work. (Just found out Brutalv20.pk3 only appears as an option in ZDoom when using LauncherGo, but still canāt use it since I canāt then select which wad to use)
- The really bad oneā¦ my āretro gamesā icon dissapeared. Storage is still being used. But I canāt access my emularors or games. :(( could you please help me? After using the script in ssh; the category dissapeared from the home menu on mine. (Also found out āRetro gamesā appears on my home screen when using LauncherGo but the performance is really worst compairing it to the standard Python Launcherā¦) Iām already feeling hopeless here.
Hello! Welcome to the forums!
Aha!! Yup! This is a bug in the launcher that needs to be addressed.
For now, move the zdoom into any where. Eg.
mv /home/cpi/apps/Menu/05_zdoom/ /home/cpi/apps/Menu/20_Retro\ Games/05_zdoom/
To get rid of the bug re retro games going missing,
rm /home/cpi/launcher/Menu/GameShell/20_Retro\ Games/
Itās a completely empty directory that shouldnāt be there, and causes problems. This bug will cause problems trying to have any folder take up a spot before retro games.
As for making the brutal doom pk3 load, you can define the variable in the action.config. I didnāt do this, since itās a manual thing to enable, if youāre using a doom/doom2 WAD. Iāll make a separate action.config to match:
mkdir -pv /home/cpi/apps/Menu/20_Retro\ Games/06_brutal
printf %s "ROM=/home/cpi/games/ChocoDM
ROM_SO=
EXT=wad, WAD, pk3, PK3
LAUNCHER=zdoom -width 320 -height 240 -file /home/cpi/games/ChocoDM/brutalv20p.pk3 -iwad
TITLE=Brutal Doom
EXCLUDE=
SO_URL=" > /home/cpi/apps/Menu/20_Retro\ Games/06_brutal/action.config
Iāll edit the script to make these changes by default! Thanks for pointing these out!
Thank you for the welcome! And Already did and it worked! Thank you so much, my iconsappeared again, looks like it was indeed that bug that made my retro games dissapear.
And for the ZDOOM is there a way to make the PK3 appear in my ZDOOM app?
Iāve been trying to make it open other gameplay mods for Doom/Doom 2 wads like Doom 4 Vanilla v2.5.6, or Doom Exp v2.1 would like to know if thereās a way to choose them in a list instead of having to modify some auto-load configs everytime I wanted to try another mod. Sorry If I mess up with the basics, just got mine literally yesterday haha, Iām in love with it so far!
Thanks again!
There certainly is! Although, due to the constraints of how the action.config works, you can either choose a WAD or a PK3; not independently. You can edit the config of zdoom.ini to explicitly say which one you want, however since I donāt know what people have, want or have things named as, i couldnāt take liberties of pre configuring it. Here it is for now. I didnāt provide it in the script, since this thread is for brutal doom specifically, depending on the pk3 thatās provided.
mkdir -pv /home/cpi/apps/Menu/20_Retro\ Games/07_zdmods
printf %s "ROM=/home/cpi/games/ChocoDM
ROM_SO=
EXT=pk3, PK3
LAUNCHER=zdoom -width 320 -height 240 -file
TITLE=ZDoom Mods
EXCLUDE=
SO_URL=" > /home/cpi/apps/Menu/20_Retro\ Games/07_zdmods/action.config
Also congrats on diving in to some juicy stuff so early, since getting it! Believe me! Youāll have some sleepless nights, staying up waiting for things to compile, and trying new things; And of course having to restart A LOT!
Consider installing this as well: This allows you to push select twice to enable a virtual mouse mode. I have configured my game to use two key sets: One for standard keyboard, and one for the mouse. I have the A button (SNES) set to run forwards, and B button (SNES) to fire, leaving the DPAD for looking around. Good for tight spots. As you might have figured, the control config Iāve provided is catered to people who donāt use the light bar. I can make a different one, that more closely resembles a modern console style FPS if youād like. @lix has also provided his own config that you can try out.
Damn, hahaha you read my mind! Actually I just found my easy way to modify my zdoom.ini, just tried Brutal doom and 4 Vanilla and it worked flawlessly.
And as I said before I do use the light bar (Iām trying to get used to it, I really donāt like the cables hanging out freely) Iām looking to make a proper fps feeling, that mouse mod really looks promising, Iāll try it and see how it improves the gameplay !
@Officerpug
I already did all the steps before, just FYI
Howād did you make this work?
And where did you find the zdoom.ini?
Thank you
@HalfBlood zdoom.ini can be found in the directory /home/cpi/.config/zdoom,
You could just edit itās global.autoload feature for Brutal Doom or D4V in it, or actually any mod combination youād want to try out.
Under Global.autoload the correct path to look after the mod itself would go on like this:
Path=/home/cpi/games/ChocoDM/brutalv20b.pk3
No problem man, hope it helps!
Appreciate your response @Officerpug , but after installing @javelinface cleaner way for zdoom the .config folder is nowhere to be found. But the zdoom and brutal doom apps work fine though