Guide on How to Run a BZFlag Server on Mac OS X

Need help seting up a server, or have a question on how to run one? This is the place.
User avatar
CannonBallGuy
Private First Class
Private First Class
Posts: 2083
Joined: Wed Apr 12, 2006 1:31 am
Contact:

Guide on How to Run a BZFlag Server on Mac OS X

Post by CannonBallGuy »

This is a disk image of 4 files: A Map, a configuration file, and a file containing the command you need to use to run bzfs, plus a file with all the instructions. :twisted:

http://cbg.bzflag.org/stuff/ServerHelpPack-MacOSX.dmg

Please note: This is kinda like the Beta Version.
If you notice any mistakes, errors, etc, let me know! :)


You can see the instructions here:

How to run your own server on Mac OS X!

This document will simply get a server running on your mac. I do not try to explain how/why things work, just what you need to do.

Included in this folder are 3 files:
1. map.bzw - This is the map file!
2. conf.conf - This is the configuration.
3. bzfs.txt - This file contains the command you need to run to start the server.

What to do:

Before you start, move the three files (not this one) into your home directory.

1. The map file included is a simple map with examples of a mesh box, mesh pyramid, material, physics driver, arc, cone, sphere, tetrahedron, teleporter, link, base, world weapon and zone.
Pretty much everything has a "#" in front of it. This makes it a comment so it is not actually used on the map. The best thing you can do is take out the "#" a few at a time and see what happens when you mess around with the settings.
To learn more about making maps, go to:
http://my.bzflag.org/cgi-bin/man/man2html?5+bzw
http://www.kapsi.fi/~jpa/stuff/bzw/
http://www.bzflag.org/wiki/BZEdit_20Tutorial

2. The configuration file has all the options in it, but again, many are commented out with a #. Like with the maps, try taking a few of these out and change the settings...
To learn more about configurations files, go to:
http://bzflag.bz/man/bzfs.html
http://cvs.sourceforge.net/viewcvs.py/b ... ml?rev=2.2

3. The bzfs.txt file contains the command to make the server run.

Now I will explain what to do:

a) Find and open the application called "Terminal" in /Applications/Utilities/ .
b) It should say "Welcome to Darwin! Your-Computer:~ YourName$" Or something similar...
c) Type this "./bzfs.txt" and press return. It should say "-bash: ./bzfs.txt: Permission denied". If it does not, it might print out loads of stuff like:
require UDP clients!
using spam time of 5
using spam warn amount of 4
style: 6b
... etc
If it does that hopefully it will end up saying "Map size: uncompressed = 1625, compressed = 503" which means you'r server is now running!
d) If it gives you the "permission denied" error, type this: "chmod 777 bzfs.txt" and press return. It should not say anything, just print a new line looking like the original "Your-Computer:~ YourName$".
e) Now type "./bzfs.txt" and press return. Now it should say stuff like:
require UDP clients!
using spam time of 5
using spam warn amount of 4
style: 6b
... etc
If it does that hopefully it will end up saying "Map size: uncompressed = 1625, compressed = 503" which means you'r server is now running!


To get the server running PUBLICALLY you need to edit the following things in the conf file:

i. Change "# -p [PORT]" to "-p PORT" where "PORT" is the port you have open on your router and/or firewall. For help with this, see http://www.PortForward.com

ii. Change "# -publicaddr address[:port]" to "-publicaddr YOUR-IP/DOMAIN:PORT" where "YOUR-IP/DOMAIN" is either you'r external IP or the URL you have pointing to it. For help pointing an url to your Ip, see http://www.dyndns.org or http://www.no-ip.com.

iii. Change "# -public * Yay. I got my server on the public list!" to "-public YOURMESSAGE" where YOURMESSAGE is what you want to appear next to your IP/URL on thepublic server list.

iv. If the above 3 things still don't get you on the list, you may be behind some kind of proxy. To solve this, change "# -publiclist http://my.BZFlag.org:81/db/" to "-publiclist http://my.BZFlag.org:81/db/".


If you get any errors that I havent mentioned, please go back to where you got this from, or my.bzflag.org/bb and ask!

Enjoy!

© 2005 CannonBallGuy - All Rights Reserved!
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

It must work

Post by optic delusion »

It must work CBG, theres at least four new servers this weekend.
I helped skunkworker use your help, to set up a server in 24 hours. It took me six days.
It must be nice to have all the answers in one post, ready for easy inspection.
Coming soon, a bzflag server for every registered player...
Your post should start... The first question to ask yourself is "Does the world really need a new bzflag server?" seriously, look at the list, 90% have no players at them.

I like the sample conf file provide by JeffM (I think thats who made it) alot better than yours though. It is easier to read.
It's in SirPants' post in this forum. All mac users might also want to peruse the thoughts of SirPants and BinarySpike. Their efforts should not be forgotten.

I may have missed it, but does it say to open ports for BOTH tcp and udp?
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Guest

Post by Guest »

Thanks. :)

I will try to update this on Thursday.
EDIT: Uhh... I will do it. Honest!

So everyone, if you see any kind of error, mistake, or think there is something missing, please post it here!
I may have missed it, but does it say to open ports for BOTH tcp and udp?
It should say that - I seem to remember typing it somewhere. :P
Last edited by Guest on Fri Jun 10, 2005 11:02 am, edited 1 time in total.
Guest

Re: It must work

Post by Guest »

A-Delusion wrote:I helped skunkworker use your help, to set up a server in 24 hours.
What did you have to help with?
A-Delusion wrote:Your post should start... The first question to ask yourself is "Does the world really need a new bzflag server?" seriously, look at the list, 90% have no players at them.
Yeah, I'll try to include something like that in the update.
A-Delusion wrote:I like the sample conf file provide by JeffM (I think thats who made it) alot better than yours though. It is easier to read.
Whats the difference between his and mine? Where is Jeff's?
A-Delusion wrote:All mac users might also want to peruse the thoughts of SirPants and BinarySpike. Their efforts should not be forgotten.
Yes. I am not the only person to have gotten bzfs to work on a Mac and I didn't do it all on my own, that's for sure. :P
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

extension conf is not allowed on forum

Post by optic delusion »

Yeah, say that step 1 is to decide that you really want to do this, step 2 is to find at least one person who has already run a server, to help.


Skunkworker didn't need alot. He contacted me around 8pm with alot of questions. after 6 PrivateMessages I finally got him to send me his conf. He was getting syntax errors with your conf. ...But he also had all of his variables set, was using an untested map, rabbit chase, and 20 shot limit. So I'm NOT saying your conf is bad.
You should mention that sending a conf through the forum is not allowed, it must be converted to plain text.
I told him to scrap his current conf. sent him this one, and told him to run it stripped down, no vars, no rabbit, no map even, just go with the most basic possible conf, until it's publicly listed. Only then mess with all that.

The next day, he had his router open for TCP, but not UDP. Once we fixed that, thru portforward.com, everything was just great. I told him to save that conf for posterity, and have fun. I mentioned to use the shutdown command, instead of just closing the terminal, and told him that that player who keeps trying to join and can't is the listserver. I told him when changing things, do one change at a time, test it, make one more change test it, etc. so that he knows where he went wrong. That's an excellent strategy fo a beginner.

His only question since has been how to create his admin group. I told him he has to formally register the server first, then ask JeffM2501 for .admin access.

Skunkworker got it done in 22 hours, it took me six days two weeks earlier. Mostly because you brought all the links togther, and he didn't have to search all over for links that may or may not help.

Here's the sample conf, I still haven't found out fersure who wrote it. Think it was JeffM, but whoever it was I'll bet he had help. Notice how few lines are not commented out in the sample conf, you can run a server with just a few lines of text.
I still use the sample as my regular conf, for all the six maps I run. It removes all confusion, I can compare two confs right next to each other. .....It's always the same. If I send it to someone, they know exactly where I went wrong. There's alot of reasons it's good to use the sample.
...if your looking for a specific part of it, just use command-F
Attachments
bzfsconf.txt
stripped down
(11.96 KiB) Downloaded 515 times
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Deactivated User 3012
Private
Private
Posts: 1
Joined: Fri Oct 28, 2005 11:59 pm

Post by Deactivated User 3012 »

The easiest way to get a server up is to use A-Delusion's bzfsconf.txt and change the filename in get info to a .conf, then open is back up in textedit, and to use the creating a server mac and windows(i had to re-post it Download) And make sure all of your connections work too! UDP and TCP, especially if you have a router nad do it in mac os x:prefrences:sharing(if it is even on).

then move bzflag into your directory here:
/users/yourname/
then type this is a new shell in terminal
cd ~/bzflag-2.0.2.app/contents/macos
stay there^

also make a folder for maps and conf files in your directory, if so and you have edited the .conf and have a map ready, copy this into the shell in terminal you edited above.
./bzfs -dd -conf /users/yourname/conf/name.conf
and change yourname to your name, and name to the name of the .conf. This should work pm me if it doesn't.
Guest

Post by Guest »

Uhh, what error did you get with my conf?
If you follow the instructions, it works fine.
Believe me. I just tried it.

It's the full conf from the man page, except I have commented out a load of it...
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

like i said

Post by optic delusion »

Like I said, he had all kinds of variables set and was getting syntax errors. I wasn't gonna go all thru it looking for one letter that was supposed to be a capital. I barely looked at it, and told him to start over with the new one. What he actually did to fix it I don't know.

Your conf may actually be better, CBG, I just like my conf because it's the one I use and know.
Last edited by optic delusion on Fri Jun 10, 2005 6:41 pm, edited 1 time in total.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Guest

Post by Guest »

Well, mine should include every possible option (even if loads are commented out) each with a description and it works... Honest... :)

People please please post any error, no matter how small.
Also feel free to make suggestions.
I will try to make the full, final version next week. :)
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Evolution

Post by optic delusion »

I still say we go to the conf that I use. It's more complete, but has more commented out, it's bare-bones basic, which is what a newb needs.
In your current sample conf, you need to uncomment one of the debug levels.



Two people got our so-called help this week. here's the links.

the first was a pro, really only needed help with variables, might come back if he decides to serve publicly.
http://my.bzflag.org/bb/viewtopic.php?p=40691#40691

the second was something else....funny
http://my.bzflag.org/bb/viewtopic.php?t=4306
I wrote a summary, at the end of the second day, be sure to check it.

here's the really important part of the summary:
Every time we try to help a newb, theres about ten posts before we know exactly where they stand.
We have to make a checklist, that we can put in the helpfile, and they can just send it backto us, so we can QUICKLY figure out EXACTLY how far along they are. Something like this...

0. Has your Profile been truthfully entered? Y/N
1. System_________
2. OS___________
3. Tell us, in your own words, what you hope to accomplish_______
4. Have you ever made or attempted to make a map Y/N
5. What kind of modem do you have DSL or Cable - Upload speed? ___
6. Exact Brand and model number of Modem_______
7. Do you know how to send your conf file to us? Y/N
8. Do you have a map in mind, Y/N Is it simple or complex?
9. What kinds of computer experiance do you have?__________
~~~~~~~~~~~~
17. What is your IP?______
18. Do you have your modem's password? Y/N
19. Will your mommy give it to you? NO









Last edited by optic delusion on Thu Jun 30, 2005 3:56 am, edited 2 times in total.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
User avatar
BinarySpike
Corporal
Corporal
Posts: 735
Joined: Mon Mar 28, 2005 11:58 pm
Contact:

Post by BinarySpike »

CBG wrote:Also feel free to make suggestions.
If anybody needs help.. Windows, or Macintosh Just PM me....
(I use mac but I just got a friend to "almost" host a server on windows...)

Or catch me on AIM or BW.
(AIM: iBinarySpike, BW: BinarySpike)

www.bitwiseim.com
(for BW... BitWise... it's a great program)
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Binary-

Post by optic delusion »

Me and Cannonball have been collaborating on this "Server Help Pack" for awhile now, so far at least three have used it.
We want to keep it current, and make some improvemeants
BinarySpike if you'd like to take a look at it, and make some suggestions, we would be thankful to you. Our experience is completely macintosh.

The next big update is some weeks away, however.....
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Guest

Post by Guest »

Well, actually. The next update could be next week.
I finished my exams yesterday, so after my prom tonight (and probably tomorow morning...) I will be free.
Guest

Post by Guest »

Okay. I posted this in one of the posts Delusion mentioned, but here it is again:

This is a simple/basic conf which won't run your server publically:

Code: Select all

#
-admsg "Remember: Now swearing, cheating or teamkilling. Be nice and enjoy you'r stay!"
# Define a message which will be broadcast to all players every 15 minutes. This option can be used multiple times to define a multiline message.

#
-autoTeam
# Automatically assign players to teams when they connect so that there are an equal number of players on all available teams. Players are placed on teams that have the fewest players; otherwise they will be placed on the weakest team. Weakest team is the team with the lowest combined kill ratio.

#
-ddd
# Increase debugging level. If more -d is given, more debugging info is obtained.

#
+f GM{10}
+f V{10}
+f J
+f R
# Disallows random flags of the given type. Required flags given by the +f option are still provided. The bad argument is equivalent to specifying -f once for each kind of bad flag. Same goes for good, but you probably do not want to do that. An example of running a server with 40 to 50 flags except genocide would be "+s40 -s50 -f G". Similarly, "+f good{40} +f bad{10} -f G{40}" would give you exactly 40 good flags except genocide and 10 of each bad flag.

#
-j
# Allows jumping.

#
-ms 5
# Allows up to shots simultaneous shots for each player. This is 1 by default.

#
+r
# Makes most shots ricochet. Super bullets, shock waves, and guided missiles do not.

#
-world map.bzw
# Reads a specific BZFlag .bzw world layout file for the game map.
I will include this in the revised Guide Pack.
n1mie
Private
Private
Posts: 3
Joined: Tue Jan 25, 2005 1:01 am

Limited Success

Post by n1mie »

I had limited success in implementing your suggestions. One important tidbit not mentioned in this thread which is required is to tell your computer to allow connections on the port you will be using (Sharing Preference Pane).

I'm having another problem. I saved a couple of the worlds out there that I liked to make use of them at home, but I haven't been able to determine how to get textures working (otherwise they are fine). The map files reference a texture in a web format ("http://..."). I changed this to a file reference ("file:///") and it didn't work, even with a complete and explicit path. I suppose I could put the textures on a web space I own, but there must be a way to reference them locally. The ones I have are in PNG format, I tried JPG and BMP with no success.

Thoughts?
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

tidbit

Post by optic delusion »

That does seem like an important enough tidbit to be added. Thanks for bringing it to our attention.

CBG's guide is primarily for public servers. I'm assuming you want to run on a LAN? I can say that BZFlag ONLY uses .png format. I suggest you take your question to a mapmaking forum.
here is one quick link
http://my.bzflag.org/bb/viewtopic.php?t=3418



A-Delusion snaps to attention, and smartly salutes Brigadier Genaral CannonBallGuy.
heh, i just made ensign too. I want a custom rank of DareLicked Of Dooty.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Guest

Post by Guest »

Yeah, thanks for the info n1mie. I really need to update this now. I just never seemt o get around to anythng these days. :x
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

...So are you gonna use my conf file CBG?

Post by optic delusion »

...So are you gonna use my conf file CBG?
I think you should, it has all the optiions, full comments, and the only things not commented are necessary for the server. I have a version I've added even more comment to. The more #comment the better for a newb. Perhaps there should be two confs. One for a public server and one for map testing.
Yours does have a couple small bugs, the debugging bug is ironic.

What do you think of my checklist? Do you want me to correct it? I have a full version of that too.

I will say that it's pretty dam good!
When the first question they have is about textures, you've got it pretty well figured out! What's really impressive is that three times now, guys have had a server running by their second-ever post. I think that without this post, they might never have even tried. Just having it all in one place is 90% of the battle.
I remember searching around for all this stuff, trying to get a server up, just days before this was posted. What killed me was....I'd search for an hour, looking for something that applied to my problem, and I'd find something that halfway applied, then that would send me off on some strange tangent, and I'd end up further lost.
Woops! Now I gave away the secret to the way I still get all my work done. roflmao.

Another thing.... we should get people to modify you're guide for the other OS's There would then be an explosion of servers! Four players on one server would be crowded.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Another One

Post by optic delusion »

http://my.bzflag.org/bb/viewtopic.php?t=4723&highlight=

Check that guy, his first-ever post is to announce his server. And he's running a mac....I'd bet a billion pounds he used your guide, CBG!









Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Guest

Post by Guest »

Send me your conf, checklist and anything else you have. :) I can try to work on it through next week.
User avatar
DTRemenak
General
General
Posts: 625
Joined: Thu Jan 16, 2003 4:54 am
Location: U.S.
Contact:

Re: Limited Success

Post by DTRemenak »

n1mie wrote:I'm having another problem. I saved a couple of the worlds out there that I liked to make use of them at home, but I haven't been able to determine how to get textures working (otherwise they are fine). The map files reference a texture in a web format ("http://..."). I changed this to a file reference ("file:///") and it didn't work, even with a complete and explicit path. I suppose I could put the textures on a web space I own, but there must be a way to reference them locally. The ones I have are in PNG format, I tried JPG and BMP with no success.
The textures need to be accessible from the CLIENTS. Therefore they need to be published somewhere that the clients can find them...http and ftp are supported.
Guest

Post by Guest »

I'm trying to work on the revised package this weekend...
But, knowing me, I will get distracted and will forget all about it.. :( lol
Legolas_
Private First Class
Private First Class
Posts: 513
Joined: Thu Jan 20, 2005 10:24 pm

I got an error

Post by Legolas_ »

hey i get an error and it says resource temeraroly unavialible when i enter the stuff into the terminal
what should i do?
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Help

Post by optic delusion »

We need more information to know what the problem is.

I can say that I've never seen this problem before (resource unavailable). sounds like you put your mapfile into another user's folder or something. Maybe you don't have root access.
Exactly what "stuff" are you entering into the terminal? post the entire text of the terminal please.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.
Legolas_
Private First Class
Private First Class
Posts: 513
Joined: Thu Jan 20, 2005 10:24 pm

Post by Legolas_ »

ok i drag the bzfs file into the terminal and press enter. It says: /applications/bzflag/bzfs.txt: fork: Resource temporarily unavailible

:( what am i doing wrong?
Post Reply