Submit the newly created region for clipping whenever it is created or altered or a new user enters the region.
|
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?
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.
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?
Yep I've got this far
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
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.
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
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
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |