Search Unity

Simple Pedestrians Simulation?

Discussion in 'Navigation' started by markoal, May 13, 2020.

  1. markoal

    markoal

    Joined:
    Aug 31, 2015
    Posts:
    30
    Hello everyone!

    I'm working at a mobile game that needs simple pedestrian / crowd / population simulation since it's not the main feature of the game (there are no cars in the game, only low poly people). Features that I want are:
    • (required) People walking on paths in the game
    • (optional) Point of interest where people can stop
    • (optional) People gathering
    So how to do it, I see a few options:
    • using unity's navigation, pathfinding, etc - performance expensive
    • using steering behavior, waypoint movement or some physics-less solution - cheaper
    Now, the problem, as always is Time. To focus more on other aspects of gameplay, I'm looking for an asset that can handle most of it for me, however, most of the assets are based on unity navigation and navigation mesh that could easily be a problem on mobile or there is no information about how it works. On the other side, there are assets like Polarith AI Pro that might give me a good base to work on but still some time to develop logic is needed.

    What do you suggest?
    Do you know any good unity plugin for this?
    What is your opinion and experience with this?
     
  2. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
  3. markoal

    markoal

    Joined:
    Aug 31, 2015
    Posts:
    30
    Thank you for link @JBR-games. I see I assumed already that navmesh paths are not calculated always but still it might be a problem, mostly since I will have larger city and its top-down perspective, without LODs and no "occlusion culling" for the agents/people. But still, I haven't tested, and I can't be sure how navmesh pedestrians are costly on mobile.

    I'm also thinking about using DOTween with path, and I recalculate path here and there, If I do it smartly and if I give offset to the path I might get lanes so there won't be any collisions between people. People will have mecanim speed that controls walking animation which can be calculated additionally.