Author Topic: [To be added]Scoring for COPS  (Read 3963 times)

Offline Chetan

  • VIP
  • Hero Member
  • **
  • Posts: 1035
  • Rank: Hoodsta
  • Score: 23203
  • No time for bullshits
[To be added]Scoring for COPS
« on: January 13, 2019, 02:45:23 pm »
Many of us rather stay cop to protect the president instead of security. So I'd like to suggest:

Cops should get score for staying close to the president as the securities get. Although I think that for cops the time interval in which they get "+1" score should be more than the security. For example: If securities get +1 score for 30 sec. (not sure about the time); cops should get +1 each 45 sec. they stay close to the president. And the distance should also be more for them as compared to the securities.
« Last Edit: March 04, 2019, 08:07:07 am by Jonne »
"The problem of most people is, they get confused between being beautiful and looking beautiful.

Offline Seven

  • VIP
  • Jr. Member
  • **
  • Posts: 92
  • Rank: Unknown
  • Score: Unknown
  • To obtain peace, you have to win the war.
Re: Scoring for COPS
« Reply #1 on: January 13, 2019, 03:03:08 pm »
It's better to leave everything like this, and on a suggestion "I think Jonne said there was not going to be any change on the scores."

Offline Kelik

  • Mod
  • Sr. Member
  • ***
  • Posts: 465
  • Rank: Loc
  • Score: 36056
  • I have an offer you can't refuse.
Re: Scoring for COPS
« Reply #2 on: January 13, 2019, 03:42:11 pm »
You can have score when you protected the president from terrorists just like security does btw.
I've done that before when I was cop and I was right next to president. When I killed a terrorist next to him, I get score so try it.

Offline Maddy

  • VIP
  • Hero Member
  • **
  • Posts: 795
  • Rank: Loc
  • Score: 37297
  • My attitude depends on the people in front of me.
Re: Scoring for COPS
« Reply #3 on: January 13, 2019, 04:24:00 pm »
Only securities are tend to stay with President not the cops. Thats why they can play unlike securities. So comparing security's scoring system with cops will not be appropriate. But cops can earn scores by acting like a barrier for terrors which means whenever terrorists will be stopped by cops in reaching to the president, they will get score but cops will have to do it in a decided perimeter around the president.


Offline Airman

  • Air1
  • Admin
  • Sr. Member
  • ****
  • Posts: 349
  • Rank: Lil' G
  • Score: 31972
  • Quack
    • Discover Tunisia
Re: Scoring for COPS
« Reply #4 on: January 13, 2019, 06:11:48 pm »
Would be great when doing Air support for me
+1

Offline Uzumaki

  • VIP
  • Sr. Member
  • **
  • Posts: 422
  • Rank: Foot Soldier
  • Score: 80424
  • The WEEB DUCK!
Re: Scoring for COPS
« Reply #5 on: January 13, 2019, 07:01:26 pm »
These days I have seen cops and swat(newbies ones) stick with the presi. So, +1 this might encourage the newbies.

Offline Shawkhawk did nothing wrong!

  • VIP
  • Hero Member
  • **
  • Posts: 508
  • Rank: Unknown
  • Score: Unknown
Re: Scoring for COPS
« Reply #6 on: January 14, 2019, 07:50:56 am »
Give them sniper for that round if their score gets above let's say... 50.

Offline YoMama

  • VIP
  • Hero Member
  • **
  • Posts: 638
  • Rank: Hoodsta
  • Score: 24630
Re: Scoring for COPS
« Reply #7 on: January 14, 2019, 04:53:38 pm »
Give them sniper for that round if their score gets above let's say... 50.
Where did that come from? I hate scoring systems where the better you do, the more advantages you get. It means someone just has to be a little faster in the beginning, then they get slightly better weapons faster and  kind of accelerate from there, but by the time they get to a weapon they're satisfied with (I would say the sniper is something anyone would be satisfied with, since it's basically the most powerful weapon around), they often just start killing the noobs. Can't you see a bunch of cops getting to 50, then all camping at armor?

Also, why give the cops a sniper? They already have M4s, which are far better than anything terrorists have from a distance. I have a feeling that you play as a cop a lot.

Only securities are tend to stay with President not the cops. Thats why they can play unlike securities. So comparing security's scoring system with cops will not be appropriate. But cops can earn scores by acting like a barrier for terrors which means whenever terrorists will be stopped by cops in reaching to the president, they will get score but cops will have to do it in a decided perimeter around the president.
I've always played security in a way where I stop someone from getting near the president by disabling their vehicle or taking their health down so far that they have to get armor, but not going farther than that if it involves being more than a few seconds away from the President. If I feel that me being near the President is really important, I'll often just ram people away before they get to him instead of slowing down to deal with them.

If I'm a cop, I follow the President more loosely, and when I prevent someone from getting closer, I usually try to kill them even if it involves chasing away from the President for a bit. I will often break off even when I can kill someone as a security because I want to preserve my vehicle to stay with the President, but as a cop, I am okay with destroying it to kill someone.

This, for me, is the difference- what the goal of the class is. For security, it's just to get terrorists away from the President by either killing them or crippling their vehicle or health as quickly as possible and without being far from the President. Cops, meanwhile, should try to stop people from getting to the security layer at all, and finish off the crippled players the security leave.

TL;DR:
I think cops should get more points for stopping someone who is heading for the security layer, slightly less points for stopping someone already in the security layer, but as many points as the security get for stopping someone who is actively harming the President or security. That way, they are still motivated to come directly to the President's aid if they see something which is particularly hard to stop and dangerous to the President, like a car of terrorists with combat shotguns.

I also think that the perimeter of each layer should vary based on how long it takes to get to the President by whatever mode of transit the player is using. The security perimeter should be maybe 10 seconds away, while the cop perimeter should be 20-30 seconds or something. So the perimeter would be much smaller for someone on foot, larger for someone in or surfing on a vehicle (maybe depending on the speed, so if you have an NRG, you have a larger perimeter than if you're driving a slow vehicle), and largest if flying (but hopefully also based on speed as well, since a Hydra can cover way more ground in 10-30 seconds than a stuntplane).

If it isn't computationally prohibitive, it would also be nice to have a command to approximate the perimeters for all classes with transparent gang zones on the map (maybe allow adjustment of color, thickness, and transparency of the markings), even if the approximation is only lines on the X and Y axes coming from the President's position, like crosshairs:


The radar if you're a protector (I'm only using square blips because I'm lazy). Since the perimeter is circular, you have to imagine the four lines being radii of a circle. The cops are in their blue areas, although one is in the security area because of the dark red blip (lots of terrorists in one car). The security are all in their green area. The size of the areas would change based on what you're driving or if you're on foot, so assuming all the protecting blips are in vehicles that have the same speed, they are in their proper perimeters, but you aren't. Let's say that everyone is driving Ranchers.


Same situation, except now you're in a Hydra. The other players are still in their Ranchers, so they still have the perimeter in the first picture. Since you're in a Hydra, which let's say goes twice as fast, your perimeter is twice the size, so you are in fact within at least the police perimeter, and probably the security perimeter too.


The radar if you're a terrorist. I don't know what the perimeter would be based on for them, but it should be affected by the terrorist's vehicle and maybe take the President's into account too.
« Last Edit: January 14, 2019, 07:50:51 pm by YoMama »

Offline Jonne

  • Head Admin
  • Hero Member
  • *****
  • Posts: 1926
  • Rank: Chump
  • Score: 3751
Re: Scoring for COPS
« Reply #8 on: March 04, 2019, 08:06:34 am »
We will make the cop scores a bit more competitive with the other classes. The perimeter is something we'll take into account, but we can't be as accurate as YoMama is describing. Being in a plane or a car is something we can build in, but we won't be able to account for the terrain (for example, if the pres is on chilliad, it will take a lot longer to reach him, with being the same distance away as on flat terrain. The radar overlay can't be added, as it's pretty expensive in SAMP to draw those things (and it would require a lot of updates every time the pres moves). Also, we can only draw rectangles with the gangzones.

Offline YoMama

  • VIP
  • Hero Member
  • **
  • Posts: 638
  • Rank: Hoodsta
  • Score: 24630
Re: Scoring for COPS
« Reply #9 on: March 05, 2019, 01:05:29 am »
We will make the cop scores a bit more competitive with the other classes. The perimeter is something we'll take into account, but we can't be as accurate as YoMama is describing. Being in a plane or a car is something we can build in, but we won't be able to account for the terrain (for example, if the pres is on chilliad, it will take a lot longer to reach him, with being the same distance away as on flat terrain.
Unless there's something I'm not aware of, you can account for differences in height, but as you say, it's difficult to accurately account for how long it will take to make up that height difference in whatever vehicle. However, I don't think that really matters as much for this purpose. Just to be clear, my thought was to do something like this psuedocode (I tried to make it vaguely PAWN-like):
Code: [Select]
// President's coordinates
pres[X]
pres[Y]
pres[Z]

// Player's coordinates
player[X]
player[Y]
player[Z]

// Pythagoras' theorem
playerToPresidentDistance = sqrt((pres[X] - player[X])^2 + (pres[Y] - player[Y])^2 + (pres[Z] - player[Z])^2)

vehicleMaxSpeeds // all vehicle top speeds, by model ID
playerVehicleModelID // player's current vehicle model ID, either inside or surfing on

timeToReachPres
if(playerInVehicle || playerSurfingVehicle) // if player is in or on a vehicle
{
  timeToReachPres = playerToPresidentDistance / vehicleMaxSpeeds[vehicleMaxSpeeds[playerVehicleModelID]]
else // on foot
{
  timeToReachPres = playerToPresidentDistance / maxFootMovementSpeed
}

if(timeToReachPres < 30) // 30 seconds, or whatever is chosen for particular class
{
   // player is within time perimeter for their particular mode of transport
}
This way, if someone is in a Hydra, in which they can cover huge amounts of ground, the perimeter reflects that. If they're on a Faggio, it also reflects that. If the President is flying around and his security is flying nearby, they still get credit. If the person is surfing a Rustler above the President, who is on the ground, and shooting tires of his pursuers, they still get credit, even though they're on foot.

Then to implement my suggestion, give more points to cops for being in their outer shell (or just make their perimeter larger than the security).

The radar overlay can't be added, as it's pretty expensive in SAMP to draw those things (and it would require a lot of updates every time the pres moves). Also, we can only draw rectangles with the gangzones.
That's too bad. I know you can only draw rectangles-- my mockups would have used 8 rectangles, at most. Perhaps future versions of SA:MP might have the capability to just do a draw on the radar. It would still be possible to do a text-based equivalent though, right? For example, give a "Closeness meter" that starts at 0 when the President is the maximum allowed time away, then goes to 100 as you get closer. It would give negative amounts if you're too far (so if you're 60 seconds away, and the minimum is 30 seconds away, you'd get -100).

So, as an example to put this in the context of my suggestion, where police should get more points for stopping people in the layer above the security layer:
Security 0->100: 15->0 seconds from President
Police 0->100: 30->15 seconds from President
I don't know what you'd do with the police meter if they go into the security layer, but the main point of it would be to let people know where they are in their layer and to encourage the police to stop people before they even get to the security layer.

Offline Jonne

  • Head Admin
  • Hero Member
  • *****
  • Posts: 1926
  • Rank: Chump
  • Score: 3751
Re: [To be added]Scoring for COPS
« Reply #10 on: March 05, 2019, 07:33:08 am »
With terrain I meant more the terrain in between. If the pres is on the other side of chilliad, on the same height, it will take a lot longer to reach him than if there was just a flat area in between. Or for example at UFO, it will take longer to reach him since you have to get accross the water somehow.

Your code is a good place to start, but I would make it a bit simpler and more intuitive. We could just have an indicator just as the vehicle health on the top right, with 3 levels, green (close), yellow (medium), red (far), and give the distance to the pres there as well. I think that's a bit easier to understand for most players than the time it would take to reach pres (and easier to calculate). I'm also not sure if we have an easily accessible list of top speeds, so I would be more inclined to just do it by vehicle class (plane, heli, boat, car, bike, ...).

And yes, the point would be that police get equivalent scores without having to stick too close to the pres.

Offline YoMama

  • VIP
  • Hero Member
  • **
  • Posts: 638
  • Rank: Hoodsta
  • Score: 24630
Re: [To be added]Scoring for COPS
« Reply #11 on: March 05, 2019, 10:18:00 pm »
With terrain I meant more the terrain in between. If the pres is on the other side of chilliad, on the same height, it will take a lot longer to reach him than if there was just a flat area in between. Or for example at UFO, it will take longer to reach him since you have to get accross the water somehow.
Ah, OK.

Your code is a good place to start, but I would make it a bit simpler and more intuitive. We could just have an indicator just as the vehicle health on the top right, with 3 levels, green (close), yellow (medium), red (far), and give the distance to the pres there as well. I think that's a bit easier to understand for most players than the time it would take to reach pres (and easier to calculate).
I know the distance is more intuitive in a way, but I think it makes less sense in the context of the gamemode. It would make more sense for me to hear, "you are close enough because your vehicle can get you to the president in 10 seconds" than to hear "you are close enough because you are 10 units away from the president and you're on a motorcycle". The main point of the meter concept that I was suggesting is to abstract that away (although I do think it would also be good to have a little blurb somewhere that explains that it's based on the time it takes you to get to the President).

I'm also not sure if we have an easily accessible list of top speeds, so I would be more inclined to just do it by vehicle class (plane, heli, boat, car, bike, ...).
Well, there are the lists online, which are based on the game files. I don't think it would be very difficult to turn that information into an array with a regular expression-based script, either using those lists, or the game files themselves-- if you would like me to do that, just let me know how you would like it organized. Once you have the list, you could do all the calculations beforehand by just multiplying time allowed by the speed of the vehicle, for every vehicle, and storing that information in a static array as the "maximum allowed distance" for each vehicle. Then using that information would just be a lookup, without a significant performance hit over a bunch of conditional statements based on vehicle class.

I think vehicle class should be considered, but it shouldn't be the only factor. There's a lot of variability within classes. However, there are weird discrepancies in the "top speeds" between classes that I see listed, for example, the Infernus has a maximum velocity of 240, while the Hydra's is 200. The Hydra is definitely faster than the Infernus, as are many aircraft. This isn't useful information, but within the same classes, it is. The Infernus is clearly faster than an Admiral, for example, and that is reflected in the numbers.

Whether you use the max velocities, break the classes into subclasses (slow cars, okay cars, fast cars, slow bikes, fast bikes, slow aircraft, okay aircraft, fast aircraft, etc.), or whatever, I think the system should reflect to some degree the mobility of the vehicle, ideally even within a class. Regardless of method, I am willing and able to help with this (getting an array of velocities, subclassing vehicles, etc.) if you need it.

EDIT: You could also probably get a reasonably good idea of the differences in vehicle speed by just adding in something to periodically sample the speeds of any vehicles being driven and log that data for a while, then take the highest consistently-logged values that you log as the maximum speed for each vehicle.
« Last Edit: March 05, 2019, 10:32:11 pm by YoMama »

Offline Srex_Zangetsu

  • Sr. Member
  • ****
  • Posts: 267
  • Rank: Shooter
  • Score: 58102
  • Yo
Re: [To be added]Scoring for COPS
« Reply #12 on: March 06, 2019, 09:37:28 am »
Hmm makes sense to add it to them.Cops also have a duty of staying together with the president.It'd make more sense if security gained scores for kills while the cops,who should be the actual escort that engages less while the president is on the move,should gain the score for being near the president.Also,that would apply better because security has armor by default and are more suitable for combat for that exact reason while policemen are vulnerable unless they grab some armor.But I guess those argument's aren't strong enough,huh?How about terros getting score from being close?Yeah,their task is to actually shoot and kill the president,but sometimes even staying close to him is difficult.Of course,it'd require more time for this kind of score to be gained,like,you'd have to wait some time while being near to actually score,unlike killing a defender.
Let's roll