Total servers: 3
Backup server NL
Modern Warfare1.0 – 100lt
IP: 95.46.198.26
Game Mode: Death Match
Lives: 0
Max Kills: 15
Version: OpenLieroX 0.58 rc5
Players:
Hathat(0 lives, 4 kills)
Marten(0 lives, 0 kills)
80.186.170.22
Unknown
Unknown – 0lt
IP: 80.186.170.22
Game Mode:
Lives: 0
Max Kills: 0
Version: LieroX 0.56b
Players:
M0rtsHeaven
Modern Warfare1.0 – 20lt
IP: 84.251.82.159
Game Mode: Death Match
Lives: 0
Max Kills: 12
Version: OpenLieroX 0.58 rc5
Players:
Pages: [1] 2 3 ... 8   Go Down

Author Topic: Dedicated server questions  (Read 27430 times)

Kurko

Dedicated server questions
« on: May 18, 2012, 12:25:47 pm »
What kind of computer is needed to run one or more OLX dedicated servers smoothly? How much RAM, how fast CPU etc.? I may get a (very) old computer for a cheap price which I will probably set up as a server.

Internet line is 100/10M so I think it won't be a bottleneck. The other system specs, on the other hand... :P
« Last Edit: April 02, 2013, 03:55:24 pm by Kurko »

DarkCharlie

Re: System requirements for dedicated server
« Reply #1 on: May 19, 2012, 09:14:16 pm »
I'd say a CPU at 1.6 GHz, 512 MB RAM should be sufficient. There's no screen drawing performed thus the requirements are even lower than for the non-dedicated version of OLX.

Kurko

Re: System requirements for dedicated server
« Reply #2 on: May 20, 2012, 10:42:05 pm »
I think I played LX 0.56 on a computer with 800MHz CPU and max 256MB RAM years ago... but newer versions apparently require more power and that might be too much for me. The computer that I'm talking about has a 500Mhz CPU if I recall it correctly. Memory shouldn't be a problem unless the motherboard refuses to work with my 512MB kit.

I did a quick test on Windows (A64 3000+/1.7Ghz CPU), I was playing on a server with about 10 players.

http://i.imgur.com/fmT3o.png

The CPU usage drops when the window is minimized but is there a way to reduce it further? How about compiling with the "dedicated_only" flag?
« Last Edit: May 20, 2012, 10:44:48 pm by Kurko »

albert

Re: System requirements for dedicated server
« Reply #3 on: May 20, 2012, 10:57:11 pm »
I think I played LX 0.56 on a computer with 800MHz CPU and max 256MB RAM years ago... but newer versions apparently require more power. .. I was playing on a server with about 10 players.

Some of the physics are more exact but that is really minor. Some of the code is a bit more general or supports more cases, so that has become slightly slower.

Most of the CPU time is spent in drawing. And bots also take quite some CPU. And the more players there are, the more CPU it takes (I think LX56 only supported max 8 players if I recall correctly).

The CPU usage drops when the window is minimized but is there a way to reduce it further? How about compiling with the "dedicated_only" flag?

The mainloop FPS (which is independent from physics, though) is clamped a bit further when the window is minimized. You can get the same effect by setting MaxFPS a bit lower. MaxFPS is about the mainloop. In every mainloop frame, such stuff such as network input/output, user input, etc and one graphics frame is handled.

The dedicated_only flag creates a binary with no graphical output and no user input.

DarkCharlie

Re: System requirements for dedicated server
« Reply #4 on: May 20, 2012, 10:58:37 pm »
Yes, compile it with dedicated-only. Even 500 MHz will be OK, it just won't be as smooth if there are many projectiles. The players nowadays have different needs for game smoothness than 10 years ago :)

kokbira

  • Gi Joe Brown Brazillian Rope-Flying Ant
  • LXA Part Time Adapt
  • *****
  • Schwartz: +23/-6
  • Offline Offline
  • Posts: 529
  • 3918 credits
  • View Inventory
  • Send Money To kokbira
  • ex-player (ex-Flip and ex-s00t clan member)
    • WWW
Re: System requirements for dedicated server
« Reply #5 on: May 21, 2012, 04:32:23 pm »
i.e., you can host using a chinese tablet with linux on it and with wi-fi connection :)

mmm. what about connection requirements?

Kurko

Re: System requirements for dedicated server
« Reply #6 on: May 21, 2012, 10:28:33 pm »
Ok, let's see what I can do... Setting max FPS lower while hosting seems to reduce lag even if CPU usage isn't 100%. If I set it to about 50 then it should be fine?

i.e., you can host using a chinese tablet with linux on it and with wi-fi connection :)

mmm. what about connection requirements?

Yes, pretty sure.  :P I think today's tablets are much faster than desktop computers in the 90s.

Bandwidth isn't very important (OLX doesn't generate very much traffic) but latency is. Wireless (local) home network should be fine if the WAN line is fast enough. Crowded wireless networks and especially wireless WANs (UMTS/Wimax etc.) will be laggy.
« Last Edit: May 21, 2012, 10:38:19 pm by Kurko »

Kurko

Re: System requirements for dedicated server
« Reply #7 on: June 04, 2012, 09:57:22 pm »
More questions... 1) Server-side health seems to be disabled by default but does it work properly now? I think it was horribly buggy during 0.57-b3...8 phase. Does anyone use it?

2) Is it possible to disable damage counting without a great mess? There's no entry for it in options.cfg. I may look at the source later though I have absolutely no C++ knowledge. (Ok, this won't probably affect performance very much but the computer is slooooooow so I'll do everything to minimize lag. :P)

3) What does AimLikeLX56 = foo do? I think someone said that physics should be just like 0.56 by default?

4) DoProjectileSimulationInDedicated = foo seems to be true by default but what happens in practice if it's disabled?


*) What mod(s)/gametypes should I host if I ever get this server running? :P
« Last Edit: June 04, 2012, 10:00:14 pm by Kurko »

albert

Re: System requirements for dedicated server
« Reply #8 on: June 04, 2012, 11:04:34 pm »
More questions... 1) Server-side health seems to be disabled by default but does it work properly now? I think it was horribly buggy during 0.57-b3...8 phase. Does anyone use it?

I think it's still buggy. Not sure though. And it's probably fully broken since 0.59beta10. (But the latest 0.59 code has some preparation which will make it easy to reimplement that in a clean/rock-solid/bugfree way later on.)

Quote
2) Is it possible to disable damage counting without a great mess? There's no entry for it in options.cfg. I may look at the source later though I have absolutely no C++ knowledge. (Ok, this won't probably affect performance very much but the computer is slooooooow so I'll do everything to minimize lag. :P)

I thought about an option to just disable the visual damage count feedback. There is an issue entry on GitHub about it. (But it's not implemented yet.)

However, as you are just interested in the performance: That wouldn't affect it at all. But this handling is so trivial that it wouldn't really affect it in any case.

Projectile simulation is very related but read below...

Quote
3) What does AimLikeLX56 = foo do? I think someone said that physics should be just like 0.56 by default?

I have to admit, the option name is bad. It determines how the aim friction is handled.

The best reference about this is the code itself here.

I don't really remember the details anymore. I think AimLikeLX56=false felt better / more natural and thus became the default. AimLikeLX56=true is how it was earlier. This (including other aim settings) can also be forced via ForceLX56Aim=true.

I think AimLikeLX56 has minor effects on aim gameplay; more important are probably AimAcceleration, AimMaxSpeed and AimFriction (where AimFriction is ignored with AimLikeLX56=true).

This doesn't affect the game physics in any way.

The game physics are also not exactly like LX56 by default. E.g., they are now deterministic and the same on every client, which was *not* the case in LX56. Some people preferred the non-deterministic-LX56-behavior and thus there are some settings to have it like that.

There is a game settings preset to have it exactly like LX56. But I wouldn't recommend using that because of many issues (e.g. non fair gameplay like described above).

You can see the preset here. You can see all the current defaults here.

The defaults there differ in the last three options. In LX56:
Code: [Select]
ForceSameLX56PhysicsFPS = false
NinjaropePrecision = 0
ForceLX56Aim = true
But I really would recommend to use the defaults here. (And the other settings are like the defaults. So you just might use the defaults everywhere.)

Quote
4) DoProjectileSimulationInDedicated = foo seems to be true by default but what happens in practice if it's disabled?

With false, it doesn't do projectile simulation in dedicated mode. This simulation is only needed to do server side health/damage and server side terrain (dirt) creation/destruction and everything else that projectiles can do (nothing, really). Of course, you also need it if you have bots on the server.

With false, this gives you great performance improvements as the projectile simulation, besides the network handling, is the heaviest thing in dedicated mode. (In normal mode, the graphics code in most situations is still more heavy than everything else, though.)
« Last Edit: June 04, 2012, 11:11:46 pm by albert »

Kurko

Re: System requirements for dedicated server
« Reply #9 on: June 05, 2012, 03:50:54 pm »


The game physics are also not exactly like LX56 by default. E.g., they are now deterministic and the same on every client, which was *not* the case in LX56. Some people preferred the non-deterministic-LX56-behavior and thus there are some settings to have it like that.

There is a game settings preset to have it exactly like LX56. But I wouldn't recommend using that because of many issues (e.g. non fair gameplay like described above).

You can see the preset here. You can see all the current defaults here.

The defaults there differ in the last three options. In LX56:
Code: [Select]
ForceSameLX56PhysicsFPS = false
NinjaropePrecision = 0
ForceLX56Aim = true
But I really would recommend to use the defaults here. (And the other settings are like the defaults. So you just might use the defaults everywhere.)

Those settings are 0.59-only, right? I'll probably (not sure...) use 0.58, until the problems in b10 are fixed.

Quote
Quote
4) DoProjectileSimulationInDedicated = foo seems to be true by default but what happens in practice if it's disabled?
With false, it doesn't do projectile simulation in dedicated mode. This simulation is only needed to do server side health/damage and server side terrain (dirt) creation/destruction and everything else that projectiles can do (nothing, really). Of course, you also need it if you have bots on the server.

With false, this gives you great performance improvements as the projectile simulation, besides the network handling, is the heaviest thing in dedicated mode. (In normal mode, the graphics code in most situations is still more heavy than everything else, though.)

Ok, so I'll try with this setting disabled..

albert

Re: System requirements for dedicated server
« Reply #10 on: June 05, 2012, 04:20:00 pm »
In LX56:
Code: [Select]
ForceSameLX56PhysicsFPS = false
NinjaropePrecision = 0
ForceLX56Aim = true
But I really would recommend to use the defaults here. (And the other settings are like the defaults. So you just might use the defaults everywhere.)

Those settings are 0.59-only, right? I'll probably (not sure...) use 0.58, until the problems in b10 are fixed.

Yea.

I think 0.58 behaved just as ForceSameLX56PhysicsFPS=true (but it doesn't have that option) which is also the default in 0.59. It means that the physics are on every client the same. The option was only introduced in 0.59 because some players really wanted it like LX56 (i.e. ForceSameLX56PhysicsFPS=false, i.e. physics might be different depending on the speed of your computer (the real FPS)). Kind of stupid, maybe I should just remove it again...

NinjaropePrecision defines the ninjarope precision. I think 0.58 just behaved as NinjaropePrecision=1 which is also the default in 0.59. In LX56 it was just as NinjaropePrecision=0 (which also means that it depends on the speed of your computer (the real FPS) and might behave different everywhere).

Note that the behavior of those things which depend on the real FPS (i.e. the speed of your computer) have changed again slightly in latest 0.59. Internally, there is now another outer loop with fixed FPS and so all this should have become more deterministic, even with LX56-like settings. Not sure exactly out of the head if it is perfectly deterministic or not, though. In any case, I think all the default values are sane.

This is the related aim handling code in 0.58. It seems that is has all the same aim behavior settings (i.e.
AimAcceleration, AimMaxSpeed, AimFriction, AimLikeLX56). But it doesn't have ForceLX56Aim. I.e., you cannot force the LX56 aim settings on 0.58 clients.

Sadly, the 0.59 network code currently seems broken in the latest release, so you don't really have a choice but to use 0.58. As soon as this is fixed, I would switch to 0.59, though.

Kurko

Re: System requirements for dedicated server
« Reply #11 on: June 10, 2012, 05:14:32 pm »
Ok, almost working... Now more questions :P

I used DEDICATED_ONLY=ON (and X11=OFF) for cmake and compilation was successful.

Then I created a configuration file (options.cfg) to the default 1st path (~/.OpenLieroX/cfg) with the following file system options:

Code: [Select]
[FileHandling]
SearchPath1 = ${BIN}

The main configuration files/folders are in the BIN path, and the searchpaths are as follows:

Code: [Select]
[FileHandling]
SearchPath1 = ${BIN}
SearchPath2 = /home/username/openlierox/gamedata

The gamedata folder contain mods and other such stuff, and all configuration and logs are stored in ${BIN} (which is /home/username/openlierox/bin058 in this case).

I started the game (without parameters - it seems to use the dedicated script by default) and it kind of works... but where does it store all options? It didn't write anything to options.cfg anywhere (which it does in non-dedicated mode). Here's the game log...

http://pastebin.com/QjwEuUvQ

albert

Re: System requirements for dedicated server
« Reply #12 on: June 10, 2012, 09:06:37 pm »
It doesn't save the options unless you tell it to do so. I think the command is `SaveConfig` or so.

Note that once the search path is in effect (from the config file in ~/.OpenLieroX/cfg or whichever it founds first; see the full rules of which cfg file it will found first in the wiki), it will use the first options.cfg file in the new search paths (if there is one).
« Last Edit: June 10, 2012, 09:10:45 pm by albert »

Kurko

Re: System requirements for dedicated server
« Reply #13 on: June 11, 2012, 06:09:22 pm »
Thanks, that command worked.

Now to the control scripts...

I noticed this:

Code: [Select]
RECORD_VIDEO = 1 # If we should record video on our ded server. Warning: it eats CPU!
TIME_TO_KILL_VIDEORECORDER = 60 # Wait one minute before killing recorder - it may encode rather slowly!

...which is set to 1 by default. It didn't record video, or at least create large files, when I quickly tested it, but should I set it to 0?

edit: I found an entry in the control script where the recorded is defined as "none" so it shouldn't record anything anyway, right?


Then there's the dedicated config setting in options.cfg which is cfg/dedicated_config by default. Such a file doesn't exist but does this point to dedicated_config.py (which does exist)? It seems to do so but I'm not really sure.


edit: another question... will this work:

This is in the dedicated configuration file:

Code: [Select]
FORBIDDEN_NAMES = [
"OpenLieroXor",
"The Second",
"worm",
"Player",
]

And this in dedicated_control_handler, under parseNewWorm:

Code: [Select]
if name in cfg.FORBIDDEN_NAMES:
io.kickWorm( wormID, "default nicks are not allowed" )


(My first ever try to write Python :P)
« Last Edit: June 11, 2012, 08:07:38 pm by Kurko »

albert

Re: Dedicated server questions (*topic title changed*)
« Reply #14 on: June 12, 2012, 05:30:14 am »
Sorry, I'm not exactly up-to-date with the Python ded script. But it should be written in a way that it is easily understandable and extensible. (Not sure if it actually is like that... :))

Try to see for yourself if you see something related to `RECORD_VIDEO` or so. Maybe you are missing some dependencies so that this can work. Or it got completely broken... Pelya implemented this and was the only one actually using it, maybe you should ask him. (He wrote a funny script which autouploaded all those recorded videos to Youtube. But I think his account was suspended then. :))

Your Python code seems correct. (I can only recommend to learn that language. Really easy and nice language...)

Kurko

Re: Dedicated server questions (*topic title changed*)
« Reply #15 on: June 12, 2012, 06:34:07 pm »
Ok, server is up and running...

I think this section is what handles recording (dedicated_control_handler, under controlHandlerDefault):

Code: [Select]
if cfg.RECORD_VIDEO:
try:
#io.messageLog("Running dedicated-video-record.sh, curdir " + os.path.abspath(os.path.curdir) ,io.LOG_INFO)
videoRecorder = subprocess.Popen( ["./dedicated-video-record.sh", "./dedicated-video-record.sh"],
stdin=open("/dev/null","r"), stdout=open("../../../dedicatedVideo.log","w"),
stderr=subprocess.STDOUT, cwd=".." )

There are also two other sections, one of them defines something related to the recorded and it is set to "none". The other is used to stop the recorder when in lobby (?).

From what I can understand, because video_record.sh doesn't exist and the above-mentioned parameter is set to "none" it shouldn't record anything by default. I also set RECORD_VIDEO in config to 0.

Auto-kick function seems to work just as intended.

But one thing I didn't understand is the "admin" feature... there are lots of entries related to it but I didn't find anything that gives admin rights to a player. Is it completely implemented at all?
« Last Edit: June 12, 2012, 06:36:44 pm by Kurko »

miikizzle

Re: Dedicated server questions (*topic title changed*)
« Reply #16 on: June 20, 2012, 01:32:48 am »
Your server is awesome ;)

BUT i think theres something wrong with it at the moment... It doesnt start the game, even there is enough players

SorZ

Re: Dedicated server questions (*topic title changed*)
« Reply #17 on: June 20, 2012, 03:05:10 pm »
I recognized the start problem too, which have made the server kind of empty lately!

I think it would be good if it played Classic every 2nd game, and Rifles every 2nd game to make it 50/50.

And also you should remove lives and put a max kills limit. It's really annoying for new players joining and don't spawning until next game. The flow would be better if they connected during game and spawned immediately. :)

Kurko

Re: Dedicated server questions (*topic title changed*)
« Reply #18 on: June 20, 2012, 04:35:36 pm »
Ok, thanks for notifying me guys, I'm checking it right now... Hopefully it's just a bug.. not a hacking attempt. :P


I think it would be good if it played Classic every 2nd game, and Rifles every 2nd game to make it 50/50.

And also you should remove lives and put a max kills limit. It's really annoying for new players joining and don't spawning until next game. The flow would be better if they connected during game and spawned immediately. :)

I think the mod/preset cycling is random at the moment. The cycler part is quite complex and my programming skills limited but let's see what I can do. I'd also like to remove the mod cycling part completely and make it preset-only, just like voting is now.

And yeah, what you said about lives/max kills is pretty much true. I may change it when I get the server online again.


eeeeeeeeedit: Ok, I think I found it... The last game was played just prior to this error:

Code: [Select]
n: GameServer::StartGame(), mod: Liero v1.0, time: Sun Jun 17 19:17:45 2012
E: level levels/LieroFactory.lxl does not exist
W: level levels/LieroFactory.lxl couldn't be loaded
E: Server StartGame: Could not load the level LieroFactory.lxl
H: Script Dedicated: cannot start game, got error: Could not load level LieroFactory.lxl

...it seems I typoed the map name in configs; it's "Liero Factory.lxl" (note: space) while the newer versions are "LieroFactory<foo>" (note: no space), and this probably caused the controller to hang. Now some fixing, then back online...
« Last Edit: June 20, 2012, 05:29:30 pm by Kurko »

Kurko

Re: Dedicated server questions (*topic title changed*)
« Reply #19 on: June 20, 2012, 07:29:54 pm »
It's online now. Before making radical changes, I'd like to hear other player's opinions on the lives/maxkills thing. Now I just set lives to 7 as 10 lives made the game last a bit too long IMO.

I tried to work out the mod cycle functions and I already noticed that it will sometimes use the "Standard 100lt" weapon set instead of rifles or restricted 100lt. I'd like to rewrite the entire mod selection part but I'm not really sure about my coding skills. :p Now if you want to make sure that you're playing with the "restricted" set (when loading time is 100), just use !mod Classic (it's case-insensitive) to vote for it. When you see loading time 20% it should always pick rifles (which you can also vote with !mod Rifles).
Pages: [1] 2 3 ... 8   Go Up
 

anything