How to set up a fortress server, and how to deal with lag

Post here if you need help setting up your server, etc.
User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

How to set up a fortress server, and how to deal with lag

Post by Lucifer »

New stuff on the wiki. In the advanced server administration guide, I added some stuff about how to use the bandwidth settings and dedicated_fps to deal with lag. Bonus if it's actually right!

http://wiki.armagetronad.net/index.php/ ... tion_Guide

Linked from there is the Fortress page, and I dumped the settings you need to toy with to setup a fortress server. More explanation is needed, but I'm about ready to pass out.

Tank: Can we get this as a sticky? I don't know about you guys, but these have to be the two most common questions I'm getting from server admins.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6704
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Good idea, stickied.

Edit: Reading the bit on bandwith, I'm really confused. MAX_OUT_RATE is the bandwith per client in which unit?

Edit 2: How does 512kbit/s go to 128kbyte/s? Shouldn't it be 64kbyte/s?
Image

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

I may have done the conversion wrong from 512kbits to kbytes. :)

Edit: A byte is 4 bits, right? A kilobyte is 1024 bytes. Number of bits in 512 kbits is 1024*512. So (1024*512)/4 = bytes, and bytes/1024 = kilobytes. Right?

I read a post of z-man's in another thread (which I don't have handy) that indicated MAX_OUT_RATE was in kiloBYTES per second. If that's wrong, then I'll update the wiki accordingly.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

User avatar
Jonathan
A Brave Victim
Posts: 3392
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

Today's bytes are usually octets.
ˌɑrməˈɡɛˌtrɑn

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

So sizeof(char) will return .5 then?

I guess nevermind, I just need a conversion factor that works, even if it doesn't make sense to me. ;)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

User avatar
Jonathan
A Brave Victim
Posts: 3392
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

Lucifer wrote:So sizeof(char) will return .5 then?
Depends on how broken your compiler is, but it's highly unlikely.
Lucifer wrote:I guess nevermind, I just need a conversion factor that works, even if it doesn't make sense to me. ;)
return 070-'0';
ˌɑrməˈɡɛˌtrɑn

User avatar
hang3r
Core Dumper
Posts: 188
Joined: Fri Sep 16, 2005 9:05 pm
Location: Australia

Post by hang3r »

As jonathan said, a byte is an octet (8 bits). sizeof(char) is always going to return 1, no matter what compiler you have (or even how broken it is).

User avatar
hang3r
Core Dumper
Posts: 188
Joined: Fri Sep 16, 2005 9:05 pm
Location: Australia

Post by hang3r »

Ok, I regret saying that...

Code: Select all

#include <iostream>
#define char int

int main()
{
    std::cout << sizeof(char) << std::endl;
    return 0;
}

User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6704
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

one byte = 8 bits afaik...
Image

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Using hanger's test program. The second compile and run was with commenting out his #define char int line.

Code: Select all

[[email protected] ~]$ g++ testsizeof.cpp
[[email protected] ~]$ ./a.out
4
[[email protected] ~]$ vi testsizeof.cpp
[[email protected] ~]$ g++ testsizeof.cpp
[[email protected] ~]$ ./a.out
1
[[email protected] ~]$  
Let's see. 32-bit machine, 32-bit ints. 32/4 = 8.

http://en.wikipedia.org/wiki/Byte

Says that byte was originally 4 bits, but not for long. Hmmm..... anybody remember if the Amiga ran 4-bit bytes? Now I'm wondering where I got the idea that 4 bits were in a byte. Heh.

Anyway, I'll correct the page.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

gnorty
Core Dumper
Posts: 187
Joined: Wed Nov 02, 2005 2:45 am

Post by gnorty »

A byte has been 8 bits since well before I started programming (1982-ish)

Amiga was a 16 bit machine, but still certainly had 8 bits in a byte.

BBC Micro
Commodore 64
ZX Spectrum
ZX81

all predating Amiga, and all 8 bits in a byte.

I'm very puzzled by this subthread and think I am probably missing something crucial - "In" joke maybe?

:?:

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

no, but it's probably going to become one now. :roll:
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

gnorty
Core Dumper
Posts: 187
Joined: Wed Nov 02, 2005 2:45 am

Post by gnorty »

It's day one stuff luci.

Were you off sick that day ;)

User avatar
Lucifer
Project Developer & Local Moonshiner
Posts: 8610
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Can I play the "I only use scripting languages these days" card?

Last time I did byte calculations, I think I used 4 bits to a byte, but that program never worked right. Hmmm.....................
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden

clragon
On Lightcycle Grid
Posts: 10
Joined: Thu Feb 23, 2006 11:18 pm

Post by clragon »

Hi, I am trying to set up a fortress server and I ran to some problems :(

first of all,here it shows 3 server files for Windows OS, which one is the most updated? I downloaded 0.2.8.0_rc3 because it was the biggest out of the 3, but I keep reading about the beta 4 one, so which one should I use?

and I followed Lucifer's guide on how to set up a server (thanks btw! helped me lots ^_^) but when I went to this page about setting up a fortress server, I got confused because it says
These are the settings you need to use to setup your own fortress server:
and a block of code follows.

I already have a similar block of code in my autoexec.cfg file:
# 0.2.8 fortress settings (preliminary): a fortress zone has a "conquered" property; it
# starts at 0, if it reaches 1, the fortress is conquered. It gets modified according
# to the following rules every second:

FORTRESS_CONQUEST_RATE .5 # the number of enemies inside the fortress zone is counted, multiplied with this value and added to the "conquered" variable. Increase this to make conquering easier.
FORTRESS_DEFEND_RATE .25 # the number of owners inside the fortress zone is counted, multiplied with this value and subtracted from the "conquered" variable. Increase to make defending easier.
FORTRESS_CONQUEST_DECAY_RATE .1 # this value is subtracted. Increase to make defending easier.

# what happens when a zone gets conquered

FORTRESS_CONQUERED_SCORE 10 # the conquering party gets this many points (divided among the conquerors)
FORTRESS_CONQUERED_WIN 0 # if set to 1, the conquering party wins the round
FORTRESS_CONQUERED_KILL_MIN 0 # the closest X players of the owning team get killed at least
FORTRESS_CONQUERED_KILL_RATIO 0.0 # this fraction of the players of the owning team get killed

FORTRESS_SURVIVE_WIN 1 # if set to 1, the last team with an unconquered zone wins the round
FORTRESS_MAX_PER_TEAM 0 # if > 0, this is the maximal number of fortress zones ownable by a team. Closer zones are prefered. Use this to prune noninhabited zones in multi-team maps.

SPAWN_POINT_GROUP_SIZE 0 # if > 2, this is interpreted as the number of spawn points in a spawn point group. AA then tries not to spawn one player alone in one spawn point group by redistributing them slightly.
so which one do I use?

I also wrote
INCLUDE examples/fortress_soccer.cfg
at the bottom of my settings_custom.cfg but when I join my own server it is still deathmatch, did I forget something? :(

one last thing, I read in another thread that the fortress map that is included with the server files made by Z-Man is different than others because he wanted older versions to be compatible with it, where might I get another map? a map like the one in the CVS Beta Server.

Thanks.

Post Reply