Let's play Wolfenstein-3D!

Thank you for trying to help me with this, but now I am even more confused. Your last post conflicts with the original post of the thread.

original
3. Check if the installation succeeded:
cpi@clockworkpi:~$ ls -l /usr/games/wolf*

last post
creates the folder /usr/share/wolf4sdl with the wolf4sdl program files.

If I am understanding this correctly, this command downloads and installs the wolf4sdl program files, correct?
sudo apt update && sudo apt -y install wolf4sdl

This is what I get when I run the command the second time

image

and this is where they landed.

image

To fix this, all i have to do is move them to another folder?

Also, I looked under /usr/share/ , but could not find the wolf4sdl folder.

Yes, my bad. Let me rewrite exactly what should happen now… Be right back.

Imagine you just flashed the new v0.3 image.
Then you literally have to copy-paste each of these lines in your SSH client (PuTTY?):

sudo apt update
sudo apt -y install wolf4sdl
mkdir /home/cpi/games/Wolf3D

Somehow copy your purchased *.WL6 files to /home/cpi/games/Wolf3D.

cd /home/cpi/games/Wolf3D
rename 'y/A-Z/a-z/' *
mkdir "/home/cpi/apps/Menu/Wolfenstein 3D/"
cd "/home/cpi/apps/Menu/Wolfenstein 3D/"
echo "sudo ln -s /home/cpi/games/Wolf3D /usr/share/games/wolf3d" > 'Wolfenstein 3D.sh'
echo "xmodmap -e 'keysym y = 1' # Shift-X = Knife" >> 'Wolfenstein 3D.sh'
echo "xmodmap -e 'keysym o = 2' # Shift-Y = Pistol" >> 'Wolfenstein 3D.sh'
echo "xmodmap -e 'keysym h = 3' # Shift-A = Machine Gun" >> 'Wolfenstein 3D.sh'
echo "xmodmap -e 'keysym l = 4' # Shift-B = Chain Gun" >> 'Wolfenstein 3D.sh'
echo "xmodmap -e 'keysym i = Y' # Y = Yes" >> 'Wolfenstein 3D.sh'
echo "wolf4sdl --res 320 240" >> 'Wolfenstein 3D.sh'
echo "setxkbmap # Undo key mappings" >> 'Wolfenstein 3D.sh'
echo "sudo unlink /usr/share/games/wolf3d" >> 'Wolfenstein 3D.sh'

Reload your UI on the GameShell.

Hope this explains it for you. There are three folders involved:

  • Installing wolf4sdl creates the file /usr/games/wolf4sdl.
  • You make the directory /home/cpi/games/Wolf3D and put WL6 files in it.
  • The script (un)links that folder to /usr/share/games/wolf3d at runtime.

Well, four folders:

  • You create a script in /home/cpi/apps/Menu/Wolfenstein 3D/

The script should be installed into its own folder within ~/apps/Menu. IE:

/home/cpi/apps/Menu/Wolfenstein 3D/
                  Wolfenstein 3D.png
                  Wolfenstein 3D.sh

Okay, I corrected it. I should run it again if it works and later figure out why you are probably right.

Thanks Oet. I know you’re trying, but I’m just not getting it. I tried your other tutorial Duke Nukem 3d, but it failed for me as well. Although I was able to get Doom working, there were very few steps. I’ll just come back to it another time. I’ll show you what I did to follow your last post.

image

After going through those steps, I just get a blank screen and automatic return to the launcher.

Hmm, all looks good. Type in this to run it on the GameShell and give us the output PuTTY gives:

DISPLAY=:0 "/home/cpi/apps/Menu/Wolfenstein 3D/Wolfenstein 3D.sh"

(and they broke the Duke3D source for the GameShell since December as mentioned in the post)

oh ok. I missed the part about the source. Here are the results.

image

Before you start the script, the directory /usr/share/games/wolf3d should NOT exist. In your case it probably already exists, so the script can’t do its work.

Look at what it links to:

ls -l /usr/share/games/wolf3d

If you get this output:

lrwxrwxrwx 1 root root 22 Feb 15 10:59 /usr/share/games/wolf3d -> /home/cpi/games/Wolf3D

Then manually unlink it:

sudo unlink /usr/share/games/wolf3d

Retry the script:

DISPLAY=:0 "/home/cpi/apps/Menu/Wolfenstein 3D/Wolfenstein 3D.sh"

Show us the output of this procedure.

It won’t let me unlink it.

image

I wonder what you have been doing :).

In this case I would try:

sudo unlink /usr/share/games/wolf3d/Wolf3D
sudo rmdir /usr/share/games/wolf3d/

Output? :slight_smile:

successful. Thank you. Learning so much. I feel like i’ll forget it tomorrow though. So much different than Windows.

Tried the display script and I get a permission denied.

Ermm, can you run the game now? You can’t run the display script (which runs the game) when you are already running the game.

Sorry. I have just attempted to run it and it shows the cpi loading screen, then black screen, then launcher. I also restarted before running the game. No Wolfenstein for me. :frowning:

Somehow, I think your wolf4sdl files do not have the right permissions anymore:

~$ ls -l /usr/games/wolf4sdl*
-rwxr-xr-x 1 root root   1636 Mar  4  2017 /usr/games/wolf4sdl
-rwxr-xr-x 1 root root 240180 Mar  4  2017 /usr/games/wolf4sdl-sdm
-rwxr-xr-x 1 root root 244460 Mar  4  2017 /usr/games/wolf4sdl-sod
-rwxr-xr-x 1 root root 250216 Mar  4  2017 /usr/games/wolf4sdl-wl1
-rwxr-xr-x 1 root root 250484 Mar  4  2017 /usr/games/wolf4sdl-wl6
-rwxr-xr-x 1 root root 250528 Mar  4  2017 /usr/games/wolf4sdl-wl6a
-rwxr-xr-x 1 root root 250528 Mar  4  2017 /usr/games/wolf4sdl-wl6a1

It should be -rwxr-xr-x. I need to see your output again after this command.

yep. I screwed up something. I was trying to fix it by moving the files to another folder yesterday and looks like it changed those permissions.

image

sudo chmod a+x /usr/games/wolf4sdl*

Dude, I owe you a beer. Thanks so much.

image

2 Likes