User Tools

Site Tools


games:linux:rt4_client_runescape_530

Information

  • RT4 Client 1)
  • master Branch 2)
  • These notes provide a game client for 2009Scape on Linux (also see FreeBSD and Windows)

Prerequisites

Notes

Dependencies

sudo dnf install git-core java-17-openjdk-headless java-openjdk

Download Source

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

cd ~/'Projects/RT4-Client/src' && JAVA_HOME='/usr/lib/jvm/jre-17-openjdk' ~/'Projects/RT4-Client/src/gradlew' 'clean' && JAVA_HOME='/usr/lib/jvm/jre-17-openjdk' ~/'Projects/RT4-Client/src/gradlew' 'jar' && ~/'Projects/RT4-Client/src/gradlew' --stop

Settings

localhost

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

cd ~/'Projects/RT4-Client/src'
JAVA_HOME='/usr/lib/jvm/jre-17-openjdk' ~/'Projects/RT4-Client/src/gradlew' 'clean'
JAVA_HOME='/usr/lib/jvm/jre-17-openjdk' ~/'Projects/RT4-Client/src/gradlew' 'jar'
~/'Projects/RT4-Client/src/gradlew' --stop

echo ''
read -n '1' -s -r -p 'Done! Press any key to exit.'

# End
~/'Projects/RT4-Client/scripts/client-update.sh'

Desktop Launcher

2009Scape (localhost)

mkdir -p ~/'.local/share/applications/' && 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' && JAVA_TOOL_OPTIONS='-XX:+UseSerialGC -Xms1G -Xmx4G --add-exports=java.desktop/sun.awt=ALL-UNNAMED' java -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'"
Type=Application
StartupNotify=false
Icon=/home/CHANGEME/Projects/RT4-Client/src/client/src/main/resources/saradomin.png
Actions=HiDPI;Client-Update;Server-Update;Server;Saves;Client-Notes;Server-Notes;

[Desktop Action HiDPI]
Exec='/bin/bash' -c "cd ~/'Projects/RT4-Client/src/client' && GDK_SCALE='2' JAVA_TOOL_OPTIONS='-Xms1G -Xmx4G --add-exports=java.desktop/sun.awt=ALL-UNNAMED' java -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'"
Name=Launch Client (High DPI)

[Desktop Action Client-Update]
Exec='/bin/bash' -c "ptyxis --standalone --title='RT4 Client Updater — ' -- ~/'Projects/RT4-Client/scripts/client-update.sh'"
Name=Update Client

[Desktop Action Server-Update]
Exec='/bin/bash' -c "ptyxis --standalone --title='2009Scape localhost Updater — ' -- ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh'"
Name=Update Local Server

[Desktop Action Server]
Exec='/bin/bash' -c "ptyxis --standalone --title='2009Scape localhost Server — ' -- ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh'"
Name=Launch Local Server

[Desktop Action Saves]
Exec='/bin/bash' -c "~/'Projects/2009Scape-Server/scripts/localhost-save-backup.sh'"
Name=Save Data Back-up

[Desktop Action Client-Notes]
StartupNotify=false
Exec='/bin/bash' -c "gio open 'https://wiki.realmofespionage.xyz/games:linux:rt4_client_runescape_530'"
Name=Client Installation Notes

[Desktop Action Server-Notes]
StartupNotify=false
Exec='/bin/bash' -c "gio open 'https://wiki.realmofespionage.xyz/servers:linux:games:2009scape_localhost'"
Name=localhost Server Installation Notes

# End

Quick Commands

Execute

cd ~/'Projects/RT4-Client/src/client' && java -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'

Testing

GDK_BACKEND='x11' GDK_SCALE='2'
GALLIUM_HUD='cpu0+cpu1+cpu2+cpu3;API-thread-offloaded-slots+API-thread-direct-slots+API-thread-num-syncs;fps' mesa_glthread='true'
cd ~/'Projects/RT4-Client/src/client' && JAVA_TOOL_OPTIONS='-XX:+UseSerialGC -Xms1G -Xmx4G --add-exports=java.desktop/sun.awt=ALL-UNNAMED' java -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'

Update

git -C ~/'Projects/RT4-Client/src' reset --hard && git -C ~/'Projects/RT4-Client/src' pull origin 'master' --rebase && cd ~/'Projects/RT4-Client/src' && ~/'Projects/RT4-Client/src/gradlew' 'clean' && ~/'Projects/RT4-Client/src/gradlew' 'jar' && ~/'Projects/RT4-Client/src/gradlew' --stop && cd ~ && sync
~/'Projects/RT4-Client/scripts/client-update.sh'
ptyxis --standalone --title='RT4 Client Updater — ' -- ~/'Projects/RT4-Client/scripts/client-update.sh'

gradlew

  • Lists available gradlew commands
cd ~/'Projects/RT4-Client/src' && JAVA_HOME='/usr/lib/jvm/jre-17-openjdk' ~/'Projects/RT4-Client/src/gradlew' 'tasks' && ~/'Projects/RT4-Client/src/gradlew' --stop
cd ~/'Projects/RT4-Client/src' && JAVA_HOME='/usr/lib/jvm/jre-17-openjdk' ~/'Projects/RT4-Client/src/gradlew' 'tasks' --all && ~/'Projects/RT4-Client/src/gradlew' --stop

File Manager

Root

gio open ~/'Projects/RT4-Client/src'
3)
2024/11/02: F41 is OpenJDK 21 and default-installs non-GUI headless
4)
2024/11/02: 2009Scape's RT4-Client forces Gradle 7.4.2 which only supports up to Java 17; Pazaz's older RT4-Client builds fine on Java 23
/usr/local/www/wiki/data/pages/games/linux/rt4_client_runescape_530.txt · Last modified: by Sean Rhone