Spawn plugin

Discussion for Leagues United players
Post Reply
click click boom
Private First Class
Private First Class
Posts: 154
Joined: Fri Nov 13, 2009 7:53 pm

Spawn plugin

Post by click click boom »

Could we have a revised spawn plugin?its rather frustrating when you’re attacking and you kill a defender after minutes of a fight but shoot and kill him in the air and the enemy respawns under you to just kill you. I find it highly unfair.

https://expirebox.com/download/eef5db53 ... 20ad4.html
click click boom
Private First Class
Private First Class
Posts: 154
Joined: Fri Nov 13, 2009 7:53 pm

Re: Spawn plugin

Post by click click boom »

Any admins or LU council care to comment?
User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 809
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: Spawn plugin

Post by allejo »

There's no custom spawning plug-in used on LU, it's just using bzfs' built-in spawn algorithm. The problem with moving this to a plugin is that plugins don't know the world so it'll likely spawn you inside objects. This isn't something LU can change, it'd have to happen with bzfs itself and I don't feel like it'd be a priority to change this aspect of bzfs at the moment.

I think you're just unlucky about other players spawning close to you :)
click click boom
Private First Class
Private First Class
Posts: 154
Joined: Fri Nov 13, 2009 7:53 pm

Re: Spawn plugin

Post by click click boom »

it happens more often than not, and not just to me either obv. I understanding the complexity with the matter and I know a current plugin isn't used but I figured I would ask.

What I would expect from this plugin isn't a new spawn code but the plugin wouldn't allow an enemy tank to spawn within a certain proximity of another enemy tank. Not sure if this is even possible. So bzf would say tank spawns at "x" location and plugin would say no due to an enemy tank being at "x" location and being to close.

Thanks for the reply
User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 809
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: Spawn plugin

Post by allejo »

The way bzfs and plugins interact simply put is the following:

bzfs chooses a safe spawn location so it doesn't spawn players inside objects or close to enemies.
bzfs says, "Hey plugins out there! This is where a player will spawn. Cool?"
A plugin can now say, "Sure!" OR "No! I don't like this position. Trust me and spawn the player at this position instead."
bzfs then says, "k. i trust you, plugin"

A plugin can't tell bzfs to "hey. no. calculate a new position."

bzfs is supposed to take enemy positions into account, but as seen, it's not perfect. And, it's not easy to replicate these unlucky spawns so debugging the process would require a lot of time and effort.
click click boom
Private First Class
Private First Class
Posts: 154
Joined: Fri Nov 13, 2009 7:53 pm

Re: Spawn plugin

Post by click click boom »

ahhh ok. understood!. I thought if the plugin says "no" bzf would then try for a new spawn
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: Spawn plugin

Post by JeffM »

allejo wrote: Mon Mar 19, 2018 6:50 pm A plugin can't tell bzfs to "hey. no. calculate a new position."
Except that it can, I put a function in just for that case.

BZF_API bool bz_getStandardSpawn ( int playerID, float pos[3], float *rot );

If you have at test for what you feel is an undesriable spawn, you could check the computed spawn, then if you don't like it, make a loop calling
bz_getStandardSpawn until one you like does get computed. That will take geometry into account.

The issue is not one of computing spawns, but one of knowing if a spawn is "good" or "bad". That knowledge is somewhat subjective and difficult for a computer to determine.

If for instance you wanted to ensure that no spawn was closer than 50 units to any other player, that is a trivial test to write, and could force BZFS to recompute spawns until that happens. Or compute 10 of them and use the one furthers from any players, stuff like that is easy.
ImageJeffM
User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 809
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: Spawn plugin

Post by allejo »

JeffM wrote: Tue Mar 20, 2018 3:45 am
allejo wrote: Mon Mar 19, 2018 6:50 pm A plugin can't tell bzfs to "hey. no. calculate a new position."
Except that it can, I put a function in just for that case.

BZF_API bool bz_getStandardSpawn ( int playerID, float pos[3], float *rot );
That's what I get for not reading headers :oops: Today I learned
Post Reply