OpenFusionProject / OpenFusion

Open source server for the FusionFall client
MIT License
351 stars 64 forks source link

NPC/Mob/Vendor refactor #203

Open CPunch opened 3 years ago

CPunch commented 3 years ago

Moving the discussion over the NPC refactor to here. The problem with our current implementation of NPCs and Mobs is that it has become a sort of mix and match of different approaches, which has led to a pretty messy code base. Some of the things that were suggested for the NPC refactor so far are:

Any different approaches are welcome to be shared in this issue.

dongresource commented 3 years ago

Concrete issues with the current design:

Note that everything that summons an NPC needs to first determine whether it's a mob or not, and then construct either a BaseNPC or a Mob object. There is a helper function called NPCManager::summonNPC() that currently handles this; this is a good approach. Perhaps this function should be moved closer to the other NPC-related functions/methods that we end up writing.

yungcomputerchair commented 1 year ago

How much of this did the refactor address? i.e. what's left to clean up moving forward?

dongresource commented 9 months ago

Pending a more comprehensive review; we know that more changes are still needed to the AI state machine to properly support mob-vs-mob combat, which is a prerequisite for escort missions. There were certainly other things; I'll have to look into it again.