edited December 2017 in ORK Support
When I spawn enemies lets say 40+ combatants in the scene, I notice a performance issue in the profiler. I have found that the issue it's Orkhandler.update using up about 50%+ . I finally figured out what was getting updated constantly in the behavior update in unity, It's on the combatant component that is attached to each combatant when spawned so about 40+.

Even though I'm using Real time Area & Real Time Battle Combat Type on the Combatant Spawner the combatants under Combatant Component > Battle Settings> Turn and Turn State continues to tick up as if they are in turn based combat , turn goes up every second by 1 and turn state swtiches from after turn to before turn
this is causing massive update ticks and shows in the profiler.

I tried adding an auto status effect that stops move on each combatant and it completely stops the ticking on update and performance is good again... the problem is that stop move status effect also stops any combat :/

I'm not sure if this is a bug or I have to somehow turn off turn based settings :/
Post edited by tribbles on
  • Noticed same thing before when I was testing Real Time mode. The turn count of combatant keep goes up while the game running.

    Would like to know the detail since planning to use this mode in a game.
  • The real time battle is running, i.e. all combatants within battle range to the player will perform actions based on their AI setup.

    In case you haven't fully set it up yet, that could be the combatants performing a None action that isn't animated using battle events, which leads to pretty much performing an action each frame.

    There are different ways to 'fix' this, e.g.:
    - set the real time battle Timeout in the combatant's Battle Settings > AI Settings
    - set an AI Decision time in Battle System > Real Time Battles
    - make sure the actions the combatant's battle AIs uses are animated using battle events with a short wait time
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ok ill try that , thanks GiL ! :)!
    Next year I'll be a patron after I pay off my college debt (not much left) :D
  • Yay :)

    I'd recommend using the AI decision time with a different min and max value to keep enemies from using actions at the same time.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited December 2017
    @gamingislove
    The real time battle is running, i.e. all combatants within battle range to the player will perform actions based on their AI setup.
    The problem right now is that the battle range is set to only 15 units yet the combatants that are beyond 15 units are still having their turn and turn state ticking , which is bottle-necking the behaviour.update in profiler, I tried the AI decision time but that has not helped.
    Is their any way I can deactivate and reactivate the battle component on each enemy based on the battle range? (or even AI range would work )
    Post edited by tribbles on
  • edited January 2018
    Will look into it, that shouldn't be the case.

    Edit: Will be changed in the next update. Currently it'll still progress the combatant's turn instead of blocking the whole thing when out of range in real time battles. Also, it's handled by the AI Range setting, not the battle range (that's for selecting which combatants are in battle, e.g. when determining enemies and allies).
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 2018
    You're the best! Patreon is definitely on my top priority list!
    Post edited by tribbles on
Sign In or Register to comment.