Difference between revisions of "How to setup a local QuakeJS server under Windows 10"
(Created page with "'''TLDR:''' This ''How To'' will show you how to setup a local QuakeJS server, local Play page (for users to connect to the local server), and a local content server (to provi...") |
|||
| Line 44: | Line 44: | ||
#*Make sure you get the correct 32-bit or 64-bit version for your OS | #*Make sure you get the correct 32-bit or 64-bit version for your OS | ||
#copy ''jq.exe'' & ''wget.exe'' from your Downloads folder to ''C:\Program Files\Git\mingw64\bin\'' | #copy ''jq.exe'' & ''wget.exe'' from your Downloads folder to ''C:\Program Files\Git\mingw64\bin\'' | ||
| + | |||
| + | ==Setup QuakeJS Server== | ||
| + | #Hit '''Windows Key + R''' and type "cmd" to launch the Command Prompt. | ||
| + | #Run the following command to ensure we're in our Home Directory<pre>%HOMEPATH%</pre> | ||
| + | #Run the following command to clone my updated quakejs repo to your Home Directory<pre>git clone --recurse-submodules https://github.com/begleysm/quakejs.git</pre> | ||
| + | #Run the following command to switch into the, newly created, ''quakejs'' directory<pre>cd quakejs</pre> | ||
| + | #Run the following command to install the necessary Node.js modules<pre>npm install</pre> | ||
| + | #To download BASE3Q files, run the server for the 1st time by executing the following command. Hold down '''enter''' to get through the EULA, agree to the EULA by hitting '''y''' and game files will be downloaded. Once all files have been downloaded (you'll see the line '''ignoring setsockopt command''') quit the server by hitting '''Ctrl+C'''<pre>node build/ioq3ded.js +set fs_game baseq3 +set dedicated 1</pre> | ||
| + | #Optionally run the following command to download additional CPMA files. Again hit '''Ctrl+C''' to quit the server once all files have been downloaded (you'll see the line '''ignoring setsockopt command''') <pre>node build/ioq3ded.js +set fs_game cpma +set dedicated 1</pre> | ||
| + | #Edit the baseq3 server config file (''C:\Users\USERNAME\quakejs\base\baseq3\server.cfg''). Pay special attention to '''seta sv_hostname''', '''seta g_motd''', and especially '''seta rconpassword''' | ||
| + | #Optionally edit the cpma server config file (''C:\Users\USERNAME\quakejs\base\cpma\server.cfg''). Pay special attention to '''seta sv_hostname''', '''seta g_motd''', and especially '''seta rconpassword''' | ||
| + | #You can test (or run) your server with the following command, but there isn't much point until we setup the Content Server and Play Page. <pre>node build/ioq3ded.js +set fs_game baseq3 set dedicated 1 +exec server.cfg</pre> | ||
| + | |||
| + | ==Setup the Web Server== | ||
Revision as of 12:01, 9 September 2019
TLDR: This How To will show you how to setup a local QuakeJS server, local Play page (for users to connect to the local server), and a local content server (to provide files to the clients) under Windows 10. It is based off of my original guide using Debian.
I found myself in a situation where I was going to be on a LAN without internet access for an extended period of time along with multiple people and multiple computers. I wanted a fun, fast paced, multiplayer game for us. The catch? I didn't want anyone to have to install anything since these computers didn't belong to us. That's a pretty tall order. What I found was QuakeJS. Quake 3 was open sourced at the beginning of 2012 and some awesome dudes based ioquake3 off of it. Another awesome dude created QuakeJS around 2013/2014. QuakeJS allows you to play Quake 3 entirely in a browser.
The source code has instructions for creating a dedicated server as well as building from source & generating assets for a content server (under Linux). Unfortunately the Emscripten tool used to build the project has changed the way it operates in since 2014 and the current version of the QuakeJS source doesn't build with modern versions of Emscripten. Luckily Inolen provided the precompile .js files for those of us just wanting to run a server. Between those .js files, the QuakeJS README, some helpful discussion on how to setup a local webpage to connect to the server (as well as providing the content necessary to play) and a bit of tinkering, I've been successful in creating a server environment that I'm happy with.
NOTE: This guide assumes your local server's hostname is "quakejs"
Install Node.js & NPM
- Visit https://nodejs.org and download the latest .msi installer for Node.js (v12.10.0 at the time of this writing)
- Run the .msi to install Node.js & NPM
- Click Next to start the install
- Click Accept & Next to accept the license
- Click Next to accept the default installation folder
- Click Next to accept the default options
- quakejs doesn't require any of the "extra tools" but you can install them if you want by checking the box on this screen. Click Next
- Accept the Windows pop-up and wait for the install to complete
- Click Finish
- You can test this installation by opening a Command Prompt and running
node -v
Install Git
- Visit https://git-scm.com/download/win to automatically start the download of the latest Windows version of the Git client (v2.23.0 at the time of this writing)
- Run the downloaded .exe file to launch the installer
- Click Yes to start install
- Click Next to accept the license agreement
- Click Next to accept the default install location
- Click Next to accept the default options
- Click Next to allow the installer to create Start Menu links
- Select your preferred text editor (I like Notepad++ on Windows)
- Click Next to accept the default PATH option
- Click Next to use OpenSSL
- Click Next to use the default line ending option
- Click Next to use MinTTY
- Click Next to accept the default extra options
- Click Next to skip the experimental features and wait for the install to complete
- Click Finish
- You can test this installation by opening a Command Prompt and running
git --version</pr>
- Run the following command to clone my updated quakejs repo to your Home Directory
git clone --recurse-submodules https://github.com/begleysm/quakejs.git
- Run the following command to switch into the, newly created, quakejs directory
cd quakejs
- Run the following command to install the necessary Node.js modules
npm install
- To download BASE3Q files, run the server for the 1st time by executing the following command. Hold down enter to get through the EULA, agree to the EULA by hitting y and game files will be downloaded. Once all files have been downloaded (you'll see the line ignoring setsockopt command) quit the server by hitting Ctrl+C
node build/ioq3ded.js +set fs_game baseq3 +set dedicated 1
- Optionally run the following command to download additional CPMA files. Again hit Ctrl+C to quit the server once all files have been downloaded (you'll see the line ignoring setsockopt command)
node build/ioq3ded.js +set fs_game cpma +set dedicated 1
- Edit the baseq3 server config file (C:\Users\USERNAME\quakejs\base\baseq3\server.cfg). Pay special attention to seta sv_hostname, seta g_motd, and especially seta rconpassword
- Optionally edit the cpma server config file (C:\Users\USERNAME\quakejs\base\cpma\server.cfg). Pay special attention to seta sv_hostname, seta g_motd, and especially seta rconpassword
- You can test (or run) your server with the following command, but there isn't much point until we setup the Content Server and Play Page.
node build/ioq3ded.js +set fs_game baseq3 set dedicated 1 +exec server.cfg