Note for New Installs:
The following prerequisites need to be installed(debian-based).
sudo apt install -y libsdl2-dev libfreetype6-dev libfontconfig1-dev libopenal-dev libjpeg-dev libpng-dev libcurl4-gnutls-dev libbz2-dev libedit-dev
Currently, due to the HL2 20th Anniversary update, you need a PC to obtain the Pre-20th anniversary update game files, my deepest apologies for the inconvenience.
now you need to get the source game's files(legally of course) using DepotDownloader.
then use it to get the portal(or what have you) files.
then obtain the source source code using this command
git clone https://github.com/nillerusr/source-engine.git --recursive --depth 1;cd source-engine
To compile Source engine and HL2 64bit
./waf configure -T release --prefix=out/;./waf build;./waf install
To compile only certian game's libs (doesn't required nuking directory)
./waf configure -T release --build-games=(GameNameHere) --prefix=out/;./waf build --target=client,server;./waf install
Valid Games are as follows
HL2(Default) = hl2
Half-Life 2: Deathmatch = hl2mp
Half-Life 2: Episode 1 = episodic
Half-Life 2: Episode 2 = ep2
Half-Life: Source = hl1
Day of Defeat: Source = dod
Team Fortress 2 Classic = tf2classic
Portal = portal
Counter-Strike:Source = cstrike
An example of a one line install for HL2, portal, and CS:S would be as follows
./waf configure -T release --prefix=out/;./waf build;./waf install;./waf configure -T release --build-games=portal --prefix=out/;./waf build --target=client,server;./waf install;./waf configure -T release --build-games=cstrike --prefix=out/;./waf build --target=client,server;./waf install
Create a folder in Documents and call it Source.
then copy the contents of your game(s) of choice(Minus the hl_linux,hl2_linux.deck-cache-primer,and hl2.sh files and steam_input folder)from Depotloader /Documents/Source
then copy the files of /source-engine/out to /Documents/Source.
then individually copy and replace the files in the individual folders in their respective folders.(if you can merge folders in your distro(aka not RpiOS) then do it as it will save you time)
Download a the game Icon of your choice or from here and save it to /Documents/Source/GameIcons
if you downloaded the zip from here, extract it into /Documents/Source/GameIcons
(Optional)Finally, create a Desktop shortcut by naming a file on the Desktop [Name].desktop and putting the following contents in it
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=[path-to-executable-with-flags]
Name=[game-name]
Comment=Play [game-name]
Icon=[path-to-image-file]
Now you're ready to play! just make sure to play at 640x480 and lowest graphics settings on pi4, on Pi5, you can max the settings except HDR and Anti-aliasing, both must be set to off.
RPi4 Overclock Settings(put on /boot/config.txt):
#OverclockSettings
over_voltage=6
arm_freq=2000
#DisplaySettings
hdmi_group=1
hdmi_mode=1
Useful Software
piKiss:
curl -sSL https://git.io/JfAPE | bash
Pi-Apps:
wget -qO- https://raw.githubusercontent.com/Botspot/pi-apps/master/install | bash