Zombie Grinder is the debut game of TwinDrills, an indie game development duo made up of Tim 'Infini' Leonard and Jordan 'Jordizzle' Chewning. It's a multi-platform (windows, mac, Linux!) (also Free!) cooperative multiplayer arcade game, reminiscent in style and gameplay of retro games like 'Zombies Ate My Neighbors' and 'Super Smash TV!', but with the added benefit of some newer game mechanics - achievements, ranking, player-customization, rpg style stats and so forth. The game sports a variety of different game modes, from co-operative 'campaign' style levels, to wave maps and even the classic 'pvp' style game modes - deathmatch, capture the 'bag' and so forth. All of these mods are bristling with a variety of weapons and items, all lovingly displayed in Jordan's classic quirky pixel-art style.

Forum Thread
  Posts  
Dedicated Server Setup (Games : Zombie Grinder : Forum : General Discussion : Dedicated Server Setup) Post Reply
Thread Options
Infinitus
Infinitus Developer
Jun 23 2012 Anchor

Had someone ask about setting up dedicated servers in game, so here's a quick guide to setting up a dedicated server on a linux headless box (totally assuming you know how to use linux here! Seeing as you have a linux box). Be aware as well that dedicated servers are no auto-updating, you will need to update the files on each version!

We use Linode 512's for the official dedicated servers, we can usually host 2 game servers per VPS (averaging at about 120mb per game server, and 20% CPU usage (spiking up to anywhere from 60-80% when heavily active)).

To create a dedicated server just upload the latest linux build to your server and run the game with the following command line;

./ZombieGrinder -server 1 -closeonnoclients 0 -servername "[US] Official #1" -listenip "50.116.7.244" -port 57897

Obviously replacing the server name for your own name, the listenip for your VPS's IP, and the port for whatever you want (though keeping on the standard port is preferred).

As usual with dedicated servers its preferably to put it in a screen instance, its also a good idea to wrap it in a script to auto-boot it if the server crashes or aborts for any reason, I use the following bash script to do that (nice and simple)

#!/bin/bash

while [ true ]; do
   ./ZombieGrinder -server 1 -closeonnoclients 0 -servername "[US] Official #1" -listenip "50.116.7.244" -port 57897
   wait
   sleep 3
   echo "###########################################"
   echo "            SERVER TERMINATED              "
   echo "                RESTARTING                 "
   echo "###########################################"
   sleep 3
done

I also personally create some stop/start bash scripts too start up and close down the server in one command (which I usually tie to an /etc/init.d/zgserver stop|start|restart script).

start.sh:

#!/bin/bash
cd /home/games/zombiegrinder/
screen -AmdS zg1-server ./ZombieGrinderServer1.sh
screen -AmdS zg2-server ./ZombieGrinderServer2.sh
echo "Server started"

stop.sh:

#!/bin/bash
screen -dr zg1-server -X quit
screen -dr zg2-server -X quit
echo "Server stopped"

/etc/init.d/zgserver:

#!/bin/bash

RETVAL=0

# To start the server
start() {
  "/home/games/zombiegrinder/start.sh"
  RETVAL=0
}

# To stop the server
stop() {
  "/home/games/zombiegrinder/stop.sh"
  RETVAL=0
}

case $1 in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart)
    stop
    start
    ;;
  *)
    echo "Usage: server {start|stop|restart}"
    RETVAL=1
esac

exit

Where ZombieGrinderServer1.sh and ZombieGrinderServer2.sh are versions of the second script, configured to how you want each server to run (just use one if you only want to run one game server on your host server).

Hope that helps, just ask if you have any questions (I'm sure you do! Explaining things at 2am is not my forte!)

Jun 23 2012 Anchor

So, I managed to sort out dependencies and all, but no luck yet getting it running. I downloaded the standalone Linux tarball from the Twin Drills homepage, unpacked it all into /opt/zombiegrinder, added a firewall rule for port 57897, set up a user specifically for it and now I'm stuck with an error, "Unable to create connection to master server".
[FATAL]Unable to create connection to master server.
Also, had to use Xvfb and x11vnc so it would have a display available to show the error dialog boxes. Could probably have it print to stderr instead for headless servers.

This is the startup script:

#!/bin/bash
exec ./ZombieGrinder -server 1 -closeonnoclients 0 -servername "[US-Dallas] n__n *box*" -listenip "69.164.207.17" -port 57897

Running ArchLinux, 32-bit. Let me know if there's any other info that might help.

Infinitus
Infinitus Developer
Jun 24 2012 Anchor

noodlebox wrote: So, I managed to sort out dependencies and all, but no luck yet getting it running. I downloaded the standalone Linux tarball from the Twin Drills homepage, unpacked it all into /opt/zombiegrinder, added a firewall rule for port 57897, set up a user specifically for it and now I'm stuck with an error, "Unable to create connection to master server".
[FATAL]Unable to create connection to master server.
Also, had to use Xvfb and x11vnc so it would have a display available to show the error dialog boxes. Could probably have it print to stderr instead for headless servers.

This is the startup script:

#!/bin/bash
exec ./ZombieGrinder -server 1 -closeonnoclients 0 -servername "[US-Dallas] n__n *box*" -listenip "69.164.207.17" -port 57897

Running ArchLinux, 32-bit. Let me know if there's any other info that might help.


It does print to stderr in the next version :3. This version of the dedicated server code was primarily for my own testing.

Anyhow, if you have a firewall running you'll probably need to open the port that the server communicates with the master server on - 57898

--

Jun 25 2012 Anchor

please support centos 5.8 , we cant install cantos 6.2 :(
Glibc_2.7 not found because centos 5.8 only support 2.5

Apr 7 2013 Anchor

Hi. I am attempting to run a dedicated server, per Infinitus' instructions. I am running a Debian 6 (64-bit) headless server. I downloaded the Linux version of Zombie Grinder and used the following script posted above by Infinitus to launch the server:

#!/bin/bash

while [ true ]; do
    ./ZombieGrinder -server 1 -closeonnoclients 0 -servername "[My Server Name]" -listenip "[My IP]" -port 57897
    wait
    sleep 3
    echo "###########################################"
    echo "            SERVER TERMINATED              "
    echo "                RESTARTING                 "
    echo "###########################################"
    sleep 3
done

After creating the above file, running a "chmod +x" on it, and running it with or without root privileges, the following error is shown:

./ZombieGrinder: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

It doesn't state dependencies explicitly, and I am not sure exactly which package includes that file. Note: I am running a headless server, and therefore do not have Xorg / X11 installed.
Thank you for your help.

May 11 2013 Anchor

Hi, i wanted to set up a server on my ubuntu 12.04 machine, but whenever i try to execute ZombieGrinder, it says, that it is not found, despite it is there. :/ Any ideas, how to fix this?

Jul 30 2013 Anchor

Thanks for posting this, and can you post a tutorial about host a dedicated server in Windows? I edit the line to make it run under Windows but I keep getting "[FATAL]Unable to open listening port." error.

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.