Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 717

Warning: Invalid argument supplied for foreach() in /var/www/ct/forums/wiki/includes/MagicWord.php on line 718

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 722

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 717

Warning: Invalid argument supplied for foreach() in /var/www/ct/forums/wiki/includes/MagicWord.php on line 718

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 722

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 739

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 739

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 717

Warning: Invalid argument supplied for foreach() in /var/www/ct/forums/wiki/includes/MagicWord.php on line 718

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 722

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 717

Warning: Invalid argument supplied for foreach() in /var/www/ct/forums/wiki/includes/MagicWord.php on line 718

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 722

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 739

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 717

Warning: Invalid argument supplied for foreach() in /var/www/ct/forums/wiki/includes/MagicWord.php on line 718

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 722

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 717

Warning: Invalid argument supplied for foreach() in /var/www/ct/forums/wiki/includes/MagicWord.php on line 718

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 722

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 739

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 739

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 739

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 717

Warning: Invalid argument supplied for foreach() in /var/www/ct/forums/wiki/includes/MagicWord.php on line 718

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 722

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 717

Warning: Invalid argument supplied for foreach() in /var/www/ct/forums/wiki/includes/MagicWord.php on line 718

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 722

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 739

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /var/www/ct/forums/wiki/includes/MagicWord.php on line 739
Crazy Tronners Wiki - Configure a wild server

Configure a wild server

From Tronwiki
Jump to: navigation, search
(External links)
 
Line 1: Line 1:
This page is still being edited
+
{{Stub}}
 +
This article is being completely reformatted by me, to clearify it, see talk page for more info about progress and requests/objections --epsy
  
Here is a copy of what ed said
 
  
A question I get asked quite reguarly. I usually just say it's a php/mysql script written by PTA. You can get the same results with one I  wrote here, it's just not as easy to admin:
 
[[http://tron.plantpeanuts.co.uk/viewtopic.php?t=42 |http://tron.plantpeanuts.co.uk/viewtopic.php?t=42]]
 
  
Well I spoke to PTA, and he's happy for me to release the code so anyone else who wants a crack at a map rotation tron server can have a go, using  the same tools that we use.
+
This little how-to will guide you through the installation of a dedicated armagetron advanced server and by putting a map switcher script.
 +
The map rotation script here is the one that was used on CT's servers with a few hacks inside.
  
I am no computer genius, I have a basic understanding of linux and using a ssh connection to admin a server. Anyone who has this can run a similar server, it aint Rocket Science.
+
You do not need to be root or with special right on the machine that will run the server to get it to work. A simple user which has a home directory is good enough.
  
I will first explain how I install and run armagetronad-dedicated. As I have about 7  tron servers, believe it or not, that are up or down at any one time. So I need an easy way to control these.
+
Let's start! :)
  
My English skills are poor, my head screwy (I should have spent more time in school, less time taking drugs), but I'll do my best to put a tutorial together that anyone with some basic computer skills can follow. Starting with installation, ending with the map rotation script. Not saying my way is the best way, it certainly isn't the only way. But it does work.
+
== Installation ==
  
I don't have root access to the server that runs CT Wild. This is not necessary. I compile armagetron-dedicated from source using the --prefix option. I have changed the names and colours of the teams on my server, just for fun. If you want to do this you need to do this before compiling:
+
If you have one, three, or more servers, dont worry, you won't need to install each time a new copy of armagetron. You dont need to have full-acces(root) on the machine, you only need a writable home directory.
  
[[http://forums.armagetronad.net/viewtopic.php?t=3045 |http://forums.armagetronad.net/viewtopic.php?t=3045]]
+
First, download the source from the official site: http://prdownloads.sourceforge.net/armagetronad/armagetronad-0.2.8.2.1.src.tar.bz2?download
  
I then compile using:
+
Then unpack it:
 +
tar xvf armagetronad-0.2.8.2.1.src.tar.bz2
 +
and enter the newly created folder:
 +
cd armagetronad-0.2.8.2.1/
  
./configure --prefix /home/ed/tron --disable-glout
+
Then launch the configure script which will prepare armagetronad for compilation.
 +
./configure --prefix ${HOME}/tron --disable-glout
 +
The --prefix option sets where armagetronad will be installed and the --disable-glout option causes it to build only the dedicated server.
  
after this run make && make install to install the thing.
+
Like ever :)
 +
make && make install
  
This will install armagetron-dedicated ONLY into dir /home/ed/tron
+
== Configuration ==
 +
 
 +
For each server you want to create, create a separate directory for it, and 2 subfolders in it: config and var
 +
mkdir -p ~/myfunnytronserver/{config,var}
 +
 
 +
 
 +
----
  
 
For each server I run I have a directory dedicated to them. So, wild has a dir: /home/ed/wild
 
For each server I run I have a directory dedicated to them. So, wild has a dir: /home/ed/wild
Line 44: Line 55:
 
This will set the server up as a clone of fortress. Everything else is added to that. I won't go into great detail about the settings I change, nothing major, just change winzone to dz, alter dz timeout settings, etc. If anyone wants a copy of my config files, just ask.
 
This will set the server up as a clone of fortress. Everything else is added to that. I won't go into great detail about the settings I change, nothing major, just change winzone to dz, alter dz timeout settings, etc. If anyone wants a copy of my config files, just ask.
  
to run this server I have a simple bash script to make it easier for myself. This looks like:
+
to run this server I have a simple bash script to make it easier for myself. This looks like:
  
 
  Code:
 
  Code:
Line 188: Line 199:
 
  //
 
  //
 
  // Start Config
 
  // Start Config
 
+
 
  var $cfg_host="localhost";
 
  var $cfg_host="localhost";
 
  var $cfg_user="mysqlusername";
 
  var $cfg_user="mysqlusername";
Line 200: Line 211:
 
  //
 
  //
 
  //
 
  //
 
+
 
  function mysql_start(){
 
  function mysql_start(){
 
         mysql_connect($this->cfg_host,$this->cfg_user,$this->cfg_pw);
 
         mysql_connect($this->cfg_host,$this->cfg_user,$this->cfg_pw);
Line 209: Line 220:
 
         mysql_close();
 
         mysql_close();
 
  }
 
  }
 
+
 
  function map_cycle($round){
 
  function map_cycle($round){
 
         $mapquery=mysql_query('SELECT * FROM maps WHERE  round="'.$round.'"');
 
         $mapquery=mysql_query('SELECT * FROM maps WHERE  round="'.$round.'"');
Line 235: Line 246:
 
         echo $content;
 
         echo $content;
 
  }
 
  }
 
+
 
  }
 
  }
 
  ?>
 
  ?>
 
+
  
 
Of course you need a mysql database, in my case called tron. Within here is a table called maps.
 
Of course you need a mysql database, in my case called tron. Within here is a table called maps.
Line 248: Line 259:
 
   
 
   
 
  mysql> select * from maps;
 
  mysql> select * from maps;
  +----+-------+----------------------------------------------------------+-------------------------+---------------+
+
+----+-------+----------------------------------------------------------+-------------------------+---------------+
 
  | id | round | mapfile                                                  | mapname                | server        |
 
  | id | round | mapfile                                                  | mapname                | server        |
 
  +----+-------+----------------------------------------------------------+-------------------------+---------------+
 
  +----+-------+----------------------------------------------------------+-------------------------+---------------+
 
  |  1 |    1 | ed/fortress/pillar-0.0.7.aamap.xml                      | Pillar                  | wildfortress1 |
 
  |  1 |    1 | ed/fortress/pillar-0.0.7.aamap.xml                      | Pillar                  | wildfortress1 |
 
  |  2 |    1 | ed/fortress/lookout-0.0.6.aamap.xml                      | Look Out!              | wildfortress1 |
 
  |  2 |    1 | ed/fortress/lookout-0.0.6.aamap.xml                      | Look Out!              | wildfortress1 |
|  3 |    1 | ed/fortress/johnny-0.0.2.aamap.xml                      | Hello, my name's Johnny | wildfortress1 |
+
|  3 |    1 | ed/fortress/johnny-0.0.2.aamap.xml                      | Hello, my name's Johnny | wildfortress1 |
|  4 |    2 | ed/fortress/minefield-0.0.7.aamap.xml                    | Minefield              | wildfortress1 |
+
|  4 |    2 | ed/fortress/minefield-0.0.7.aamap.xml                    | Minefield              | wildfortress1 |
|  5 |    2 | ed/fortress/minepillars-0.0.3.aamap.xml                  | Mine Pillars            | wildfortress1 |
+
|  5 |    2 | ed/fortress/minepillars-0.0.3.aamap.xml                  | Mine Pillars            | wildfortress1 |
|  6 |    2 | ed/fortress/hairbrush-0.0.2.aamap.xml                    | HairBrush              | wildfortress1 |
+
|  6 |    2 | ed/fortress/hairbrush-0.0.2.aamap.xml                    | HairBrush              | wildfortress1 |
|  7 |    3 | ed/fortress/octazigzag-0.0.3.aamap.xml                  | Octagon Wiggle!        | wildfortress1 |
+
|  7 |    3 | ed/fortress/octazigzag-0.0.3.aamap.xml                  | Octagon Wiggle!        | wildfortress1 |
|  8 |    3 | ed/fortress/octagon-0.0.2.aamap.xml                      | Octagon Fortress!      | wildfortress1 |
+
|  8 |    3 | ed/fortress/octagon-0.0.2.aamap.xml                      | Octagon Fortress!      | wildfortress1 |
|  9 |    10 | ed/fortress/hexagon_triangles-0.0.3.aamap.xml            | Hexagonal Triangles    | wildfortress1 |
+
|  9 |    10 | ed/fortress/hexagon_triangles-0.0.3.aamap.xml            | Hexagonal Triangles    | wildfortress1 |
| 10 |    3 | ed/fortress/octagoneloopy-0.0.1.aamap.xml                | Octa Gone Loopy!        | wildfortress1 |
+
| 10 |    3 | ed/fortress/octagoneloopy-0.0.1.aamap.xml                | Octa Gone Loopy!        | wildfortress1 |
| 11 |    4 | ed/fortress/arcanoid-0.0.6.aamap.xml                    | Arcanoid                | wildfortress1 |
+
| 11 |    4 | ed/fortress/arcanoid-0.0.6.aamap.xml                    | Arcanoid                | wildfortress1 |
| 12 |    4 | ed/fortress/behind_you-0.0.9.aamap.xml                  | Behind You              | wildfortress1 |
+
| 12 |    4 | ed/fortress/behind_you-0.0.9.aamap.xml                  | Behind You              | wildfortress1 |
| 13 |    5 | ed/fortress/slingshot-0.0.1.aamap.xml                    | Slingshot              | wildfortress1 |
+
| 13 |    5 | ed/fortress/slingshot-0.0.1.aamap.xml                    | Slingshot              | wildfortress1 |
| 14 |    5 | ed/fortress/speed_dome-0.0.7.aamap.xml                  | Speed Kills            | wildfortress1 |
+
| 14 |    5 | ed/fortress/speed_dome-0.0.7.aamap.xml                  | Speed Kills            | wildfortress1 |
| 15 |    5 | ed/fortress/speed_city-0.0.2.aamap.xml                  | Speed City              | wildfortress1 |
+
| 15 |    5 | ed/fortress/speed_city-0.0.2.aamap.xml                  | Speed City              | wildfortress1 |
| 16 |    6 | ed/fortress/chico_time-0.1.4.aamap.xml                  | It's Chico Time        | wildfortress1 |
+
| 16 |    6 | ed/fortress/chico_time-0.1.4.aamap.xml                  | It's Chico Time        | wildfortress1 |
| 17 |    6 | ed/fortress/chico_teamsumo-0.0.4.aamap.xml              | It's Chico Sumo        | wildfortress1 |
+
| 17 |    6 | ed/fortress/chico_teamsumo-0.0.4.aamap.xml              | It's Chico Sumo        | wildfortress1 |
| 18 |    6 | ed/fortress/hourglass-0.0.4.aamap.xml                    | Chico's Hourglass      | wildfortress1 |
+
| 18 |    6 | ed/fortress/hourglass-0.0.4.aamap.xml                    | Chico's Hourglass      | wildfortress1 |
| 19 |    7 | ed/fortress/boxes-0.0.6.aamap.xml                        | Little Boxes            | wildfortress1 |
+
| 19 |    7 | ed/fortress/boxes-0.0.6.aamap.xml                        | Little Boxes            | wildfortress1 |
| 20 |    7 | ed/fortress/columns-0.0.1.aamap.xml                      | Little Columns          | wildfortress1 |
+
| 20 |    7 | ed/fortress/columns-0.0.1.aamap.xml                      | Little Columns          | wildfortress1 |
| 21 |    7 | ed/fortress/circles-0.0.3.aamap.xml                      | Little Circles          | wildfortress1 |
+
| 21 |    7 | ed/fortress/circles-0.0.3.aamap.xml                      | Little Circles          | wildfortress1 |
| 22 |    7 | ed/fortress/little_spiral-0.0.5.aamap.xml                | Little Spirals          | wildfortress1 |
+
| 22 |    7 | ed/fortress/little_spiral-0.0.5.aamap.xml                | Little Spirals          | wildfortress1 |
| 23 |    13 | ed/fortress/mini-0.0.6.aamap.xml                        | Mini                    | wildfortress1 |
+
| 23 |    13 | ed/fortress/mini-0.0.6.aamap.xml                        | Mini                    | wildfortress1 |
| 24 |    8 | ed/fortress/nano-0.0.4.aamap.xml                        | Nano                    | wildfortress1 |
+
| 24 |    8 | ed/fortress/nano-0.0.4.aamap.xml                        | Nano                    | wildfortress1 |
| 25 |    11 | ed/fortress/chico_clover-0.0.4.aamap.xml                | Chico's Clover          | wildfortress1 |
+
| 25 |    11 | ed/fortress/chico_clover-0.0.4.aamap.xml                | Chico's Clover          | wildfortress1 |
| 26 |    11 | ed/fortress/chicoeye-0.0.3.aamap.xml                    | Chico's Eye - Brake!    | wildfortress1 |
+
| 26 |    11 | ed/fortress/chicoeye-0.0.3.aamap.xml                    | Chico's Eye - Brake!    | wildfortress1 |
| 27 |    11 | ed/fortress/houreye-0.0.2.aamap.xml                      | Chico's Wild Ride      | wildfortress1 |
+
| 27 |    11 | ed/fortress/houreye-0.0.2.aamap.xml                      | Chico's Wild Ride      | wildfortress1 |
| 28 |    12 | ed/fortress/diamond_death-0.0.8.aamap.xml                | Diamond Death          | wildfortress1 |
+
| 28 |    12 | ed/fortress/diamond_death-0.0.8.aamap.xml                | Diamond Death          | wildfortress1 |
| 29 |    12 | ed/fortress/diamond_sumo-0.0.5.aamap.xml                | Diamond Sumo            | wildfortress1 |
+
| 29 |    12 | ed/fortress/diamond_sumo-0.0.5.aamap.xml                | Diamond Sumo            | wildfortress1 |
| 30 |    3 | ed/fortress/octagon_weasel-0.0.1.aamap.xml              | Octagon Weasel          | wildfortress1 |
+
| 30 |    3 | ed/fortress/octagon_weasel-0.0.1.aamap.xml              | Octagon Weasel          | wildfortress1 |
| 31 |    9 | ed/fortress/desperate_housewives-0.0.1.aamap.xml        | Desperate Housewives    | wildfortress1 |
+
| 31 |    9 | ed/fortress/desperate_housewives-0.0.1.aamap.xml        | Desperate Housewives    | wildfortress1 |
| 32 |    12 | ed/fortress/diamond_masacre-0.0.1.aamap.xml              | Diamond Massacre        | wildfortress1 |
+
| 32 |    12 | ed/fortress/diamond_masacre-0.0.1.aamap.xml              | Diamond Massacre        | wildfortress1 |
| 33 |    9 | ed/fortress/grand_designs-0.0.1.aamap.xml                | Grand Designs          | wildfortress1 |
+
| 33 |    9 | ed/fortress/grand_designs-0.0.1.aamap.xml                | Grand Designs          | wildfortress1 |
| 34 |    13 | ed/fortress/magic_roundabout-0.0.2.aamap.xml            | Magic Roundabout        | wildfortress1 |
+
| 34 |    13 | ed/fortress/magic_roundabout-0.0.2.aamap.xml            | Magic Roundabout        | wildfortress1 |
| 35 |    13 | ed/fortress/little_bear-0.0.2.aamap.xml                  | Little Bear            | wildfortress1 |
+
| 35 |    13 | ed/fortress/little_bear-0.0.2.aamap.xml                  | Little Bear            | wildfortress1 |
| 36 |    8 | ed/fortress/nano_knightmare-0.0.5.aamap.xml              | Nano Knightmare        | wildfortress1 |
+
| 36 |    8 | ed/fortress/nano_knightmare-0.0.5.aamap.xml              | Nano Knightmare        | wildfortress1 |
| 37 |    4 | ed/fortress/crossfire-0.0.1.aamap.xml                    | Crossfire              | wildfortress1 |
+
| 37 |    4 | ed/fortress/crossfire-0.0.1.aamap.xml                    | Crossfire              | wildfortress1 |
| 38 |    9 | ed/fortress/staff-0.0.1.aamap.xml                        | The Mighty Staff        | wildfortress1 |
+
| 38 |    9 | ed/fortress/staff-0.0.1.aamap.xml                        | The Mighty Staff        | wildfortress1 |
| 39 |    6 | ed/fortress/chico_nano-0.0.5.aamap.xml                  | Chico in Nanoland      | wildfortress1 |
+
| 39 |    6 | ed/fortress/chico_nano-0.0.5.aamap.xml                  | Chico in Nanoland      | wildfortress1 |
| 40 |    10 | ed/fortress/three_deadly_hexagonal_sumos-0.0.7.aamap.xml | Three Deadly Hex Sumo's | wildfortress1 |
+
| 40 |    10 | ed/fortress/three_deadly_hexagonal_sumos-0.0.7.aamap.xml | Three Deadly Hex Sumo's | wildfortress1 |
| 41 |    8 | ed/fortress/nano_sumo-0.1.2.aamap.xml                    | Nan's Team Sumo        | wildfortress1 |
+
| 41 |    8 | ed/fortress/nano_sumo-0.1.2.aamap.xml                    | Nan's Team Sumo        | wildfortress1 |
| 42 |    10 | ed/fortress/death_of_hex-0.0.3.aamap.xml                | Death of Hex            | wildfortress1 |
+
| 42 |    10 | ed/fortress/death_of_hex-0.0.3.aamap.xml                | Death of Hex            | wildfortress1 |
| 43 |    9 | ed/fortress/staffs_tomb-0.0.2.aamap.xml                  | Staffs Tomb            | wildfortress1 |
+
| 43 |    9 | ed/fortress/staffs_tomb-0.0.2.aamap.xml                  | Staffs Tomb            | wildfortress1 |
+----+-------+----------------------------------------------------------+-------------------------+---------------+
+
+----+-------+----------------------------------------------------------+-------------------------+---------------+
43 rows in set (0.00 sec)
+
43 rows in set (0.00 sec)
  
  
Line 301: Line 312:
  
 
And I think that's it. If you spot any errors, let me know. I hope it's useful to someone.
 
And I think that's it. If you spot any errors, let me know. I hope it's useful to someone.
 +
 +
== External links ==
 +
* Ed's original post: http://forums.crazy-tronners.com/viewtopic.php?p=3600#3600
 +
* Another map rotation [http://www.research-service.com/custom-research-paper.html research paper] script: http://forums.crazy-tronners.com/viewtopic.php?t=42

Latest revision as of 21:54, 14 January 2010

Personal tools