Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Official Dialogue System + Timeline track

Discussion in 'Open Projects' started by MachairaJP, Oct 1, 2020.

  1. Soundguy

    Soundguy

    Joined:
    Oct 30, 2009
    Posts:
    45
  2. Soundguy

    Soundguy

    Joined:
    Oct 30, 2009
    Posts:
    45
    I'm new to reviewing pull requests in Unity, If i want to go and look at either @Caiuse or @dkaloger 's pull requests and check them out in Unity - how do i do that? I tried checking out the repository fork but that brought me to the latest commit rather then the PR 's latest commit which caused script complation errors.
     
  3. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
    I just found out this open project when trying to find some reference to build DialogueSystem for my game,
    then got inspired to build DS with Timeline.

    So here it is... I comeback to return the favor :D

    About my DS:
    Main new feature:

    - It can wait for user input. (wait or not depend on the DialogueController. Timeline is just some extension from this controller).
    - Can move object (like camera) when waiting for user input.
    - Will jump timeline to proper clip if player input is faster than the timeline.
    - Can play the timeline in preview mode (with updated text).
    Improvement (maybe) from our current implementation:
    - No need to initialize DialogueClip with dialogue id one by one (Our current implementation).
    My implementation just need the last id from DialogueData (SO that holds message, actor, etc) that you want to cut/hold from (the main difference with the Caiuse implementation).

    (for better understanding from what I meant, you can see the video linked below)


    Do my dialogue system suit this project? and... do anybody has been working for this?

    If it's suitable and no one has been working for this yet... how to contribute?
    this is my very first time. I usually a lonely coder :( ehe

    I mean, should i fork the @Caiuse repo or from UnityTechonologies repo? (since the PR isn't merged yet)
     
    Last edited: Oct 22, 2020
  4. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
    Hi @Soundguy ,
    yes, the video @cirocontinisio didn't work in my laptop too.
    But i believe, the video he meant is this:

    ---------------
    I'm still new about this kind of stuff too (working with git)
    But, I'll try to help...

    about your issue with git,
    if you fork from UnityTechnologies repo, you can't see the PR latest commit because that isn't merged yet.

    try to fork directly to repo that you want to test. About compilation error, try to use the same Unity Verison.
    I have try the master branch from UnityTechnologies repo and Caiuse repo with no problem (today)
     
  5. shuttle127

    shuttle127

    Joined:
    Oct 1, 2020
    Posts:
    145
    If you only have a few tweaks to the code @Caiuse has in that PR, fork from that and submit a PR to that branch for review. If it’s completely different from that implementation, fork from the main Unity repo and submit a PR that way.

    Either way, that art style kinda fits the concept art for this, nice job.
     
  6. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
    That's good to hear.

    Aight, gonna work on it this week.
     
  7. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
  8. shuttle127

    shuttle127

    Joined:
    Oct 1, 2020
    Posts:
    145
    You have to check the distribution license of other people's code because this is a free and open source project. If they have any kind of restrictions we cannot use it. Looks like that one has an MIT license, which may be okay, but let's ask @cirocontinisio just in case.
     
  9. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
  10. cirocontinisio

    cirocontinisio

    Unity Technologies

    Joined:
    Jun 20, 2016
    Posts:
    440
    @Sarai I left a comment at the bottom of the PR.
    @Caiuse thanks for making a PR which is essential, I wanted to merge it. However, I left a code review that I'd like to see addressed before we do.
     
  11. cirocontinisio

    cirocontinisio

    Unity Technologies

    Joined:
    Jun 20, 2016
    Posts:
    440
    Finally managed to merge the mega PR, but I had to make a lot of changes to it to model it on basically what was the task, and also decouple the cutscenes from the dialogues, from the UI.

    Now it should be all pretty clean, and we can move on with the Dialogue System (which depends a bit on the UI).

    Happy days.
     
    Amel-Unity likes this.
  12. kirbygc00

    kirbygc00

    Joined:
    Apr 4, 2016
    Posts:
    45
    I had an issue when pulling this update in, but i realized it was some local issue with my git setup. PR is all good.

    However, when i was digging around I saw some stuff:
    1. We are subscribing and unsubscribing to input events using anonymous lambdas which is not good (https://stackoverflow.com/questions/1362204/how-to-remove-a-lambda-event-handler)
    2. We are also subscribing to `activePlayableDirector.stopped`, but never unsubscribing?
    3. We have an existing input reader. I think it would be a good idea to extend the input reader to handle these requirements, rather than bypass it. This is actually why the method signature on the handlers in the dialogue manager do not line up with the event signature.

    I put in a small PR to asdress these issues.
     
    Last edited: Nov 10, 2020
    cirocontinisio likes this.
  13. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
    @cirocontinisio
    Want to report, timeline dialogue is not pausing at the end of the last clip. Is that considered a bug?
    You leave comment in the code. Is that a note or you also don't know why it's not working? ehe

    Also, I have suggestion, a small feature:
    Current implementation cannot advance dialogue fast enough, you need to wait till end of clip to be able to advance.
    How about we make timeline jump to end of the clip while we are still at the beginning or middle of the clip.
    How's that?
     
  14. kirbygc00

    kirbygc00

    Joined:
    Apr 4, 2016
    Posts:
    45
    Seems like we should probably stop the track once the dialogue is over. I can roll this into my event subscription fix.

    I don't think it would be difficult to implement... Kinda reminds me of how the witcher does cutscenes/dialogue. I like it! =)
     
  15. cirocontinisio

    cirocontinisio

    Unity Technologies

    Joined:
    Jun 20, 2016
    Posts:
    440
    Is that really needed? If you skip in a dialogue you move to the next line of text (and you can read it), with a Timeline you don't know what you're skipping.
     
  16. kirbygc00

    kirbygc00

    Joined:
    Apr 4, 2016
    Posts:
    45
    I am not very familiar with authoring cutscenes. I am assuming that the feature would work like follows.

    Scenario 1:
    1. camera pans over town for 3 sec
    2. user wants to jump to next camera shot
    3. user hits space
    4. 2 seconds of pan is skipped, camera is now at the next shot in the timeline
    Scenario 2:
    1. user has already seen the cutscene, wants to skip entirely
    2. "holds" skip button
    3. entire cutscene is skipped
    does that sound reasonable? Or are we not 'splitting' up camera shots in a way that would enable this? I think this is a pretty standard feature for most RPGs

    Also re dialogue: do we currently have skipping coded into the dialogue flow? I think this is a bit higher priority than skipping in a cutscene.
     
    Last edited: Nov 12, 2020
  17. cirocontinisio

    cirocontinisio

    Unity Technologies

    Joined:
    Jun 20, 2016
    Posts:
    440
    For dialogues:
    We don't have animation of dialogues (yet), so we don't need skipping in the sense that whenever you see a block of text, if you press the "Advance" button you instantly see the next, so if you mash the Advance button you can go through dialogues in a few instants.

    So I guess the question is IF somebody wants to add animation to text, then we will need a skip button (?)
    But we can talk about this later.

    Or do you mean a dedicated button to skip an entire conversation? I'm not sure how that plays out when you have choices. Then what do you do, you only skip to the next choice? And what if now you need to make a choice but you don't have the information (because you didn't read), but also you don't have the option to go back?

    Personally I'd just keep it simple for now: Advance takes you to the next line of dialogue, and confirms choices.
     
  18. cirocontinisio

    cirocontinisio

    Unity Technologies

    Joined:
    Jun 20, 2016
    Posts:
    440
    For cutscenes:
    Until now, we were only talking about skipping dialogues, not camera shots. But I don't think it's very useful, then it might make the action confusing. If we go with the direction of allowing the user to skip to the next shot... fine, I don't see it as very useful since our cutscenes won't be that long, but sure.

    I do think it would be nice to have a skip button though (and yes, make it so you need to hold it), but only for the scenario where somebody is replaying the game for the second time and they want to skip (for instance) the opening cutscene.
     
  19. kirbygc00

    kirbygc00

    Joined:
    Apr 4, 2016
    Posts:
    45
    I see, that makes perfect sense. I agree, we should wait until animations are in before we start thinking about skipping dialogue lines. And I agree, it quickly gets messy if player choice is involved at all. Definitely do not think we should be skipping the entire dialogue in that case.

    So my take is- skipping dialogue lines is only something we should think about once text animations are in. No skipping of entire dialogues (ever).
     
  20. kirbygc00

    kirbygc00

    Joined:
    Apr 4, 2016
    Posts:
    45
    Sorry, maybe i misrepresented this. I think it is a 'nice to have', a 'no-rush' feature. I do not think this is a priority. It is something i've seen as the standard for many other games, so that was why I brought it up. I think it is good to document this and store it as work for later.
     
  21. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
    By advancing fast, doesn't mean you instantly see the next DialgoueClip.
    That's only mean jumping the Timeline to the end of currently played DialogueClip.

    If there is a hole between DialogueClip (like we make the camera showing something to the player),
    that still can't be advanced (since in my proposition, advance dialogue only available if playhead is on a DialogueClip).

    Yeah, it's not really needed right now, but I just want to make the cutscene more responsive.
    Maybe after we've done branching, how's that?

    btw, here is scenario that make cutscene system is 'unresponsive':
    1. Designer want to show "Hello" text (in DialogueLine).
    2. The designer make a DialogueClip without changing the default length (default length is about 5 second long)
    3. The designer bind the DialogueClip with the DialogueLine ("Hello" text).
    4. Let say player read "Hello" text only about 1 second.
    5. The next 4 second is an awkard moment of silence XD.

    If we able to advance dialogue anytime (even when playhead doesn't reach the the end of the a specific clip),
    that will make the game more responsive.

    And yeah, about skipping dialogue, it's kinda 'complex' to implement.
    But... if we still have time, and want feature similar to that, we maybe just need to set Timeline speed to 1.5 or 2 while auto advancing any DialogueClip that occur (except if there's a choices).
    So, even if there is a choices, player won't miss and we don't need to make 'complex' algorithm to solve that. (Not a skip button, but fast forward).
    How's that?
     
    Last edited: Nov 13, 2020
  22. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
    btw, I'll try to work on branching feature next week,
    Let see what I can come up with
     
  23. cirocontinisio

    cirocontinisio

    Unity Technologies

    Joined:
    Jun 20, 2016
    Posts:
    440
    Just to clarify, I don't think cutscenes should have branching.

    Only regular dialogues.
    That's a mistake on the designer's side. I don't think we need't implement a skip system to allow the player to fix the shortcomings of badly-designed cutscenes!

    These all sound like a bit too much thinking to me, I haven't seen many games that allow to skip shots WITHIN a cutscene.
     
    Sarai likes this.
  24. Emikey1

    Emikey1

    Joined:
    Feb 22, 2020
    Posts:
    8
    Hi Guys, I'm new to this open project. I would like to get involved in the dialogue system work stream - is there anything I need to read to get up to speed apart from what is in the roadmap? What system is being used to display dialogues? how are tasks organised?
     
  25. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
    @Emikey1
    Dialogue and cutscene system is explained in the 3rd livestream:


    In that video, they also explain how to contribute, what to do next, and more.
     
  26. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
    Ohh, and also
    some task that are outside of road map but will need to do (if I remember correctly) is:
    - Add special formatting to the font (make the text bold, change the text color)
    - Displaying dialogue in preview mode of Timeline
    (explained in the video as well)
     
    Last edited: Nov 17, 2020
    cirocontinisio likes this.
  27. Emikey1

    Emikey1

    Joined:
    Feb 22, 2020
    Posts:
    8
    Many thanks Sarai - will check out the video as a first step
     
    cirocontinisio likes this.
  28. Emikey1

    Emikey1

    Joined:
    Feb 22, 2020
    Posts:
    8
    @Sarai - Hi, I watch the video about the dialogue and cutscene managers. It looks like the dialogue manager can be used independently so is that the best place to start? If I want to play with it, is it easy to get up & running in a separate project?
     
  29. Sarai

    Sarai

    Joined:
    Jul 20, 2014
    Posts:
    11
    @Emikey1
    Yep, they are independent from each other thanks to Ciro.
    So yeah, it's easy to get up and running in separate project.
    Why don't you try it out?
     
  30. Emikey1

    Emikey1

    Joined:
    Feb 22, 2020
    Posts:
    8
    @Sarai will do this week.

    @cirocontinisio - how will individual systems in this game be documented? I presume only a few people will be able to understand the E2E project? Therefore people may come to this project in the future trying to get inspiration for a particular issue they are trying to solve - e.g. I'm interested in adding dialogue to a prototype I'm developing as part of the Junior Programming Course with unity ..... if this is something of interest, I could try to document the dialogue manager .... is there an exemplar for how systems should be documented to make them easier to re-use in other projects?
     
unityunity