Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-06-2008, 12:29 PM
Rocker8956
Hill Giant
 
Join Date: Sep 2007
Posts: 117
Default

This does not effect if the mob is spawned. Basically the mob is still there but the player does not get updates on the mob's position unless the player is within so many feet of the mob.

One question I have though, does this effect track?
Reply With Quote
  #2  
Old 10-06-2008, 12:33 PM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

Ahh that makes more sense then.
Reply With Quote
  #3  
Old 10-06-2008, 04:41 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Cubber, the original suggestion to actually depop mobs that were out of range would have worked perfectly fine for everything accept Track. The spawn timers would still be checked before a mob would be spawned if a player entered the spawn radius. The only thing you would need to take into account to avoid possible exploits would be to remember that you don't want to depop and repop named or anything with particularly nice loot tables, especially if they are set to equip the items. As long as they don't equip the items, the players would still have no way to tell what loot was or wasn't on the mob, so even named could potentially be depopped. The main thing is that there would be a per NPCID setting to allow you to enable the spawn to use the system or just to stay up like mobs currently do.

But, it looks like this change may not even be needed anyway as there seems to be a much better way to accomplish what I was originally wanting to do just by adjusting values in the source for setting the radius that the updates are sent.

The last code changes I posted in this thread show how to adjust the source to help reduce bandwidth. As far as I can tell and have heard so far, even just making the changes I posted has made a HUGE impact (in a positive way) on the amount of lag and performance problems on the server. The only time my players have seen noticeable lag since the change was when my server broke 100+ players this weekend, which hasn't happened in a while. So, I am fairly confident that if we can make some code that allows each of these settings to be tweaked in the source, I think we can potentially make a great reduction in bandwidth utilization and allow more players on servers with lower upload speeds and with less lag.

I think we should have settings added to the zones table to set the QueueCloseClients settings for both warping to location and for walking animations. I also think we should have the options to be able to adjust all 4 of the level_distances2 settings individually as well as all 5 of the UPDATE_RESOLUTION settings. Of course there should be defaults set if the fields are left at 0, which would be default for the new fields. But, by giving this option, I really think high traffic zones could be tweaked enough to really make a big difference on any server.

Also, I have set zone wide updates to 10 minutes and so far I haven't noticed any different at all in game other than less lag from when it was set to the default of 1 minute. I will have to try running around in an open zone at GM speed to see if I notice anything weird. But, unless I am wrong, maybe we should allow the globalpositionupdate rule to have a setting that will completely disable zone wide updates. Maybe setting it to something like 0 or so could make it disabled.

Either way, I think we are on the way to increasing server performance for servers with limited bandwidth. I would love to see home servers able to reach the 200 or 250+ player counts that are seen on PEQ or the CEQ Dragon Soul server. I know PEQ is/was hosted in a Data Center which essentially gave it unlimited upload speeds and I assume Dragon Soul is as well.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 10-06-2008, 05:49 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Yes, you need zonewide updates.

But we can make the zone wide update smarter, it's only really a problem for mobs that move a significant distance in their roam path. Think large zones like plane of growth or temple of veeshan.

The problem is this:

Player is at point A and receives basic mob initial positions.
Player sees mob at point B 1000 units away but because it's out of update range and mob is a roamer it wont update.
Player moves to point B but mob is at point C 1000 units away because it roamed and now sees the ghosted mob because point C is out of update range too and point B was initial position.

We can make it smarter by sending updates to all players if a npc moves a certain distance threshold I think, then we wont have to send a global update for all npcs.
Reply With Quote
  #5  
Old 10-06-2008, 08:02 PM
Rocker8956
Hill Giant
 
Join Date: Sep 2007
Posts: 117
Default

I think this would only effect character's with track and people using MQ. Couple of questions to confirm that though.

Does track get the mob's position from the server everytime it ticks? or does it use the cleint's last known position of that mob?

The ghost would disappear before the player saw it because the player would have to be within the level 3 distance to see it correct? or does the update only happen if the mob is within that range?

Is the client smart enough to ask "Is this mob really there?" when the player tries to target it?
Reply With Quote
  #6  
Old 10-06-2008, 08:12 PM
Rocker8956
Hill Giant
 
Join Date: Sep 2007
Posts: 117
Default

Sorry for the back to back post, ran out of time to edit.

Does an update occur in the level 2 and level 3 intervals even though it occured during the level 1 interval?
Reply With Quote
  #7  
Old 10-06-2008, 11:39 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I think the NPC ghost will still be there because it doesn't check if it is actually there, it only updates if it is there. So, since it isn't there, it would never update until the globalposition timer was up.

I do think we are doing the same work multiple times in some cases though. If so, it is a huge waste of bandwidth and resources. For example, from reading the code, it looks like the globalpositionupdate is done everytime the threshold (60 seconds by default) is met. But, it will still send it even if that same mob is within close range of the player and may have just sent an update already. Here is the code that decides when to send the position update:

npc.cpp
Code:
	global_position_update_timer(RuleI(Zone, NPCGlobalPositionUpdateInterval)),

//lines between this code and the code below here:

		//60 seconds, or whatever the rule is set to has passed, send this position to everyone to avoid ghosting
		if(global_position_update_timer.Check()){
			SendAllPosition();
		}
And then the SendAllPosition code:

mob.cpp
Code:
// this one just warps the mob to the current location
void Mob::SendAllPosition() {
	EQApplicationPacket* app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
	PlayerPositionUpdateServer_Struct* spu = (PlayerPositionUpdateServer_Struct*)app->pBuffer;	
	MakeSpawnUpdateNoDelta(spu);
//?	spu->heading *= 8;
	entity_list.QueueClients(this, app, true);
	safe_delete(app);
}
After thinking about it more, maybe the zonewide update of the NPCGlobalPositionUpdateInterval should actually be part of the update manager settings. So, it all works in the same system and all works together to make it as efficient as possible and reduce any overlapping possibilities.

Maybe an all around better system would be to only update NPC locations if they actually move from their current position. So, only pathing NPCs or NPC that have been moved by a player by being pulled or whatever would ever be sending updates. Then you instantly reduce regular updates down to only pathing NPCs and the few that are maybe aggroed and chasing a player or whatever. Then, after the check to see if the NPC is moving happens, it would use a radius check to see how far away they are from the player to decide how often they will update the player. This should minimize traffic to a very bare minimum, at least the traffic related to spawn updates. From what I have seen, it does seem like a large portion of the traffic for the emulator is related to updates, so tweaks to the system could have a nice impact. If this could all be adjusted on a per zone basis, I wouldn't be too surprised if servers could be tweaked to handle double the number of players that they can now. I haven't really done any detailed testing on this yet, but from what I have seen, the changes I have made already are a very noticeable improvement.

Maybe if we could check the NPCs current position and if it differs by X amount from the last time it was checked, it sends a global position update.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:39 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3