Table of Contents

Information

Prerequisites

Notes

Dependencies

su -
pkg install git jogamp-jogl openjdk8

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

Client Settings

GlobalConfig.java

ee ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java'
        public static boolean USE_TWEENING = false;

GameShell.java

ee ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GameShell.java'
            GameShell.setFpsTarget(999);

Build

cd ~/'Projects/RT4-Client/src' && JAVA_HOME='/usr/local/openjdk8' ~/'Projects/RT4-Client/src/gradlew' 'clean' --no-daemon && JAVA_HOME='/usr/local/openjdk8' ~/'Projects/RT4-Client/src/gradlew' 'jar' --no-daemon

Gluegen Fix

ln -s '/usr/local/lib/libgluegen2-rt.so' ~/'Projects/RT4-Client/src/client/libgluegen_rt.so'

Settings

localhost

mkdir -p ~/'Projects/RT4-Client/conf' && ee ~/'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' && ee ~/'Projects/RT4-Client/scripts/client-update.sh' && chmod +x ~/'Projects/RT4-Client/scripts/client-update.sh'
#!/bin/sh

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/local/openjdk8' ~/'Projects/RT4-Client/src/gradlew' 'clean' --no-daemon
JAVA_HOME='/usr/local/openjdk8' ~/'Projects/RT4-Client/src/gradlew' 'jar' --no-daemon

notify-send -i ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' '2009Scape RT4 Client update complete'

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

Desktop Launcher

2009Scape (localhost)

mkdir -p ~/'.local/share/applications' && ee ~/'.local/share/applications/2009Scape-localhost.desktop' && sed -i -e '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/sh' -c "cd ~/'Projects/RT4-Client/src/client' && mesa_glthread='false' vblank_mode='3' JAVA_HOME='/usr/local/openjdk8' java -XX:+UseSerialGC -Xms1G -Xmx4G -Djogamp.gluegen.UseTempJarCache='false' -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=Server;Saves;Server-Update;Client-Update;Server-Notes;Client-Notes;

[Desktop Action Server]
Exec='/bin/sh' -c "xfce4-terminal -T '2009Scape — Server' -I ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' -e ~/'Projects/2009Scape-Server/scripts/localhost-server-start.sh'"
Name=Server Start

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

[Desktop Action Server-Update]
Exec='/bin/sh' -c "xfce4-terminal -T '2009Scape Updater' -I ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' -e ~/'Projects/2009Scape-Server/scripts/localhost-server-update.sh'"
Name=Server - Update

[Desktop Action Client-Update]
Exec='/bin/sh' -c "xfce4-terminal -T 'RT4 Client Updater' -I ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' -e ~/'Projects/RT4-Client/scripts/client-update.sh'"
Name=Client - Update

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

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

# End

Quick Commands

Execute

cd ~/'Projects/RT4-Client/src/client' && mesa_glthread='false' vblank_mode='3' JAVA_HOME='/usr/local/openjdk8' java -XX:+UseSerialGC -Xms1G -Xmx4G -Djogamp.gluegen.UseTempJarCache='false' -jar ~/'Projects/RT4-Client/src/client/build/libs/client-'*'.jar' --config ~/'Projects/RT4-Client/conf/localhost.json'

Testing

GALLIUM_HUD='cpu0+cpu1+cpu2+cpu3;cpu4+cpu5+cpu6+cpu7;API-thread-offloaded-slots+API-thread-direct-slots+API-thread-num-syncs;fps' MESA_NO_ERROR='1' mesa_glthread='true' vblank_mode='0'

Update

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/local/openjdk8' ~/'Projects/RT4-Client/src/gradlew' 'clean' --no-daemon && JAVA_HOME='/usr/local/openjdk8' ~/'Projects/RT4-Client/src/gradlew' 'jar' --no-daemon && cd ~ && sync
~/'Projects/RT4-Client/scripts/client-update.sh'
xfce4-terminal -T 'RT4 Client — Updater' -I ~/'Projects/RT4-Client/src/client/src/main/resources/saradomin.png' -e ~/'Projects/RT4-Client/scripts/client-update.sh'

gradlew

cd ~/'Projects/RT4-Client/src' && JAVA_HOME='/usr/local/openjdk8' ~/'Projects/RT4-Client/src/gradlew' 'tasks' --no-daemon
~/'Projects/RT4-Client/src/gradlew' --stop

File Manager

Root

gio open ~/'Projects/RT4-Client/src'