The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regions loading
Author Message
Aimed
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 4 in 3 posts
Joined: Apr 2015
Reputation: 0



Post: #1
Regions loading
Hello guys!

How does Sphere load it's regions? I've noticed it somehow decides their priority and it does not only depend on the order in which they're written in the region files.

Seems more like the size of a region is also considered. So a smaller region will be above a bigger region even if it was written in the beginning of a regions file and a bigger region below it( which means a bigger region will cover a smaller one and nulify it). But it does not. So I'm wondering how does this region loading thing works.

Thanks for you attention.

-Aimed
(This post was last modified: 04-20-2015 05:46 AM by Aimed.)
04-20-2015 05:45 AM
Find all posts by this user Like Post Quote this message in a reply
Aimed
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 4 in 3 posts
Joined: Apr 2015
Reputation: 0



Post: #2
RE: Regions loading
Hello? Anyone alive?Bye
04-22-2015 01:02 AM
Find all posts by this user Like Post Quote this message in a reply
Sharlenwar
Journeyman
*

Posts: 55
Likes Given: 0
Likes Received: 3 in 3 posts
Joined: May 2012
Reputation: 0



Post: #3
RE: Regions loading
People are alive. I was hoping a developer would respond to this one. From my understanding, Sphere loads in sectors and in your sphere.ini you can specify how many sectors are loaded into memory at a time. There is also some mechanics where when players move into these sectors, they then get loaded in and what not. I'm just not 100% of this behavior with the newer builds, it's been a while since I worked with Sphere.

-= Meh =-
04-22-2015 02:24 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Aimed
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 4 in 3 posts
Joined: Apr 2015
Reputation: 0



Post: #4
RE: Regions loading
(04-22-2015 02:24 AM)Sharlenwar Wrote:  People are alive. I was hoping a developer would respond to this one. From my understanding, Sphere loads in sectors and in your sphere.ini you can specify how many sectors are loaded into memory at a time. There is also some mechanics where when players move into these sectors, they then get loaded in and what not. I'm just not 100% of this behavior with the newer builds, it's been a while since I worked with Sphere.


Hey Smile Im asking about regions, not about sectors. Sectors are the 64 by 64 tiles squares usually(at least on RunUO) so I don't think it's different on Sphere, as far as I remember they're responsible for loading of all in-game objects. Also you can not define them as they're inside the core. Now, regions are loaded over these sectors, you can define as many regions as you would like to. Regions overlap sectors of course, but u can also make regions overlap each other and it seems like it depends on their size. So a smaller region will always be above a bigger one, otherwise a bigger region will just nulify the small one. And this is my question Smile I just wanna know specifically how they're loaded.
(This post was last modified: 04-22-2015 08:27 AM by Aimed.)
04-22-2015 06:15 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #5
RE: Regions loading
Regions are stored inside sectors as a inherited class from CGTypedArray.

For each new entry on this sector this array is being read checking if this region is overlapping with anyone else already added.

If not, region is added directly.

If yes, some checks are made:
- if region rects are equal -> return false (the error)
- if new region is inside the one being checked the loop continues.
- if checking region is a multi and new one is not, the loop continues.
- if still inside the loop (the other possible casses) then this region is added to the sector's list.

This is a 'fast' explanation of what happens, what will anwser your question, I think, is: 'above' region is last one added.
04-22-2015 04:45 PM
Find all posts by this user Like Post Quote this message in a reply
Aimed
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 4 in 3 posts
Joined: Apr 2015
Reputation: 0



Post: #6
RE: Regions loading
(04-22-2015 04:45 PM)XuN Wrote:  This is a 'fast' explanation of what happens, what will anwser your question, I think, is: 'above' region is last one added.

We've already figured this out yesterday by using our logic and alternative algorhythms made by ourselves on runuo and comparisons between sphere and runuo regions loading.
And no, the last one added is not the 'above' region.
The top region is the one with the smallest surface. U'd check ur region comparing methods inside the core because they decide which region will be on top. Comparing decides the region priorioty(which one will be on top) and it's being done by comparing their overall surface(and not of one particulair rectangle of a region), so the smallest one always wins. Thanks for your time, thoughBye
(This post was last modified: 04-23-2015 06:58 AM by Aimed.)
04-23-2015 06:56 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)