Mapmaking with a text editor

All things BZFlag - no [OT] here please
Post Reply
Phyvo
Private First Class
Private First Class
Posts: 12
Joined: Thu Mar 04, 2004 1:11 pm

Mapmaking with a text editor

Post by Phyvo »

Is it possible to make an entire world/map using just a text editor? Is there are tutorial for this, or any general help at all?

Also, can my Mac dl a map from sourceforge and then run it? Where would I need to place the map?
User avatar
sid6.7
Private First Class
Private First Class
Posts: 613
Joined: Mon Oct 06, 2003 9:58 pm
Location: West USA
Contact:

tutor

Post by sid6.7 »

there is no real tutorial left casue shellshock website is
gone, but there is some limited information at my site
click on the WWW link below this msg...i also link to tims
site which is setup for better reading...


basically your gonna just have to make a map on your own
do like i do...make an aempty map then add in 2 boxes or
so and 2 pyramids or so and 2 teles on opposite sides of
the mapand at least 2 links..then go look at it...

here is a box:

box
name <|b86|0|1>
position 298.5 -38 120
size 38.5 2 20
rotation 0
end

here is a pyramid:
pyramid
name <|p4>
position 159 -168 0
size 20 20 20
rotation 0
end

here is a tele:
teleporter
name <|t6>
position -339 0 140
size 0.125 10 10
rotation 0
border 0
end

here is a link:
link
name <|l0>
from 0
to 4
end

each tele has 2 sides Back and front so 2 teles linked together
would = 4 links...back to front both directions

here is making the world size:
or dont have it and go default size

world
size 500
end

here is a world weapon:

weapon
type SW
position 10 20 0
rotation 90 <direction it fires
initdelay 3 <starting time after server starts
delay 1 2 1 3 <fireing pattern in seconds...
end

you might ask grumbler or trepan or purple panzer
or patlabor they know alot about maps..
Image

doing my uttermost best to make jeffm2501 pop a blood vessel or cry..which ever comes first..

BZrand Random map maker 6.4 , BZchecker map validator 1.5
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

Hi Phyvo,

I actually do all of my maps with a text editor,
but i also have a parser program that i use to
help me (bzmapper). it compiles cleanly on linux
and windows, and would probably be a 5-10
minute job to port it to MacOSX (I hope). If you're
interested, I can send you the source. If you're
interested but wouldn't know how to port C code,
then maybe you could find someone else that I
could send the source too.

In addition to the commands and keywords in
sid6.7's paste, there are also a couple of other
ones:

base
position 1 2 3
size 3 4 5
rotation 30
drivethrough
shooththrough
color 1 # 0=rogue, 1=red, 2=green, 3=blue, 4=purple
end

If you want an upside-down pyramid (in bzflag 1.10.x),
you have to use the keyword 'flipz', or make the Z size
parameter negative

pyramid
position 1 2 3
size 3 4 5
rotation 45
flipz # flip it
#
# you could also achieve the same effect with:
# size 3 4 -5
#
end

The teleporter size parameters are a bit messed, and
probably not exactly what you would think. Patlabor
has a really good link on his bzedit site that describes
the teleporter size dimensions:

http://www.artemisgames.com/BZEdit/Tuto ... al1/TP.gif

happy mappin',
trepan.

P.S. note that the X and Y size parameters are half-widths.
Phyvo
Private First Class
Private First Class
Posts: 12
Joined: Thu Mar 04, 2004 1:11 pm

Post by Phyvo »

Okay. A few more questions. What is a world weapon? Is it an AI-controlled thing (I haven't come across it)? What's with the type thing?

What are the default dimensions in a world? What is the height one would need for a player to be able to jump up on top of an object (say, a box)? Why is the box's name so long (is it so that it can have multiple names?)?

In my experiance, I have no idea why a drivethrough or shoothrough base would be different from a default one. What's the difference?

And finally, how can I implement the map that I make?

My questions seem endless to me, thanks for answering.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5195
Joined: Fri Dec 13, 2002 4:11 am
Location: https://github.com/OmniTanks
Contact:

Post by JeffM »

a world wepon is a weapon that fires on a timer by the map some maps have them. Check the help on bzfs for some info.

world is +-400 by default

tanks can jump 18.5 units. tho it's best to make boxes 15 units to make the jumps manageable.

box names are up to you. they are not used really.

All objects have the drive and shoot thru options it's part of the core object class, and yes some don't make sense.

to run your map run a server with -world YOURMAPNAMEHERE then connect to it and you will see your world.
ImageJeffM
User avatar
sid6.7
Private First Class
Private First Class
Posts: 613
Joined: Mon Oct 06, 2003 9:58 pm
Location: West USA
Contact:

info

Post by sid6.7 »

again one of the places to go is my WWW button below
this msg...then stay there and read stuff or go to tims
link on that page his is more readable and has more of the new stuff on it...
Image

doing my uttermost best to make jeffm2501 pop a blood vessel or cry..which ever comes first..

BZrand Random map maker 6.4 , BZchecker map validator 1.5
Phyvo
Private First Class
Private First Class
Posts: 12
Joined: Thu Mar 04, 2004 1:11 pm

Post by Phyvo »

Patlabor221 wrote: to run your map run a server with -world YOURMAPNAMEHERE then connect to it and you will see your world.
Are these instructions for Mac os X? I tried to get bzflag to ru in windowed mode awhile ago, using a similair setup, and it didn't work. I know that the server is somewhere in the package, but how do I give it and the other programs the dang arguements? And is it possible that I could just put the map in a certian place and then I can select it from within the game's own server making thing?
User avatar
Fiberchunks
Administrator
Administrator
Posts: 397
Joined: Tue Dec 03, 2002 5:58 am
Location: Groton, CT

Post by Fiberchunks »

Phyvo,
The MAC OSX gurus (afaik), are learner, and JBDGriz.

I would try to contact them on IRC (learner also goes by brlcad on IRC). The server is irc.freenode.net:6667, and the channel is, surprisingly, #bzflag.

Peace
Fiber
Great spirits have always encountered violent opposition from mediocre minds. -- A. Einstein
Registered Linux User: 296546
Machines: 181776 181777 181778
User avatar
learner
General
General
Posts: 270
Joined: Sun May 11, 2003 2:06 am
Location: Maryland
Contact:

Post by learner »

Phyvo wrote: [snip snip]
Are these instructions for Mac os X? I tried to get bzflag to ru in windowed mode awhile ago, using a similair setup, and it didn't work. I know that the server is somewhere in the package, but how do I give it and the other programs the dang arguements? And is it possible that I could just put the map in a certian place and then I can select it from within the game's own server making thing?
Those instructions indeed are for Mac OS X. You will have to face the UNIX side of Mac OS X if you want to run a public server or even a private server that goes beyond the options provided on the Start Server menu (there are _many_ options not provided on that menu). The only difference between Mac OS X and one of the other UNIX ports (Linux for example) is that bzfs is stuffed up into the application bundle directory.

That is to say that if you have installed 1.10.4 in your Applications folder, you can directly interact with bzfs by running the following command in the Terminal app (in your Utilities folder):

/Applications/BZFlag-1.10.4.app/Contents/MacOS/bzfs -help

You'll get a couple pages of help back on all of the various bzfs options. Exactly what options you want or need is left as an exercise to the reader..

If you just want to run a private server, you can avoid the whole UNIX side of things and do exactly what you asked about of just dropping the bzw world file into a directory. With 1.10.4, if you put the .bzw world file into either your data directory or your ~/.bzf directory, you will be able to select it in a drop down on the Start Server menu.

To make the world available to multiple users that may start a server, you will need to put the world in your data directory. If you right-click or control-click the application icon, select "Show Package Contents", go to Contents, go to Resources -- you can drop the world in there.

To make the world only available so that you can start a server, you can put the world in your ~/.bzf configuration directory (i.e. the .bzf folder in your home directory). Open up Terminal and type:

open ~/.bzf

and you'll get a Finder window that you can drop the .bzw file into.

Either location should suffice your needs, but again, that is only if you want to run a private server. It's more involved to set up a public server and you have to be familiar with at least some command-line basics. Hope that helps some.

Cheers!
Phyvo
Private First Class
Private First Class
Posts: 12
Joined: Thu Mar 04, 2004 1:11 pm

Post by Phyvo »

Okay, I went and made a map file. It's just .txt, though later I changed it to .bzw. I'm having trouble setting it up at all. I dropped the world in the resource folder, but I couldn't select it in-game, and the terminal wouldn't run it when I just ran the server on default settings with "-world." It just kept on saying it couldn't find the world file, no matter what I tried. I can't seem to open ~/.bsf, because it says it doesn't exist.

I am familiar with some command line basics (such as "cd", "ls", and "open"). I guess I pretty much just need more detail or something. Either that, or I'm just missing something.

Some examples of what I've tried:

".../Contents/MacOS/bzfs -world 'blockfort.bzw'"
".../Contents/MacOS/bzfs -world '/Contents/Resources/blockfort.bzw'"
User avatar
learner
General
General
Posts: 270
Joined: Sun May 11, 2003 2:06 am
Location: Maryland
Contact:

Post by learner »

Phyvo wrote:Okay, I went and made a map file. It's just .txt, though later I changed it to .bzw. I'm having trouble setting it up at all. I dropped the world in the resource folder, but I couldn't select it in-game, and the terminal wouldn't run it when I just ran the server on default settings with "-world." It just kept on saying it couldn't find the world file, no matter what I tried. I can't seem to open ~/.bsf, because it says it doesn't exist.

<snip>

".../Contents/MacOS/bzfs -world 'blockfort.bzw'"
".../Contents/MacOS/bzfs -world '/Contents/Resources/blockfort.bzw'"
It doesn't matter really what you name it. And the bzflag config dir was ~/.bzf not ~/.bsf .. ;) But you had to be using 1.10.4 for either .bzf or the Resources dir to work. Try to get the command line one to work first, though.

1) Put the bzw world file into your home directory.

2) Run: ls ~/world.bzw

Replace world.bzw with whatever the name of your world is, of course. But if that returns an error, you have to fix that first. Most likely error is that you don't put it in your home dir. Assuming it doesn't return an error...

3) Run: ...yadayada.../Contents/MacOS/bzfs -help

If it doesn't dump out a couple screens of bzfs help, then you're running the wrong ...yadayada... and you have to fix/find that problem first. Assuming you get that to work..

4) Run: ...yadayada.../Contents/MacOS/bzfs -world ~/world.bzw

Assuming steps one through three worked, the last should work. If any step doesn't work, copy-paste and post what you tried and the resulting error. Best of luck.

Cheers!
Phyvo
Private First Class
Private First Class
Posts: 12
Joined: Thu Mar 04, 2004 1:11 pm

Post by Phyvo »

okay, I have a problem still. I've got my server up and runnng like that, except that in the middle of tweaking my map, the whole thing just stopped working. The terminal's behavior didn't change, but I couldn't connect to myself. Apparently bzflag can no longer see my (terminal) servers. Any help?
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

can you attach the map? if the map was the
only thing that you've changed, then i've had
similar problems. it can be caused by lack of
spawn locations and invalid numbers (infinity,
nan, etc...)
Phyvo
Private First Class
Private First Class
Posts: 12
Joined: Thu Mar 04, 2004 1:11 pm

Post by Phyvo »

Okay. Here it is!
Attachments
blockfort.bzw
My map
(1.55 KiB) Downloaded 59 times
trepan
Dev Wizard
Dev Wizard
Posts: 704
Joined: Fri Feb 21, 2003 7:50 pm

Post by trepan »

sorry I didn't get back to you earlier.
I found your problem, in row 79, you've
got:

position 140.6 14

the bzfs parser get's stuck because position
needs 3 numbers, instead of just two. you
probably wanted:

position 140.6 0 14

P.S. interesting object names :o)
Post Reply