Let's play Duke Nukem 3D!


#1

Hmm, ain’t got time to play with myself!

Next up is Duke Nukem 3D! The website of EDuke32 recommends building from source. Okay, so be it. :slight_smile: Make sure you have a valid copy of DUKE3D.GRP!

  1. Install these dependencies:
sudo apt update && sudo apt install libflac-dev libsdl2-mixer-dev libvorbis-dev libvpx-dev 
  1. Download the latest EDuke32 source files (this will create directory ./svn.eduke32.com/):
wget -r --no-parent https://svn.eduke32.com/eduke32/
  1. Go to the source files:
cd svn.eduke32.com/eduke32/
  1. Build it!
make

What are you waiting for, Christmas?

  1. Wait at least 20 minutes. Be patient when it shows ‘Linking’ operations. These two just take long:
Linking eduke32...
Linking mapster32...

It should now have created two files; eduke32 and mapster32.

  1. Make a new game folder ‘Duke3D’:
mkdir ~/games/Duke3D
  1. Copy the file eduke32 to this folder:
cp eduke32 ~/games/Duke3D
  1. Copy your purchased DUKE3D.GRP also to this folder!

  2. Create the launch script:

cd ~/apps/launcher/Menu/GameShell/
echo 'cd ~/games/Duke3D' > 'Duke Nukem 3D.sh'
echo './eduke32' >> 'Duke Nukem 3D.sh'
  1. Clean up:
rm -r ~/svn.eduke32.com
  1. Reboot!

Set the controls in-game!

Let’s rock!


How can I install, configure and run DOS games?
#2

I’ve got it working! Runs very smoothly although the sound is a bit choppy. It might be resolved by turning down the sample rate and number of voices in the settings.

Oh, and for anyone trying this out… Do not touch the display settings. If you do, the game will instantly render in 640x480 and you can’t get rid of that setting. Only way is to go into you settings file using SSH and changing it to 320x240 manually again.

So with all that said, let’s rock! Very awesome to play this classic again!

Thanks for setting this up, @Oet !


#3

Thx. I had the same choppy sound.

I reduced the Voices to a minimum:
Options --> Souns Setup --> Advanced --> Voices --> Apply Changes

Runs smooth now!


#4

For people who directly want to correct their resolution, run these:

sed -i 's/^ScreenWidth.*/ScreenWidth = 320/' ~/.config/eduke32/eduke32.cfg
sed -i 's/^ScreenHeight.*/ScreenHeight = 240/' ~/.config/eduke32/eduke32.cfg

#5

And here’s an icon for the shell :slight_smile:

Duke%20Nukem%203D


#6

@Nielsvd also made one:


#7

How do you got your controls mapped? I tried to map em myself but I can’t seem to unmap so I got some awkward presses happening lol


#8

Press your ‘start’ button and press the desired button after. This works as long as you don’t remap your ‘start’ button of course. :wink:


#9

Thanks for the tutorial. It was very clear, and the game runs smoothly.

I put the sample rate to the minimum, and turned up voices to the max, and haven’t noticed any choppiness in sounds so far doing that.

Any recommendations on how you setup the controls? I’ve only ever played duke3D with both a mouse and keyboard, and I cant decide how to set it up optimally for the gameshell


#10

Here is a copy of my Settings. Maybe this could help. I’m still tweaking, so i may alter this later.

this file is automatically generated by EDuke32
unbindall
bind "1" "gamefunc_Weapon_1"
bind "2" "gamefunc_Weapon_2"
bind "3" "gamefunc_Weapon_3"
bind "4" "gamefunc_Weapon_4"
bind "5" "gamefunc_Weapon_5"
bind "6" "gamefunc_Weapon_6"
bind "7" "gamefunc_Weapon_7"
bind "8" "gamefunc_Weapon_8"
bind "9" "gamefunc_Weapon_9"
bind "0" "gamefunc_Weapon_10"
bind "-" "gamefunc_Shrink_Screen"
bind "=" "gamefunc_Enlarge_Screen"
bind "BakSpc" "gamefunc_TurnAround"
bind "+" "gamefunc_Map"
bind "Q" "gamefunc_Quick_Kick"
bind "W" "gamefunc_Move_Forward"
bind "U" "gamefunc_Open"
bind "R" "gamefunc_Steroids"
bind "T" "gamefunc_SendMessage"
bind "Y" "gamefunc_Show_Opponents_Weapon"
bind "" "gamefunc_Mouse_Aiming"
bind "" "gamefunc_Toggle_Crosshair"
bind "Home" "gamefunc_Inventory_Left"
bind "End" "gamefunc_Inventory_Right"
bind "PgDn" "gamefunc_Inventory"
bind "J" "gamefunc_Crouch"
bind "H" "gamefunc_Strafe_Left"
bind "S" "gamefunc_Move_Backward"
bind "L" "gamefunc_Strafe_Right"
bind "F" "gamefunc_Map_Follow_Mode"
bind "" "gamefunc_Holo_Duke"
bind "" "gamefunc_Jetpack"
bind "" "gamefunc_See_Coop_View"
bind "SemiColon" "gamefunc_Previous_Weapon"
bind "O" "gamefunc_Next_Weapon"
bind "LShift" "gamefunc_Run"
bind "N" "gamefunc_NightVision"
bind "M" "gamefunc_MedKit"
bind "I" "gamefunc_Jump"
bind "RShift" "gamefunc_Run"
bind "LAlt" "gamefunc_Strafe"
bind "Space" "gamefunc_Jump"
bind "CapLck" "gamefunc_AutoRun"
bind "F6" "gamefunc_Quick_Save"
bind "F9" "gamefunc_Quick_Load"
bind "ScrLck" "gamefunc_Holster_Weapon"
bind "Kpad7" "gamefunc_Aim_Up"
bind "Up" "gamefunc_Move_Forward"
bind "Kpad9" "gamefunc_Look_Up"
bind "Kpad-" "gamefunc_Shrink_Screen"
bind "Left" "gamefunc_Turn_Left"
bind "Kpad5" "gamefunc_Center_View"
bind "Right" "gamefunc_Turn_Right"
bind "Kpad+" "gamefunc_Enlarge_Screen"
bind "Kpad1" "gamefunc_Aim_Down"
bind "Down" "gamefunc_Move_Backward"
bind "Kpad3" "gamefunc_Look_Down"
bind "Kpad0" "gamefunc_Look_Left"
bind "Kpad." "gamefunc_Look_Right"
bind "KpdEnt" "gamefunc_Inventory"
bind "K" "gamefunc_Fire"
bind "RAlt" "gamefunc_Strafe"
bind "Y" "gamefunc_Aim_Up"
bind "" "gamefunc_Look_Up"
bind "Left" "gamefunc_Turn_Left"
bind "Right" "gamefunc_Turn_Right"
bind "O" "gamefunc_Aim_Down"
bind "" "gamefunc_Look_Down"
bind "Insert" "gamefunc_Look_Left"
bind "Delete" "gamefunc_Look_Right"
osdeditpal "12"
osdtextpal "12"
osdtextshade "2"
r_texfilter "5"
r_useindexedcolortextures "0"
wchoice "3457860291"

#11

I tried this 3 times and keep getting errors during the build… Followed it several times… Made sure I had everything type right, not sure why it’s not working!

(


#12

Can you try the first line again and show us the output from that? It should have installed vpx as the last entry on that line.


#13

You could look if libvpx-dev is installed:

$ dpkg -l | grep libvpx-dev
ii  libvpx-dev:armhf                     1.6.1-3+deb9u1                    armhf        VP8 and VP9 video codec (development files)

If you do not see the output you should install it:

$ sudo apt install libvpx-dev

and retry building.

Step 1 of the tutorial has a scrollbar. Move it to the right. :slight_smile:


#14

I seen the scroll bar… Now I got the loader in the top menu but it won’t load the game… Just goes right back to the game Shell’s main menu!


#15

First check the output of eduke32 if you run from console.
You should get Initialization failed! (No available video device):

$ cd ~/games/Duke3D/
$ ls -al
total 44828
drwxr-xr-x 2 cpi cpi     4096 Sep 23 12:30 .
drwxr-xr-x 8 cpi cpi     4096 Sep 23 12:25 ..
-rwxr-xr-x 1 cpi cpi 44356548 Sep 23 12:30 DUKE3D.GRP
-rwxr-xr-x 1 cpi cpi  1529808 Sep 23 12:25 eduke32
-rw-r--r-- 1 cpi cpi      550 Sep 23 12:26 eduke32.log
$ ./eduke32 

The output of ./eduke32 should be:

EDuke32 r(?)
Built Sep 23 2018 12:06:05, GCC 6.3.0, 32-bit 
Using /home/cpi/games/Duke3D/ for game data
Using /home/cpi/.config/eduke32/ for game data
Initializing SDL 2.0.5
Initialization failed! (No available video device)
Non-interactive mode enabled
Searching for game data...
 Checksumming DUKE3D.GRP... Done
Using "DUKE3D.GRP" as main game data file.
Compiling: GAME.CON (151190 bytes)
Including: DEFS.CON (35992 bytes)
Including: USER.CON (45482 bytes)
GAME.CON: In actor `ORGANTIC':
GAME.CON:3967: warning: found `else' with no `if'.
GAME.CON: In state `pigshootenemystate':
GAME.CON:5890: warning: found `else' with no `if'.
Found 2 warning(s), 0 error(s).
Script compiled in 57ms, 65684 bytes
Initialized 96.0M cache
Initializing OSD...
0 joystick(s) found

If you get the output from above, also check your script:

$ cd ~/apps/launcher/Menu/GameShell/
$ cat 'Duke Nukem 3D.sh' 

The output of cat should be:

cd ~/games/Duke3D
./eduke32