====== Information ====== * RT4 Client ((https://gitlab.com/2009scape/rt4-client)) * ''master'' Branch ((https://gitlab.com/2009scape/rt4-client/-/tree/master?ref_type=heads)) * These notes provide a game client for 2009Scape on FreeBSD (also see [[games:windows:rt4_client_runescape_530|Windows]] and [[games:linux:rt4_client_runescape_530|Linux]]) ===== Prerequisites ===== * [[bsd;freebsd_14.2_xfce|FreeBSD 14.2 (Xfce)]] ===== Notes ===== * :!: This is for private server use * See [[servers:bsd:games:2009scape_localhost|2009Scape localhost Server]] to set-up a server ====== Dependencies ====== * https://gitlab.com/2009scape/rt4-client#instructions su - pkg install git jogamp-jogl openjdk8 ====== 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 ====== ===== Client Settings ===== * :!: TODO: Update script will overwrite these changes * TODO: ''sed'' ==== GlobalConfig.java ==== * Disabling tweening fixes certain animations ([[https://forum.2009scape.org/viewtopic.php?p=4905-tweening-disable-animation-smoothing#p4905|post]]) * ''USE_TWEENING'' from ''true'' to ''false'' ee ~/'Projects/RT4-Client/src/client/src/main/java/rt4/GlobalConfig.java' public static boolean USE_TWEENING = false; ==== GameShell.java ==== * Allows use of ''vblank_mode'' ([[https://forum.2009scape.org/viewtopic.php?p=3174-high-cpu-usage#p3174|post]]) * ''GameShell.setFpsTarget'' from ''targetFps'' to ''999'' 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 ===== * [[servers:bsd:games:2009scape_localhost|2009Scape localhost Server]] 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 ===== * https://gitlab.com/2009scape/rt4-client/-/commits/master?ref_type=heads * [[#scape_localhost|Desktop Action 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 ===== * https://gitlab.com/2009scape/rt4-client/-/commits/master?ref_type=heads 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 ===== * ''tasks'' lists available ''gradlew'' commands * ''tasks --all'' shows more options 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'