Forum Discussion

InaCentaur's avatar
8 months ago

Maximum NPCs in a mobile game

Are there guidelines on maximum NPCs possible in a mobile game?

Is it possible to spawn NPCs and create random names and looks at runtime? 

7 Replies

  • As far as I know there are no documented guidelines for maximum number of NPCs in a mobile world, but some things to keep in mind would be that NPCs basically use the same resources as player avatars and each world is capped at 32 player avatars. The same is true for any other gizmo, you can use as many as you want as long as your world stays above 60 FPS. It is always a balance between adding too much and keeping a performant world.

     

    You can spawn NPCs, but I don't think you can spawn them with a random name, and certainly cannot spawn them with a random look right now. Alternatively you could setup a collection of NPCs, save them as an asset then spawn that asset.

    • InaCentaur's avatar
      InaCentaur
      Member

      Ah I did not know it's capped at 32 avatars... is there a workaround to support more if we wanted to host a famous musician or celebrity virtually and anticipate hundreds or thousands?

      • Ben.SH's avatar
        Ben.SH
        Community Manager

        Worlds are capped at 32 players max. Beyond that limit, a new instance is created.

    • InaCentaur's avatar
      InaCentaur
      Member

      Can you explain more about how to save the collection of NPCs as an asset and then spawning the asset?

      Do you mean as a Unity asset bundle? Is there a way to use non-Horizon avatars for NPCs?