Forum rules - please read before posting.

How resource-heavy is the NPC system?

Could I potentially have hundreds of NPC's in the same scene all following paths, animating, running action lists etc. or will that be too resource-heavy when running the final build? Thanks!

Comments

  • Would this be for a 2D or 3D game?

    I'd certainly advise looking at ways to optimise things, i.e. removing any Collider/Rigidbody components on them etc. What would be the context? Are these for background animations, or would they be interactive?

    The biggest resource hog would likely be the pathfinding. If movements don't need to be dynamic, I'd recommend using pre-built Paths to move along, or even better: animating their positions directly in their Animator.

  • I just realised I hadn't replied to this. Thanks for the advice Chris, I solved it by using more animations and less pathfinding as the pathfinding wasn't really necessary.

  • edited June 2023

    @Lux - since this thread began, AC has since gotten an implemention of A* pathfinding for 2D. You can find it on the Downloads page.

    This package offers an alternative pathfinding algorithm. The behaviour might be a little bit different to the built-in algorithm, but it's considerably faster and much better suited when hundreds of NPCs are involved.

  • That is great to know, thank you.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.