Jump to content

Follow System Mangos


sjizzle
 Share

Recommended Posts

I'm not sure I understand the intent of your post.

Are you proposing to develop improvements to the way NPCs and creatures follow a player or mob leader [em]as your own project[/em]?

OR

Are you simply saying [em]someone else[/em] should figure out a way to use code from pets to make creature following work better?

Link to comment
Share on other sites

I was in quite a rush so let me explain it in futher detail.

If creatures use the getmotionmaster()->MoveFollow() or something to follow other creatures, then the follow system isn't working smooth ( Looks like the the coordinates of the one they are following aren't updated often enough ).

I am not as good as other devs and I only do it for learning experience.

I was looking at pets, pets also follow though they follow players not creatures. However their follow is smooth.

So I was thinking, can't we look at the way pets follow and implement that system for the "not" working follow ( in the above described cases )?

AND would it be hard to write that to the current movefollow for creatures ?

I would love to hear a opinion from a more experienced MaNGOS Dev. Also when this is a bad idea, I learn from it when it is explained why it is bad, and what other and better posibilities are there.

This way I maybe can do some coding and post it here.

In the roadmap posted earlier on the forums I saw someone was improving the mangos follow system for creatures, I want to help with this.

Those devs do have more information, so I hope to get a response from them.

Link to comment
Share on other sites

Thank you for explaining the issue more clearly.

I would encourage you to begin working on your code. It may be that another developer can offer useful insights, but it is possible you have ideas that will work very well as they are now. With code to show the other developers, it will allow your work to progress quickly.

I wish you good luck and hope your work will end with a great improvement to MaNGOS. :)

Link to comment
Share on other sites

if memory serves:

MMGens for creatures are updated every 50ms - this should be more than enough for any visual impact.

Also I am very positve that there is no difference between pet following and normal npc following.

However npc movement is not very smooth, so this might result in a very unsmooth movement for followers - contrary to player movement which is relatively smoots (as client controlled)

Link to comment
Share on other sites

I think it has to do with a slight problem between client and server sending coordinate updates to each other and how the packets are acknowledged.

I remember Vladimir recently discussing this elsewhere in the forums. If I recall it rightly, he said that MaNGOS's own internal update movement handler can set a unit's coordinates without waiting to receive a packet from the client. This means the stuttering movement of following creatures is due to both the client and server being out of sync on position updates.

It can be fixed, but that means doing major surgery on the server's movement code, if I understand correctly what Vlad was saying.

Link to comment
Share on other sites

Schmoozerd is correct on both points:

Chase and Follow are the exact same, update and position selection are implemented by TargetedMovementGenerator (TMG).

Also, TMG is set up on a 50ms update timer (this is the same as the world update tick delay, so setting lower won't make it better)

The issues UnkleNuke talks about are only likely to be a problem if you are a) travelling very fast or b) you have high latency.

Link to comment
Share on other sites

Possible sollution: use in follower movegen calculated from target movegen expect/future pos instead current not updated and possible outdated position.

Because player in normal state have idle movegen this can be implemented in clear way: follow/chase/etc movegen ask target top movegen for expected "right" pos instead use formal possition. Don't know how this will affect CPU usage from other side.

Link to comment
Share on other sites

I know it's a slighly different problem, but didnt want to make a new topic about it since it's also about NPCs movement.

So what i noticed is that atm if a player manages to climb on some object like 5-10yds above the ground level the NPCs won't attack him anymore with melee, and that opens the possibility for some exploits, like in Hyjal for example in the horde encampment, if a player climbs on the top of those spike looking fences then the bosses would stop melee him and casts only the ranged spells. I know in the past the NPCs would "fly" and chase the players until a certain height, is it possible to get that back, maybe as a configurable height treshold?

Link to comment
Share on other sites

  • 2 weeks later...

To stay on topic, I had some time last week and looked into the follow system and such. However I have to dissapoint you guys, I'm really motivated to learn but so far I didn't made any progress ( I am new to C++ and to MaNGOS ) and this is in my opinion quite a hard issue. Maybe someone who want to help share his ideas/code on this one so we can share thoughts. Dunno is someone is working on this atm or willing to ?

Link to comment
Share on other sites

sjizzle be pacient my dear friend... it will solve out...

U need to see the point of Schmoozerd when he is talking about soon...maybe sooner than we thing MMAPS will be implemented... one of the gifts that mangos team have for us in the beginning of this year

this system will solve all your problems

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use