From 3fed8605fa847535a3e7530910797fc1bcc55b15 Mon Sep 17 00:00:00 2001 From: Wanjohi <71614375+wanjohiryan@users.noreply.github.com> Date: Thu, 30 May 2024 03:22:16 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(readme):=20Add=20manual=20s?= =?UTF-8?q?etup=20and=20game=20launch=20instructions=20(#69)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description **What issue are you solving (or what feature are you adding) and how are you doing it?** Update the README to show how to how to run Netris. --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index df29dccc..f8981a00 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,67 @@ Follow these steps to get Netris up and running on your system. > \[!IMPORTANT] > -> Waiting on this pull request [#43][netris-pr-input] to be merged first. Sorry for the inconvenience. \~ ⚠️ +> This is our pilot, there is a lot we haven't figured out yet. Please file an issue if anything comes up. \~ 🫂 + + +> \[!TIP] +> +> The setup process will become much simpler with the launch of our CLI tool, so stay tuned for that! In the meantime, you'll need to follow these manual steps. + +#### Step 1: Navigate to Your Game Directory + +First, change your directory to the location of your `.exe` file. For Steam games, this typically means: + +```bash +cd $HOME/.steam/steam/steamapps +ls -la . +``` + +#### Step 2: Generate a Session ID + +Create a unique session ID using the following command: + +```bash +head /dev/urandom | LC_ALL=C tr -dc 'a-zA-Z0-9' | head -c 16 +``` + +This command generates a random 16-character string. Be sure to note this string carefully, as you'll need it for the next step. + +#### Step 3: Launch the Netris Server + +With your SESSION_ID ready, insert it into the command below, replacing `` with your actual session ID. Then, run the command to start the Netris server: + +``` +docker run --gpus all --device=/dev/dri --name netris -it --entrypoint /bin/bash -e SESSION_ID= -v "$(pwd)":/game -p 8080:8080/udp --cap-add=SYS_NICE --cap-add=SYS_ADMIN ghcr.io/netrisdotme/netris/server:nightly +``` + +> \[!TIP] +> +> Ensure UDP port 8080 is accessible from the internet. Use `ufw allow 8080/udp` or adjust your cloud provider's security group settings accordingly. + +#### Step 4: Configure the Game within the Container + +After executing the previous command, you'll be in a new shell within the container (example: `netris@3f199ee68c01:~$`). Perform the following checks: + +1. Verify the game is mounted by executing `ls -la /game`. If not, exit and ensure you've correctly mounted the game directory as a volume. +2. Then, start the Netris server by running `/etc/startup.sh > /dev/null &`. + +#### Step 5: Running Your Game + +Wait for the `.X11-unix` directory to appear in `/tmp` (check with `ls -la /tmp`). Once it appears, you're ready to launch your game. + +- With Proton-GE: `netris-proton -pr .exe` +- With Wine: `netris-proton -wr .exe` + +#### Step 6: Begin Playing + +Finally, construct the play URL with your session ID: + +``` +echo "https://netris.me/play/$SESSION_ID" +``` + +Navigate to this URL in your browser, click on the page to capture your mouse pointer, and start playing! [github-release-link]: https://github.com/wanjohiryan/netris/releases @@ -146,5 +206,4 @@ Follow these steps to get Netris up and running on your system. [neko-url]: https://github.com/m1k1o/neko [image-star]: assets/star-us.png [moq-github-url]: https://quic.video -[vmaf-cuda-link]: https://developer.nvidia.com/blog/calculating-video-quality-using-nvidia-gpus-and-vmaf-cuda/ -[netris-pr-input]: https://github.com/netrisdotme/netris/pull/43 \ No newline at end of file +[vmaf-cuda-link]: https://developer.nvidia.com/blog/calculating-video-quality-using-nvidia-gpus-and-vmaf-cuda/ \ No newline at end of file