It is currently Wed Dec 03, 2008 1:15 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Multis and object info packet (0x1A)
PostPosted: Sun Apr 27, 2008 12:56 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 225
When client gets close to an object (default distance is 18 or less tiles), server sends object info packet to inform of the object ahead. The distance is calculated using the objects' x and y members.

Problem is, when it comes to multis, the distance is calculated the very same way. If multi is physically large (think of a castle for an example), it might appear just in front of the player. Or even worse, player might not even get to see with what he/she collided with!

The feature request is: in case of multi, could behaviour of object info packet sending be changed so that the distance is calculated using the multi's footprint instead of the coordinates it is built? So if player is 18 tiles from the closest wall of the house, server would send the object info packet to him/her.

--

I created a test command to send the object info when my character was 20 tiles from the multi's center, under 18 tiles from its closest point, and the multi correctly appeared into minimap. When I walked few tiles away from it, the building disappeared from map. So, (v5) client already seems to work that way and shouldn't cause any problems if this feature is added.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 28, 2008 4:36 am 
Offline
Packet Maintainer

Joined: Thu Feb 02, 2006 8:33 am
Posts: 324
The problem is, that the multi in reality is one tile/object. And if that tile comes into the maximum update range of the client, the server tells the client what multi to display. The only way to change that imho is to change the client update range. But the max. value is 18 i think.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 28, 2008 1:52 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 225
Yup, that's the problem.

The way I see, it could be solved someway like this:

Code:
instead of
_____
|     |
|  X  |
|_____|

POL would see

XXXXXXX
X     X
XXXXXXX

or even

XXXXXXX
XXXXXXX
XXXXXXX


Where _ and | are walls and X is illustrative of the multi object. This is nowhere perfect solution, but might show the idea more clearly.

I don't mean that an item should be created to every tile a multi occupies, but rather a (virtual) subregion of some sort - maybe this is something the devs are already struggling with their walk on multi -idea?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 28, 2008 9:04 pm 
Offline
Certified POL Expert
User avatar

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 798
Location: Chicago, IL USA
The thing is, the client must see these as the first one with only one X presumably near or at the middle. If you go too far outside the range I believe the client ignores the packet. Although this *might* work for multis in the form of the multi cache but I'm not certain.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 30, 2008 2:50 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 225
I did some more testing using v5 client with following results.

- Despite the distance to the multi, when client gets object info packet the multi is drawn to minimap (and screen, if close enough).
- If distance to the closest item of the multi structure is more than 18 tiles, the multi is removed from minimap when player moves.
- If distance is 18 tiles or less, multi stays in minimap.
- Client seems to use the physical point of multi only for placement purposes.
- If player walks away from the multi, it disappears from the view after distance to the closest point of multi is over 18 tiles.
- Multi object itself is not important: the structure (items) of multi is.

--

This I did not test, but I quess it's safe to suppose that the distance of 18 tiles is not hardcoded, but could be altered using Client View Range packet (http://packets.polserver.com/index.php?op=showpacket&packet=0xC8) and thus it could be anything between 5 and 18 tiles.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl