Custom Server

Place for people to discuss public servers, and also for admins to lay out the details of their servers
Post Reply
Betty
Private First Class
Private First Class
Posts: 7
Joined: Mon Jan 20, 2003 1:45 am

Custom Server

Post by Betty »

I got alittle bored and modified the 1.7g0 server a bit, I figure it could use alittle testing although I haven't added anything particularly amazing.

ADDED:
* Ability to choose random world file by specifying "-world *.bzw" (Windows version only)
* Added a "-printfinalscore" just like -printscore, but only prints score out on game end
* Added "-kickongameend seconds" bit of a strange one, it just simply kicks all players from the server once the game is over, as the program can't exit while people are still connected.

that's all I've added so far, not sure if it's any help for anyone. I use it with a batch file like

:start
bzfs -j -g -kickonendgame 5 -printfinalscore -world *.bzw
goto start

well my file is a bit more complex then that, but you should get the idea, basically it starts a new server with random map, then starts a new one when that game is over.

Zip file with updated bzfs.exe & bzfs.cxx here
Betty
Private First Class
Private First Class
Posts: 7
Joined: Mon Jan 20, 2003 1:45 am

Post by Betty »

ADDED:
* -logscore saves playername gamesplayed totalwins totallosses totalteamkills to a file scores.log. can be used to make like a top 10 players list or something.
* started adding random map/wildcard support for linux
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

I'd like to add these to BZFlag:zero as a part of it's normal server if you don't mind.

I also have code that shows how to list the files in a dir on *nix based systems, if you'd like it.

You may want to make a patch and post it on sourceforge, that's the normal place for posting of mods that arn't in the normal CVS tree.

Thanks.
ImageJeffM
Betty
Private First Class
Private First Class
Posts: 7
Joined: Mon Jan 20, 2003 1:45 am

Post by Betty »

yeah go for it, I will probably get around to making diffs for it soon, just was wondering what some of the feedback was like first, I have updated it alittle since my last post, don't think it really does anything else, just changed it to use vectors instead of my own crappy link lists, shortens my code a bit.

I have code to get *nix systems files (opendir), but the problem is that when you pass an argument like *.bzw it doesn't pass it as a string it passes the names of all the files instead, where as windows passes just *.bzw allowing the program to do the rest, I might have to change my commandline argument.

Thanks for a bit of feedback anyways :)

I'm probably gonna add a bit more to it, if I can think of anything (any ideas?) I dont' particularly want to mess with the client code at the moment but server stuff I'm willing to give a bash at it.


Added diff to sourceforge (hope I did it right "diff -ru oldfile newfile"??)
should be
here
User avatar
purple_cow
Private First Class
Private First Class
Posts: 63
Joined: Sun Dec 15, 2002 9:24 pm

Post by purple_cow »

You could still use * within your code if you make it a requirement to pass \* to bzfs. The issue is that the shell is globbing the * and turning it into a list of files. \* prevents this.
Betty
Private First Class
Private First Class
Posts: 7
Joined: Mon Jan 20, 2003 1:45 am

Post by Betty »

sweet, guess I'll go compile it on my linux box and try this then =D
Post Reply