====== Information ======
* RT4 Client ((https://gitlab.com/2009scape/rt4-client))
* These notes provide a game client for 2009Scape
===== Prerequisites =====
* [[linux;distros;opensuse_tumbleweed_gnome|openSUSE Tumbleweed (GNOME)]]
===== Notes =====
* :!: This is for private server use
* See [[servers:linux:games:2009scape_localhost|2009Scape localhost Server]] to set-up a server
====== Dependencies ======
* https://gitlab.com/2009scape/rt4-client#instructions
sudo zypper install git-core java-17-openjdk-headless java-24-openjdk
===== Java Priority =====
* ''jre-24-openjdk''
sudo update-alternatives --config 'java'
====== Download Source ======
* https://gitlab.com/2009scape/rt4-client/-/commits/master?ref_type=heads
cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/RT4-Client/src' && git clone --branch 'master' --depth '1' --recurse-submodules 'https://gitlab.com/2009scape/rt4-client.git' ~/'Projects/RT4-Client/src' && sync
====== Build ======
===== Settings =====
sed -i 's/USE_TWEENING = true/USE_TWEENING = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java' && sed -i 's/BILINEAR_MINIMAP = true/BILINEAR_MINIMAP = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java' && sed -i 's/USE_SHIFT_CLICK = true/USE_SHIFT_CLICK = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java' && sed -i 's/MOUSEWHEEL_ZOOM = true/MOUSEWHEEL_ZOOM = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java'
cat ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java' | grep 'public static boolean'
===== Build =====
****
cd ~/'Projects/RT4-Client/src' && JAVA_HOME='/usr/lib64/jvm/java-17-openjdk-17' ~/'Projects/RT4-Client/src/gradlew' 'clean' --no-daemon && JAVA_HOME='/usr/lib64/jvm/java-17-openjdk-17' ~/'Projects/RT4-Client/src/gradlew' 'jar' --no-daemon
====== Settings ======
===== localhost =====
* [[servers:linux:games:2009scape_localhost|2009Scape localhost Server]]
mkdir -p ~/'Projects/RT4-Client/conf' && nano ~/'Projects/RT4-Client/conf/localhost.json'
{
"ip_management": "localhost",
"ip_address": "localhost",
"world": 1,
"server_port": 43594,
"wl_port": 43595,
"js5_port": 43595,
"mouseWheelZoom": false,
"pluginsFolder": "null"
}
====== Scripts ======
===== Client Update =====
mkdir -p ~/'Projects/RT4-Client/scripts' && nano ~/'Projects/RT4-Client/scripts/client-update.sh' && chmod +x ~/'Projects/RT4-Client/scripts/client-update.sh'
#!/bin/bash
git -C ~/'Projects/RT4-Client/src' reset --hard
git -C ~/'Projects/RT4-Client/src' pull origin 'master' --rebase
sed -i 's/USE_TWEENING = true/USE_TWEENING = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java'
sed -i 's/BILINEAR_MINIMAP = true/BILINEAR_MINIMAP = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java'
sed -i 's/USE_SHIFT_CLICK = true/USE_SHIFT_CLICK = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java'
sed -i 's/MOUSEWHEEL_ZOOM = true/MOUSEWHEEL_ZOOM = false/g' ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java'
cd ~/'Projects/RT4-Client/src'
export JAVA_HOME='/usr/lib64/jvm/java-17-openjdk-17'
~/'Projects/RT4-Client/src/gradlew' 'clean' --no-daemon
~/'Projects/RT4-Client/src/gradlew' 'jar' --no-daemon
unset 'JAVA_HOME'
zenity --title '2009Scape Updater' --text 'RT4 Client update complete' --icon ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' --timeout '1' --info
# End
~/'Projects/RT4-Client/scripts/client-update.sh'
====== Desktop Launcher ======
===== 2009Scape (localhost) =====
mkdir -p ~/'.local/share/applications' ~/'Projects/RT4-Client/cache' && nano ~/'.local/share/applications/2009Scape-localhost.desktop' && sed -i 's/'CHANGEME'/'$USER'/g' ~/'.local/share/applications/2009Scape-localhost.desktop' && update-desktop-database --quiet ~/'.local/share/applications'
[Desktop Entry]
Name=2009Scape
Categories=Game;
Exec='/bin/bash' -c "cd ~/'Projects/RT4-Client/src/client' && mesa_glthread='false' vblank_mode='3' '/usr/lib64/jvm/java-24-openjdk-24/bin/java' -Dsun.java2d.uiScale='1' --add-exports='java.desktop/sun.awt=ALL-UNNAMED' --enable-native-access='ALL-UNNAMED' -DclientFps='120' -DclientHomeOverride=$HOME'/Projects/RT4-Client/cache/' -Djava.io.tmpdir=$HOME'/Projects/RT4-Client/cache/' -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'"
Type=Application
StartupNotify=false
StartupWMClass=rt4-client
Icon=/home/CHANGEME/Projects/RT4-Client/src/client/src/main/resources/saradomin.png
Actions=HiDPI;Server;Saves;Server-Update;Client-Update;Client-Notes;Server-Notes;
[Desktop Action HiDPI]
Exec='/bin/bash' -c "cd ~/'Projects/RT4-Client/src/client' && mesa_glthread='false' vblank_mode='3' '/usr/lib64/jvm/java-24-openjdk-24/bin/java' -Dsun.java2d.uiScale='2' --add-exports='java.desktop/sun.awt=ALL-UNNAMED' --enable-native-access='ALL-UNNAMED' -DclientFps='120' -DclientHomeOverride=$HOME'/Projects/RT4-Client/cache/' -Djava.io.tmpdir=$HOME'/Projects/RT4-Client/cache/' -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'"
Name=Client (HiDPI)
[Desktop Action Server]
Exec='/bin/bash' -c "kgx -T '2009Scape Server' -e ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh'"
Name=Server - Start
[Desktop Action Saves]
Exec='/bin/bash' -c "~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh'"
Name=Save Data Back-up
[Desktop Action Server-Update]
Exec='/bin/bash' -c "kgx -T '2009Scape Server Updater' -e ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh'"
Name=Update Server
[Desktop Action Client-Update]
Exec='/bin/bash' -c "kgx -T '2009Scape RT4 Client Updater' -e ~/'Projects/RT4-Client/scripts/client-update.sh'"
Name=Update Client
[Desktop Action Client-Notes]
StartupNotify=false
Exec='/bin/bash' -c "gio open 'https://wiki.realmofespionage.xyz/games:linux:rt4_client_runescape_530'"
Name=Client - Install Notes
[Desktop Action Server-Notes]
StartupNotify=false
Exec='/bin/bash' -c "gio open 'https://wiki.realmofespionage.xyz/servers:linux:games:2009scape_localhost'"
Name=Server - Install Notes
# End
====== Quick Commands ======
===== Benchmark =====
* ''GALLIUM_HUD'' 8 CPU
* ''vblank_mode=0''
* ''-DclientFps=999''
mkdir -p ~/'Projects/RT4-Client/cache' && cd ~/'Projects/RT4-Client/src/client' && GALLIUM_HUD='cpu0+cpu1+cpu2+cpu3;cpu4+cpu5+cpu6+cpu7;fps' mesa_glthread='false' vblank_mode='0' '/usr/lib64/jvm/java-24-openjdk-24/bin/java' -Dsun.java2d.uiScale='1' --add-exports='java.desktop/sun.awt=ALL-UNNAMED' --enable-native-access='ALL-UNNAMED' -DclientFps='999' -DclientHomeOverride=$HOME'/Projects/RT4-Client/cache/' -Djava.io.tmpdir=$HOME'/Projects/RT4-Client/cache/' -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'