I have a problem that I need to solve regarding AOI
by default, the AOI is 10,10,0 (2d game), and this is fine for regular users.
However, if I login as an admin, I would like to see a bigger range of whois within proximity, so maybe 25,25,0.
How can I achieve something like this? advanced-mmo-api page says it not possible to set a larger value than default.. so does that mean my use case is impossible?
Custom AOI
Re: Custom AOI
Yes, this is not possible, sorry. At least not with the MMOAPI.
From server side however you have access to every user in the Room, so you can have custom requests for Admin only that can access the Room in a different way compared to a regular user.
To give you and idea, in order to keep track of everyone's AOI the server must create a pretty complex 2D/3D data structure that uses a fixed AOI value.
In order to support multiple AOIs we would need to be able to maintain multiple data structures for multiple users... making it very resource demanding, and complicated to manage.
Cheers
From server side however you have access to every user in the Room, so you can have custom requests for Admin only that can access the Room in a different way compared to a regular user.
To give you and idea, in order to keep track of everyone's AOI the server must create a pretty complex 2D/3D data structure that uses a fixed AOI value.
In order to support multiple AOIs we would need to be able to maintain multiple data structures for multiple users... making it very resource demanding, and complicated to manage.
Cheers
Re: Custom AOI
Update: thinking about this issue a bit more I realized that there is a way for an Admin to se a larger are of the map compared to regular users. From server side you can query a certain position of the virtual map, for example:
This code allows you query any arbitrary area, provided that the custom AOI is <= Room's AOI. In other words you can query an area smaller or equal to the Room's AOI.
This however can be extended by querying multiple blocks to effectively read a larger portion of the map. If the AOI is (10, 10) in 2D you can query multiple adjacent (10, 10) areas and obtain a larger view of the Room.
Hope it helps
Code: Select all
List<User> clients = getProximityList(Vec3D position, Vec3D aoi);
List<BaseMMOItem> items = getProximityItems(Vec3D pos, Vec3D aoi);
This code allows you query any arbitrary area, provided that the custom AOI is <= Room's AOI. In other words you can query an area smaller or equal to the Room's AOI.
This however can be extended by querying multiple blocks to effectively read a larger portion of the map. If the AOI is (10, 10) in 2D you can query multiple adjacent (10, 10) areas and obtain a larger view of the Room.
Hope it helps
Re: Custom AOI
Yeah, spent hours rereading many of the posts and pages and I thought of this as well.
are these calls performance heavy though?
List<User> clients = getProximityList(Vec3D position, Vec3D aoi);
List<BaseMMOItem> items = getProximityItems(Vec3D pos, Vec3D aoi);
It is likely that I will be calling this 1000 times every 100ms assuming 1000 users are moving continuously.
are these calls performance heavy though?
List<User> clients = getProximityList(Vec3D position, Vec3D aoi);
List<BaseMMOItem> items = getProximityItems(Vec3D pos, Vec3D aoi);
It is likely that I will be calling this 1000 times every 100ms assuming 1000 users are moving continuously.
Re: Custom AOI
I'd recommend to test it out because, as I mentioned, "performance intensive" doesn't mean very much without a context.
On a small server it might be, on a dedicated multi-core machine it probably won't.
You can write a test Extension and run it to see how it behaves.
Cheers
On a small server it might be, on a dedicated multi-core machine it probably won't.
You can write a test Extension and run it to see how it behaves.
Cheers
Who is online
Users browsing this forum: Bing [Bot] and 47 guests