Thread: Map Region Instances

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Map Region Instances 
    Renown Programmer
    Greg's Avatar
    Join Date
    Jun 2010
    Posts
    1,179
    Thanks given
    260
    Thanks received
    1,012
    Rep Power
    2003
    It turns out instances of maps uses the underlining map region for clipping not the instanced region, which is fine for god-wars bosses cause you'll only ever instance the same room, but for construction and dungeoneering it means for all npc's and players it will using the wrong clipping. Is there any more information on this, examples of sources where it works correctly, a fix even? am I missing something or will I have to rewrite large parts of the region/movement coordinator to get it to work correctly?
    Attached imageAttached image
    Reply With Quote  
     

  2. #2  
    Zaros Developer

    Nomac's Avatar
    Join Date
    Feb 2011
    Age
    29
    Posts
    1,068
    Thanks given
    318
    Thanks received
    200
    Rep Power
    1092
    Submit the newly created region for clipping whenever it is created or altered or a new user enters the region.
    Attached image


    Reply With Quote  
     

  3. #3  
    fumant viriditas quotidiana

    saifix's Avatar
    Join Date
    Feb 2009
    Age
    30
    Posts
    1,237
    Thanks given
    275
    Thanks received
    957
    Rep Power
    3304
    This is what I seen documented and plan for Apollo:

    The actual size of the world map in RuneScape is pretty big, not just including parts filled with content. There is a huge unused section of the map which can accommodate several thousand instances including padding so that other instances aren't visible. See the image below for an actual dump of the map (credits: https://www.rune-server.org/runescap...ap-dumper.html)


    The idea is that when a new instance is created, we pick an area of this unused map and allocate it to that instance. We would then load the object and tile data for the region and apply any transformations (rotations, etc.) and build our collision maps from that. When the instance is no longer in use we free the data that was used by it and return the area of unused map back to the server to reuse for someone else.

    Scu11 was the one who pointed this out to me, and I think it's documented that this is how Jagex goes about it.
    "Im so bluezd out of my box.
    Im so fkd i canr even sens makeas Smoke blunt 420hash e tizday" - A legendary guy (1993 - 2015)
    Quote Originally Posted by nmopal View Post
    I will be creating a grimy dubstep song using these lyrics and vocaloid please prepare your bodies
    Reply With Quote  
     

  4. #4  
    Renown Programmer
    Greg's Avatar
    Join Date
    Jun 2010
    Posts
    1,179
    Thanks given
    260
    Thanks received
    1,012
    Rep Power
    2003
    Quote Originally Posted by saifix View Post
    There is a huge unused section of the map which can accommodate several thousand instances including padding so that other instances aren't visible.
    I've always instanced using height; and making the different instances (players, dropped items, objects etc.) invisible, so your suggesting the proper way of doing it is having a them spread out over the empty map?

    Quote Originally Posted by saifix View Post
    The idea is that when a new instance is created, we pick an area of this unused map and allocate it to that instance.
    Yep I've got this far

    Quote Originally Posted by saifix View Post
    We would then load the object and tile data for the region and apply any transformations (rotations, etc.) and build our collision maps from that.
    This is what I need to do, is there any pre-existing methods, code or examples of how to do this?

    All very useful information, thanks
    Attached imageAttached image
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Apr 2016
    Posts
    124
    Thanks given
    14
    Thanks received
    21
    Rep Power
    37
    Quote Originally Posted by saifix View Post
    The idea is that when a new instance is created, we pick an area of this unused map and allocate it to that instance. We would then load the object and tile data for the region and apply any transformations (rotations, etc.) and build our collision maps from that. When the instance is no longer in use we free the data that was used by it and return the area of unused map back to the server to reuse for someone else.

    Scu11 was the one who pointed this out to me, and I think it's documented that this is how Jagex goes about it.
    What determines whether a map is 'unused'? What do you mean by allocating 'it' to 'that instance'?
    Reply With Quote  
     

  6. #6  
    Renown Programmer
    Greg's Avatar
    Join Date
    Jun 2010
    Posts
    1,179
    Thanks given
    260
    Thanks received
    1,012
    Rep Power
    2003
    Quote Originally Posted by NeedDump View Post
    What determines whether a map is 'unused'? As well as what do you mean by allocating 'it' to 'that instance'?
    Where (on the image) the map is black, where there is nothing; you wouldn't want to create an instance of gwd in the middle of varrock. Allocating as in just assigning it a blank area for one specific instance e.g. this area is for dungeoneering, this area is for construction instances etc.. Just to keep it organised and so instances don't overlap.
    Attached imageAttached image
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Apr 2016
    Posts
    124
    Thanks given
    14
    Thanks received
    21
    Rep Power
    37
    Quote Originally Posted by dinho View Post
    Where (on the image) the map is black, where there is nothing; you wouldn't want to create an instance of gwd in the middle of varrock. Allocating as in just assigning it a blank area for one specific instance e.g. this area is for dungeoneering, this area is for construction instances etc.. Just to keep it organised and so instances don't overlap.
    Thanks for the clarification, however it's kind of difficult to visualize without any sort of 'tile' mark that would let you calculate how many tiles are actually 'unused'. Dungeoneering instance, player-owned-house instances, quest instances (quite a lot of them), minigame instances (fight caves, clan wars), etc, etc. Kind of questionable whether it is definitely how they handle instances on RuneScape, but it's definitely a possibility.

    I myself have used that theory for construction, but instead used the player indices to offset the 'base' position. Only did it this way because it's an RSPS, if it were a professional game would probably have to debug how many tiles are actually available vs how much content needs instances and taking into account that up to 2000 instances could potentially occur.
    Reply With Quote  
     

  8. #8  
    Renown Programmer
    Greg's Avatar
    Join Date
    Jun 2010
    Posts
    1,179
    Thanks given
    260
    Thanks received
    1,012
    Rep Power
    2003
    Quote Originally Posted by NeedDump View Post
    Thanks for the clarification, however it's kind of difficult to visualize without any sort of 'tile' mark that would let you calculate how many tiles are actually 'unused'. Dungeoneering instance, player-owned-house instances, quest instances (quite a lot of them), minigame instances (fight caves, clan wars), etc, etc. Kind of questionable whether it is definitely how they handle instances on RuneScape, but it's definitely a possibility.

    I myself have used that theory for construction, but instead used the player indices to offset the 'base' position. Only did it this way because it's an RSPS, if it were a professional game would probably have to debug how many tiles are actually available vs how much content needs instances and taking into account that up to 2000 instances could potentially occur.
    Yeah very true, but if this is true surely empty space doesn't require any physical memory to be transferred so the map itself could be maximum integer by max integer in size they could just start at x,y : 30000,30000? Or is that me being ridiculous

    Edit: Yeah ik utterly ridiculous; it was only a hypothetical thought
    Attached imageAttached image
    Reply With Quote  
     

  9. #9  
    Zaros Developer

    Nomac's Avatar
    Join Date
    Feb 2011
    Age
    29
    Posts
    1,068
    Thanks given
    318
    Thanks received
    200
    Rep Power
    1092
    The black is unused. You construct your newly instanced region based on the square.

    No each black square has coordinates still that are already created.
    Attached image


    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Apr 2016
    Posts
    124
    Thanks given
    14
    Thanks received
    21
    Rep Power
    37
    Quote Originally Posted by dinho View Post
    Yeah very true, but if this is true surely empty space doesn't require any physical memory to be transferred so the map itself could be maximum integer by max integer in size they could just start at x,y : 30000,30000? Or is that me being ridiculous
    Think you can do that, don't recall why I didn't do that exactly, might've been an issue where I was just too lazy to 'fix'. If that is the case it should work fine, I was just going off the picture which itself has a finite amount of unused tiles (obviously).

    There's an easy way to check if this is how RuneScape in fact does it. Use a deob and draw your coordinates and region id on screen while in an instance
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 7
    Last Post: 06-12-2014, 08:57 AM
  2. Map Region packet structure..
    By popbob in forum Help
    Replies: 4
    Last Post: 06-24-2009, 01:13 PM
  3. 550 Map Region Packet?
    By IDX in forum RS 503+ Client & Server
    Replies: 3
    Last Post: 06-19-2009, 07:56 PM
  4. Map Regions + Walk Queue?
    By r ip in forum Help
    Replies: 2
    Last Post: 03-29-2009, 12:08 PM
  5. Replies: 3
    Last Post: 03-16-2009, 02:57 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •