Author Topic: [To be added]Expand SF boundaries  (Read 462 times)

Offline YoMama

  • VIP
  • Hero Member
  • **
  • Posts: 563
  • Rank: Pimp
  • Score: 14428
[To be added]Expand SF boundaries
« on: December 07, 2018, 12:38:09 am »
The boundary around the ship that's next to the Golden Gate should be expanded, since it's still right up against the edge of the ship. It might also be nice to give a little more room for the other ship (the one with the stairs) too, since people often hit those boundaries with planes.
« Last Edit: December 12, 2018, 08:14:29 pm by Jonne »

Offline Crash

  • VIP
  • Hero Member
  • **
  • Posts: 912
  • Rank: Hustler
  • Score: 8946
  • BITCH YOU BASIC
Re: Expand SF boundaries
« Reply #1 on: December 07, 2018, 09:07:45 pm »
Supporting.

Offline Jonne

  • Head Admin
  • Hero Member
  • *****
  • Posts: 1569
  • Rank: Civilian
  • Score: 642
Re: Expand SF boundaries
« Reply #2 on: December 12, 2018, 08:14:24 pm »
We can't really expand the bounds around the small ship much more, but we'll give more room around the bigger ship.

Offline Alex.

  • VIP
  • Full Member
  • **
  • Posts: 170
  • Rank: Unknown
  • Score: Unknown
  • News Reporter of Noviny SA
    • FU
Re: Expand SF boundaries
« Reply #3 on: December 12, 2018, 10:50:23 pm »
We can't really expand the bounds around the small ship much more, but we'll give more room around the bigger ship.

You can easily make boundaries like this.
By the Federal State everything above the road connection with the bridge is still in San Fierro territory. Boundaries show what San Fierro owns not where is the territory.
Yes You can easily choose boundaries like that.
Noviny San Andreas!
Wolfs hunt together, many spieces look like wolfs. Love wolfs <3

I kill humans to save wolfs.

Offline Lohit_The_Noob

  • Hero Member
  • *****
  • Posts: 812
  • Rank: Unknown
  • Score: Unknown
  • Foxes = OP, but my Fox>All
Re: Expand SF boundaries
« Reply #4 on: December 13, 2018, 01:38:17 am »
We can't really expand the bounds around the small ship much more, but we'll give more room around the bigger ship.

You can easily make boundaries like this.
By the Federal State everything above the road connection with the bridge is still in San Fierro territory. Boundaries show what San Fierro owns not where is the territory.
Yes You can easily choose boundaries like that.

Is such mapping with these amount of sides even possible?

Offline Alex.

  • VIP
  • Full Member
  • **
  • Posts: 170
  • Rank: Unknown
  • Score: Unknown
  • News Reporter of Noviny SA
    • FU
Re: Expand SF boundaries
« Reply #5 on: December 13, 2018, 03:24:26 pm »
We can't really expand the bounds around the small ship much more, but we'll give more room around the bigger ship.

You can easily make boundaries like this.
By the Federal State everything above the road connection with the bridge is still in San Fierro territory. Boundaries show what San Fierro owns not where is the territory.
Yes You can easily choose boundaries like that.

Is such mapping with these amount of sides even possible?
Yes. You can even make a 200 point boundary if you want to i worked with this in mta and it works in samp the same but idk how his boundaries work and im not gonna even look into it.
Noviny San Andreas!
Wolfs hunt together, many spieces look like wolfs. Love wolfs <3

I kill humans to save wolfs.

Offline Jonne

  • Head Admin
  • Hero Member
  • *****
  • Posts: 1569
  • Rank: Civilian
  • Score: 642
Re: [To be added]Expand SF boundaries
« Reply #6 on: December 14, 2018, 10:11:24 am »
We can't really expand the bounds around the small ship much more, but we'll give more room around the bigger ship.

You can easily make boundaries like this.
By the Federal State everything above the road connection with the bridge is still in San Fierro territory. Boundaries show what San Fierro owns not where is the territory.
Yes You can easily choose boundaries like that.

Is such mapping with these amount of sides even possible?
Yes. You can even make a 200 point boundary if you want to i worked with this in mta and it works in samp the same but idk how his boundaries work and im not gonna even look into it.

Unfortunately, boundaries like that aren't possible by default in SAMP ( you can only define a rectangle as a bounding box). Altus made a custom boundary system that made what you suggested possible. But again, to draw the boundaries we're limited by SAMP again, and we solved it by drawing lines using gangzones (the same ones that we use to draw the spawnzones). So, as we're drawing the boundaries with rectangles that we made to look as lines, we're limited to only having bounds parallel to the x and y axis.

Offline YoMama

  • VIP
  • Hero Member
  • **
  • Posts: 563
  • Rank: Pimp
  • Score: 14428
Re: [To be added]Expand SF boundaries
« Reply #7 on: December 20, 2018, 12:40:17 pm »
Unfortunately, boundaries like that aren't possible by default in SAMP ( you can only define a rectangle as a bounding box). Altus made a custom boundary system that made what you suggested possible. But again, to draw the boundaries we're limited by SAMP again, and we solved it by drawing lines using gangzones (the same ones that we use to draw the spawnzones). So, as we're drawing the boundaries with rectangles that we made to look as lines, we're limited to only having bounds parallel to the x and y axis.
So, if I understand this correctly, you're saying that Altus' boundary system would allow boundaries that are not parallel to the X or Y axes, but that the system for drawing boundaries is incapable of displaying them?

Assuming you wouldn't hit a limit on the number of gangzones, why couldn't you draw small, square gangzones to act as "pixels" and draw whatever shapes you want with them? Once you can draw pixels, you can use a simple algorithm like Bresenham's to draw any line you want. Hell, you could even do B-spline curves to make mapping the boundaries impressively smooth, though that would be overkill. I don't know how the gangzones are drawn or tracked, so I'm not sure how (or if) it would have effects on performance, but I don't think drawing with Bresenham's would be too bad.

You could even optimize Bresenham's by drawing the long, rectangular zones you're currently using for multiple pixels in line parallel to an axis, when possible (so in this picture, you'd draw 5 short, disconnected lines parallel to the X axis of lengths 2, 2, 3, 2, 2 pixels instead of all 11 pixels individually, but if you had a 45 line, you'd still draw it with your individual "pixels"). That way, you'd avoid whatever overhead might come from having more small gangzones than you need (if that overhead is even significant).

If, before investing time in implementing Bresenham's, you want to test how the game behaves with possibly hundreds or thousands of small gangzones, I think you could pretty easily convert the current non-oblique system to using entirely pixels or just draw a fuckton of pixels in one spot and see what happens.

Offline Alex.

  • VIP
  • Full Member
  • **
  • Posts: 170
  • Rank: Unknown
  • Score: Unknown
  • News Reporter of Noviny SA
    • FU
Re: [To be added]Expand SF boundaries
« Reply #8 on: December 20, 2018, 10:13:08 pm »
Square boundaries are easier thats why he said it.
These shaped boundaries are harded, but possible you cant use them with  the setboundaries tho youll need to make a tick that checks the players boundaries atleast every 2 seconds in order to avoid getting out of them.
« Last Edit: December 20, 2018, 10:15:21 pm by Alex. »
Noviny San Andreas!
Wolfs hunt together, many spieces look like wolfs. Love wolfs <3

I kill humans to save wolfs.

Offline Jonne

  • Head Admin
  • Hero Member
  • *****
  • Posts: 1569
  • Rank: Civilian
  • Score: 642
Re: [To be added]Expand SF boundaries
« Reply #9 on: December 23, 2018, 05:13:44 pm »
Unfortunately, boundaries like that aren't possible by default in SAMP ( you can only define a rectangle as a bounding box). Altus made a custom boundary system that made what you suggested possible. But again, to draw the boundaries we're limited by SAMP again, and we solved it by drawing lines using gangzones (the same ones that we use to draw the spawnzones). So, as we're drawing the boundaries with rectangles that we made to look as lines, we're limited to only having bounds parallel to the x and y axis.
So, if I understand this correctly, you're saying that Altus' boundary system would allow boundaries that are not parallel to the X or Y axes, but that the system for drawing boundaries is incapable of displaying them?

Assuming you wouldn't hit a limit on the number of gangzones, why couldn't you draw small, square gangzones to act as "pixels" and draw whatever shapes you want with them? Once you can draw pixels, you can use a simple algorithm like Bresenham's to draw any line you want. Hell, you could even do B-spline curves to make mapping the boundaries impressively smooth, though that would be overkill. I don't know how the gangzones are drawn or tracked, so I'm not sure how (or if) it would have effects on performance, but I don't think drawing with Bresenham's would be too bad.

You could even optimize Bresenham's by drawing the long, rectangular zones you're currently using for multiple pixels in line parallel to an axis, when possible (so in this picture, you'd draw 5 short, disconnected lines parallel to the X axis of lengths 2, 2, 3, 2, 2 pixels instead of all 11 pixels individually, but if you had a 45 line, you'd still draw it with your individual "pixels"). That way, you'd avoid whatever overhead might come from having more small gangzones than you need (if that overhead is even significant).

If, before investing time in implementing Bresenham's, you want to test how the game behaves with possibly hundreds or thousands of small gangzones, I think you could pretty easily convert the current non-oblique system to using entirely pixels or just draw a fuckton of pixels in one spot and see what happens.

I don't think it's worth spending a lot of time on such a complex system, when we already have pretty accurate boundaries right now. I know it's not perfect, but I don't really see a lot of added value having the boundaries precisely where they need to be, compared to where they are now. Also, I'm not really sure if it would even be possible, since the limit on gangzones is 1024.

Offline Lohit_The_Noob

  • Hero Member
  • *****
  • Posts: 812
  • Rank: Unknown
  • Score: Unknown
  • Foxes = OP, but my Fox>All
Re: [To be added]Expand SF boundaries
« Reply #10 on: December 23, 2018, 06:46:07 pm »
So Gangzones limit are 1024. Can I ask how many of em are already in use for future reference for map suggestions? Incase a better mapping is not implemented in the near future

Offline Jonne

  • Head Admin
  • Hero Member
  • *****
  • Posts: 1569
  • Rank: Civilian
  • Score: 642
Re: [To be added]Expand SF boundaries
« Reply #11 on: December 23, 2018, 07:37:45 pm »
So Gangzones limit are 1024. Can I ask how many of em are already in use for future reference for map suggestions? Incase a better mapping is not implemented in the near future

Right now, every line uses 1 gangzone, so for example, LS uses 10 gangzones (+ 7 for the spawns). I don't think you'll hit the limit fast with the current system.