Ramps & Other Things

General talk about the map making process.
Post Reply
JamesCRocks
Private First Class
Private First Class
Posts: 6
Joined: Thu Mar 19, 2020 4:52 pm
Location: Kent, UK
Contact:

Ramps & Other Things

Post by JamesCRocks »

Hi,

So I'm trying to design a map.

I had it in mind to design a chasm with bridges between each edge so teams could shoot across at each other but could potentially travel across the bridges to attack. I discovered the waterlevel parameter which is cool except that a tank starts it seems it always has to start in the water and not on any building. Is there a way I can dictate where tanks start? It would be even nicer if I could dictate where a tank starts on the basis of its team membership (this might not be a map thing).

Then there are ramps that the tanks can climb. Are these possible in BZFlag?

Thanks

James
James C Rocks, Author & Blogger
"Common sense is the collection of prejudices acquired by age eighteen." Albert Einstein
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Ramps & Other Things

Post by blast »

If you're using water level, make sure to provide the bzfs options -sb and -fb to allow tanks and flags to spawn on buildings. If you also want to control where tanks can spawn (including where specific teams can spawn), there is the zone map object.

And no, BZFlag doesn't really support ramps. People have used physics drivers to somewhat create that effect, but it doesn't generally work too well. Tanks can drive up small bumps, but I believe that only works for certain types of objects, possibly the classic boxes. There is a _noClimb variable that can be set to 0 (-set _noClimb 0) that allows tanks to "climb" a slope by jumping, but it's still not just driving up a slope.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
Zehra
Private First Class
Private First Class
Posts: 914
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: Ramps & Other Things

Post by Zehra »

Ramps or inclined planes may be "simulated" to an extent, either with the "noClimb" variable, physics or via the bumpable attribute of certain objects.
Depending on the map or design, usually either one or a combination of the above tends to be used to create that effect.

For water, either the non-deadly or moving version, it's done with a textured object or drawInfo.
Depending on the desired result/map maker, usually either boxes or custom meshes tend to be used for water.
Also "dynamic color" has be used for a few moving objects and water, but happens to be far more complex and difficult to implement.

Tank spawning can be adjusted with either spawn zones or a plug-in, but spawn zones tend to be much easier and faster to work with.

Assuming it is a CTF map, if you wish for tanks not to spawn on their base on capture or upon first joining, the following may be added to the map file.

Code: Select all

world
freeCtfSpawns 
end
This will cause tanks to spawn randomly and not on their base if their flag is captured or upon joining the server.
Spawn zones can be used in combination with this option as well.

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Ramps & Other Things

Post by blast »

Zehra wrote: Sun Mar 29, 2020 10:16 pmFor water, either the non-deadly or moving version, it's done with a textured object or drawInfo.
Depending on the desired result/map maker, usually either boxes or custom meshes tend to be used for water.
Also "dynamic color" has be used for a few moving objects and water, but happens to be far more complex and difficult to implement.
I think you're confusing a few things here. I don't think drawInfo would serve a use here nor would dynamicColor. If the goal is to just visually have water, but not making it deadly, then yes, a textured box or mesh could be used, with an optional textureMatrix to make the texture move.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
tainn
Private First Class
Private First Class
Posts: 278
Joined: Sun Nov 18, 2018 7:25 pm
Location: phantom_zone;

Re: Ramps & Other Things

Post by tainn »

To have full control over where a team's tank spawns, use the zone object, as blast recommended. To control spawns, pass in the team parameter. This is generally specified in the bzw file.

Code: Select all

zone
position 0 0 0
size 0 0 0
rotation 0
team 1
end
As you might have noticed, I used the value 1 at the team parameter. That is because teams are expressed in values most of the time. This is the sheet of team-value mappings:

Code: Select all

0 is rogue
1 is red
2 is green
3 is blue
4 is purple
5 is observer
6 is rabbit
7 is hunter
8 is 'cyan' and also 'last color'
The ones of interest to you will likely be between and including values 0 and 4.
User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 809
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: Ramps & Other Things

Post by allejo »

For maps that used the physics method that blast mentioned in his post, take a look at flying_popcorn's Elevators & Escalators map and his post about ramps in maps.
Post Reply