Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Any chance of Half-Life 2 being added? #226

Open
CraigsBar opened this issue Dec 10, 2024 · 20 comments
Open

Request: Any chance of Half-Life 2 being added? #226

CraigsBar opened this issue Dec 10, 2024 · 20 comments
Assignees
Labels
Request New features/script to be added

Comments

@CraigsBar
Copy link

This has been proven to work on Raspberry Pi 5 when running Ubuntu OS, Would it be possible to incorporate it here for easy installations on devices running Raspberry Pi OS.

@jmcerrejon
Copy link
Owner

jmcerrejon commented Dec 10, 2024

I tried with no success recently. Could you provide me any link with resources about it?

@actraiser30
Copy link

actraiser30 commented Dec 11, 2024

@CraigsBar
Copy link
Author

I got it to compile on Raspberry Pi OS. But the graphics and character set are screwed up.
Uploading 1733912154577472005588806201914.jpg…
Uploading 17339121837905707947718365227817.jpg…

@actraiser30
Copy link

Try this in config.txt

Change the dtoverlay=vc4-kms-v3d

To dtoverlay=vc4-fkms-v3d

And the opposite

@CraigsBar
Copy link
Author

Unfortunately that made no difference to the corrupted graphics/text.
IMG20241211101335
IMG20241211101331

@actraiser30
Copy link

actraiser30 commented Dec 11, 2024

Try that,if you compile it in 64 bit OS do it in 32bit OS or the opposite again.
Or if you did it in pi4 try bullseye or buster os

@jmcerrejon
Copy link
Owner

jmcerrejon commented Dec 11, 2024

I already tried it (you can check this open post at my Patreon).

My issue was I only got 10-15 fps and glitches in graphics, as you commented.

For sure, there is some library used on RPi OS that is working on Ubuntu.

@CraigsBar
Copy link
Author

Interestingly I created an ubuntu install on an SD card this morning and compiled it there (my Pi's both normally boot from NVMe SSD's) and I get the same issues. Tonight I will try to get it to compile on my OpenSuSE laptop (Lenovo Thinkpad T460 so nothing special) and see how that goes. I wonder if it is a wider issue with the source on github and recent Linux environments.

@actraiser30
Copy link

What about try it in wine from pi apps?

@CraigsBar
Copy link
Author

CraigsBar commented Dec 11, 2024 via email

@actraiser30
Copy link

What about testing counterstrike source?

@actraiser30
Copy link

actraiser30 commented Dec 11, 2024

Tested various games with wine on Pi4 even painkiller was playable if you lower the graphics
Nosferatu was very slow thought.
Age of mythology and age of empires 3 had the same issue with the font's displaying incorrect

@actraiser30
Copy link

What about this?

https://m.youtube.com/watch?v=xp-W1Axn8TM

@jmcerrejon
Copy link
Owner

I think it’d be great to focus on running native apps on PiKISS without relying on Wine or Proton for games. That way, we can keep things simple and straightforward! 😉

@actraiser30
Copy link

Native ports are better, yes,what about assault cube game can be build/work??

@CraigsBar
Copy link
Author

IMG20241211190551
So it's the same on OpenSuSE on intel x64 (core i5)

@Lohann
Copy link

Lohann commented Dec 19, 2024

Hi, I believe the Graphics issues is due an update in the Half-life from Steam, which is not supported by the current version of the source-engine:
nillerusr/source-engine#397

Must test using a version prior to November 16 2024 release.

@Lohann
Copy link

Lohann commented Dec 20, 2024

Is possible to download an older version from Steam from here:
https://steamdb.info/depot/221/manifests/

Using this tool:
https://github.com/SteamRE/DepotDownloader

@Lohann
Copy link

Lohann commented Dec 20, 2024

Finally, I manage to get half-life 2 working natively on my Rapsberry PI 5 with Ubuntu 24.04 64bit:

# Install dependencies
sudo apt-get install -y \
    unzip \
    wget \
    git-all \
    build-essential \
    pkg-config \
    ccache \
    libsdl2-dev \
    libfontconfig1-dev \
    libopenal-dev \
    libjpeg-dev \
    libpng-dev \
    libcurl4-gnutls-dev \
    libbz2-dev \
    libedit-dev


# Clone source-engine
cd ~/Downloads
git clone https://github.com/nillerusr/source-engine.git --recursive
cd source-engine

# Build Source-Engine, takes about ~22min to build on my RPi 5
python3 ./waf configure -T release --prefix=hl2 --build-games=hl2 --disable-warns
python3 ./waf build -p -v 
python3 ./waf install

# Download Half-Life 2, only the release from 17 November 2023 works:
# https://steamdb.info/patchnotes/12694556/
# Obs: Requires an steam account with the game.
cd ~/Downloads
wget https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_2.7.4/DepotDownloader-linux-arm64.zip
unzip DepotDownloader-linux-arm64.zip
./DepotDownloader -app 220 -depot 221 -manifest 3666218991449795038 -username <steam_username>

# Copy files to the Half Life 2 directory
rsync -ah --progress ./depots/221/16557524/hl2/* ~/Downloads/source-engine/hl2/hl2
cp -r ./depots/221/16557524/platform ~/Downloads/source-engine/hl2/

# start the game
cd ~/Downloads/source-engine/hl2
./hl2_launcher

It works on 60 fps at low settings, and 30 fps with all texture and sharder high, the antialiasing and filtering must be off.
Type cl_showfps 1 in the console to display the FPS

@jmcerrejon jmcerrejon self-assigned this Dec 20, 2024
@jmcerrejon jmcerrejon added the Request New features/script to be added label Dec 20, 2024
@jmcerrejon
Copy link
Owner

Thank you so much, @Lohann!

After encountering some issues with the commands I was using, your guide was incredibly helpful. I have successfully compiled the engine and obtained the correct game data files on Raspberry Pi OS 64-bit.

IMG_2221 2

Now, I need to put those commands into a user-friendly format for PiKISS users. I hope to accomplish this soon.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request New features/script to be added
Projects
None yet
Development

No branches or pull requests

4 participants