• Visit Rebornbuddy
  • Few questions about best practices

    Discussion in 'Community Developer Forum' started by Kataera, Nov 8, 2015.

    1. Kataera

      Kataera New Member

      Joined:
      Nov 1, 2015
      Messages:
      2
      Likes Received:
      0
      Trophy Points:
      1
      Hi, thanks for reading!

      First of all I should say that I'm relatively experienced with C# development, however this is the first time I'm trying to develop for RebornBuddy. I'm currently in the process of writing a pretty feature-rich FATE bot base, and have a few questions about best practices to follow when building the logic.


      1. I saw that mastahg posted that using a singular coroutine for the main logic is preferable to utilising behaviour trees. I'm guessing that's still the case?
      2. If it is the case, is it possible to execute Composite behaviours inside a coroutine, or can/should you only use asynchronous tasks?
      3. What are the hooks I can/should use beyond TreeRoot?

        For example, if I want to set a FATE as the current Poi, should I replace the SelectPoiType hook to include selection of the FATE, or is it better to handle that in the main logic (or somewhere else entirely)?

      Thanks in advance for any response! :)
       
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      Both behavior trees and coroutines have their roles. With the release of the tags source code there are now many good examples of using both.

      Composites can be awaited inside async functions using CommonTasks.ExecuteCoroutine(composite,context)

      You can check TreeHooks.HookDescriptions for a list of hooks and their descriptions.
       
    3. Kataera

      Kataera New Member

      Joined:
      Nov 1, 2015
      Messages:
      2
      Likes Received:
      0
      Trophy Points:
      1
      Cool, thanks a lot for the response!
       

    Share This Page