Showing posts with label Quake2. Show all posts
Showing posts with label Quake2. Show all posts

Tuesday, March 3, 2020

Quake II - Jolt Country Jailbreak

I've played a lot of Quake II in my life with many mods. However, I don't recall playing one called "Jailbreak" longer than about 5-10 minutes back in the early 2000's. It seemed sort of like a football mod I had played once. Mods like this are cool concepts, but they usually only worked if you had enough friends to play it who had interest in both Quake 2 and a sport or whatever, a setup to play the game (not really an issue these days), and patience to put up with old ways of getting your game client properly configured. All of that is assuming the server admin has things configured properly on his end.

My friend Robb requested I load up his favorite mod on my Linux Quake 2 server. That mod was Jailbreak. Unfortunately, the developers of that mod only released a Windows library file for their mod. A Linux server requires a mod library to be a .so file rather than a .dll file. In order to make this happen on an EC2 instance in Amazon Web Services, I had to launch a Windows 2009 base server instance. Getting the initial server going was easy. After downloading all of the Quake2 base files and quake2/jail files to the Windows server, I then opened port 27910 (default Quake2 port) in the Windows Firewall with a new rule. Also, I of course had to have the associated AWS security group allow all public traffic on port 29710

I needed a modern server binary to handle traffic, and that's where Yamagi helps. I downloaded the binary to that as well to the Windows server and copied it to the Quake2 directory. During our test of this server I found I had accidentally set my Windows shortcut to the server binary to the original one. This results in people randomly getting disconnected despite the server staying online, so I strongly recommend using a modern server binary rather than the original if you want to run your own server.

This is an example of how "target" should look on the shortcut tab in the properties of your Windows shortcut assuming you are using Yamagi binary:

C:\QUAKE2\yquake2.exe +set dedicated 1 +set game jail +map jb25map1 +set maxclients 16 +exec server.cfg

I wanted map voting and to report to a living "Master Server" (A public hub for finding servers), so I added the follwing to quake2/jail/server.cfg:

//MapVote
set allow_vote 1

//VoteTime
set sv_votetime 15


// Master Server
setmaster master.q2servers.com


I will be keeping the server up for a couple more weeks to make sure all is running smoothly, then the plan is to transfer ownership over to Robb.

At this point this is the only other jailbreak mod server running with exception to the TastySpleen server which requires an anti-cheat be present in your cleint. We do not use this requirement as server population is usually low on most Quake 2 servers and in my opinion you can always just kick/ban cheaters if you are paying attention to your own server (No offense to TastySpleen. They run many, many Q2 servers).



Anyone is welcome to join! The server address is jail.jizaboz.com:27910 and will remain so unless Robb wants to use his own domain.

Here's how to get started if you need help..

- Download a modern Q2 client if you aren't already using one. A very good one is Q2Pro

- Download the Jailbreak mod
After extraction, you should end up with a quake2/jail folder with a pak.0 inside of it and other stuff.

- Start Q2Pro or whatever client you are using. Hit the ~ (tilde) key and type "connect jail.jizaboz.com" (You can also find it in the MP server list)

Note: If for some reason you connect and do not see red or blue skinned character models (this is a team game after all!) then you do not have the jail mod files in the right place. To dummy-proof this and just download those files from the server if you must; hit ESC to open the main menu, choose
Options / Download Options / and enable Download player models and skins

Thursday, July 24, 2014

Quake II - Amazon Linux Server: Q2R1 init.d Script

About a month ago, I was asked about the current status of my Quake 2 server. Having not checked on it in some time, I check the status and find that it is down.

I start the server again using the command mentioned in this older post, closed the terminal, and thought all was well. The next day I go to check on it again, and it's down. Every time I closed the terminal window, the server stopped. This was not a problem before, and the only thing I can figure is that some recent Amazon Linux security update is now preventing my old command from running in the background. Time to write a proper init.d script.


 I actually had an one laying around I had tried making months back, but couldn't get to work. It only needed a couple of typo fixes. After adding the script to init.d and firing the command quake2-server start, the server continues to run after closing the window and is still running as of this post. Here is a working init.d script for running R1ch's Enhanced Quake 2 server on Amazon Linux as a service:

#!/bin/sh
#
# quake2-server:       Starts the Q2R1 dedicated Quake2 Server
#
# Version:      @(#) /etc/init.d/quake2-server 1
#
# chkconfig: 2345 20 10
# description: Starts and stops the Quake2 Server at boot time and shutdown.
#
# processname: quake2-server


# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
        printf "Starting Quake2 Server: "
        cd /home/ec2-user/quake2/ && ./r1q2ded +set rcon_password '<PutYourPassFromServerCfgHere>' +set game lit                 hium +exec server.cfg > /dev/null >&1&
        echo
        ;;
  stop)
        printf "Shutting down Quake2 Server: "
        killproc r1q2ded
        rm -f /var/lock/subsys/quake2-server
        echo
        ;;
  status)
        status quake2-server
        ;;
  *)
        printf "*** Usage: quake2-server {start|stop|status}\n"
        exit 1
esac

exit 0


I hope someone else finds a use for this. If you are and would like some assistance or have any suggestions, please leave a comment.

Friday, December 20, 2013

Retrolab Quake II Server

The first Linux Quake II server I ran was around 13 years ago, on a Pentium 166 with 100MB of RAM and a 4GB hard disk running Mandrake Linux 6.5. The server could support roughly 4 people, as well play the Quake 2 client itself in software-render mode with the server churning away in a terminal window. It felt really solid for such a fun first-person shooter at the time. I recall a segmentation fault error once or twice, but for the most part the server ran flawlessly. A couple of friends and I had a lot of fun with it for a while; forming a "clan" and creating a few maps and mods for Quake II, Doom II, and Quake 1.

Recently, I've been working with Amazon Web Services and thought it would be fun to launch a dedicated Quake II server in Amazon Linux. I've written a general guide below on the experience.

Everyone is welcome to come play at retrolab.servebeer.com:27910 and try to get a high score. The only thing required to play is a copy of Quake 2. The server is currently running a insta-gib railz mode using the Lithium mod. I'm also working on getting configuration files ready for deathmatch and possibly mods other than Lithium to toggle between every few days.




It wasn't exactly as easy as I assumed it would be going into it. While the more modern r1q2ded binaries make things a bit simpler, and the now near-ancient Linux libraries on ftp.idsoftware.com still function, the problem is getting the server to run as a "service" or "daemon". I've yet to get around to finishing a proper init.d script to be used for this (UPDATE: I have now. See newer post for script), but through some trial and error I did manage to figure out a command to run the server and keep it running after closing the terminal window.

 cd /home/ec2-user/quake2/ && ./r1q2ded +set rcon_password 'password' +set game lithium +exec server.cfg > /dev/null >&1&
I can then use the following to ensure the server is running and check the process id so I can kill and restart the server when needed.

 sudo netstat -tulpn | grep :27910

A couple of other pointers for anyone else wanting to run a Quake 2 server in Amazon Linux are:

1. You should make sure the Quake 2 port (27910 by default) is open in your security group for both TCP and UDP protocols

2. Grab the original unix game binaries from ftp://ftp.idsoftware.com/idstuff/quake2/unix/quake2-3.20-glibc-i386-unknown-linux2.0.tar.gz and extract into your Quake2 folder.

3. sudo yum install glibc.i686. Also, run sudo yum whatprovides libz.so.1 and sudo yum whatprovides libgcc_s.so.1 to learn of what packages you need to install to get those in, and sudo yum install those.

4. Use the newest r1q2ded binary from http://old.r1ch.net/stuff/r1q2/

5. (Ignore if you are not planning on running mods) Also grab any available newest binary for any mod you may plan to run. In my case, I wanted to run the Lithium mod to customize my game, and the old binary I used to use no longer worked properly. When connecting, I would see a kaleidoscope effect in my client window or spawn outside the map until I found the newest Lithium II version and added it to the server.

If anyone reading this is trying to set up a Quake 2 server in Amazon Linux and having a problem, please leave a comment.

Note: This my first non-Interactive Fiction related post here. If you are following the Planet-If feeds, you should not be seeing this via that feed. All IF-related posts are labelled as such.

See my more recent post that contains the init.d script for this here!