A large cutscene VS many tiny ones

Slate Forums Support A large cutscene VS many tiny ones

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2240
    chopjzl
    Participant

    Hi,

    I am thinking about a character reactions pack. For example, when player use different items, or learn a new skill, the character will react differently.

    So assume I have maybe 30 different reactions, How is the performance between using 30 cutscenes or 1 cutscene with 30 sections?

    #2245
    Gavalakis
    Keymaster

    Hello there and sorry for the late reply. I missed your post.
    Separate cutscene will be slightly faster because in the case of 1 cutscene, when you play the last section, all previous sections (in time) will be evaluated anyway. The difference should not be great really. I would choose the one that works for you the best.

    Join us on Discord: https://discord.gg/97q2Rjh

    #2248
    chopjzl
    Participant

    This is a little different from my prediction.

    As far as I know, a cutscene will be attached to a gameobject. So if I use separate cutscenes, perhaps there will be several hundred more gameobjects with cutscene compoents in the scene waiting to be used. This is my thought before I ask the question.

    How is this compare with the evaluate cost you mentioned?

    #2251
    Gavalakis
    Keymaster

    Hello again,

    If you put everything you need into a single cutscene when you only want to play a small part (section) of it, then when for example you go to play the last section of the cutscene, everything before that section will still be evaluated even if you don’t real want them to (because sampling is deterministic). So if there are for example 100 clips before the section you actually want to play, all 100 clips will still be evaluated (once in enter and once in exit). Thus depending on the final length of that “master” cutscene it may or may not be slower than having multiple cutscenes. Gameobjects by the way and in general do not create much overhead.

    Please let me know if that clarifies it.
    Thanks 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

    #2253
    chopjzl
    Participant

    For gameobjects most worries me is the update cost and perhaps memory usage. I understand sampling cost is cumulative, of course I won’t make the cutscene too long. Take my example above. If I have 10 characters each has 30 reactions, by using 30 cutscenes each has 10 clips, I can save 270 gameobjects and the max sampling cost maybe 9 clips. The key is to find the balance point of these 2 kinds of cost.

    After I typed above I realised that I never tested in practice myself. So I tried to copy 1000 simple cutscenes I made following the quick start. The extra cost is about 0.15ms/frame, while the fps cost before I copy is 0.25ms. The cost of sampling is difficult to track, as I don’t have very complicated clips. But I think when there are many small(1 group, 2~5 seconds) clips waiting in the scene, it is useful to pack 5~10 clips into 1 cutscene.

    Ohh, I forgot 1 thing. There won’t be any update cost if the cutscene component is inactive. How do you think to set cutscene component inactive when it is not playing, and again set it inactive as an onFinish event after it is end?

    #2257
    Gavalakis
    Keymaster

    Hello again,
    Probably finding the balance between the two is a good solution as well, by grouping several sections into one cutscene (maybe by type or level, or any other grouping related to your game).
    When the cutscene has finished playing, it becomes inactive by itself and as such it will perform nothing and thus no cost to performance will come until you start playing it again. 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

    #2277
    chopjzl
    Participant

    Hello,

    I didn’t find the way to set it so that the cutscene becomes inactive when it has finished, and I can’t play a inactive cutscene.

    I kind of know how to do it by myself, I just didn’t find the built-in feature.

    ————————

    And I am trying to integrate with Master Audio. It seems all the MAactions are instant. Could you add a length property to them and make it able to Sample() like the Audio track? Especially for the PlaySound series.

    #2280
    Gavalakis
    Keymaster

    Hello again,

    You can use the callback that you can pass in PlayCutscene so that you disable it when it finishes. Please take a look at the included scripts like CutsceneStarter for an example on how to use the callback.
    Regarding MasterAudio, it is unfortunately not possible to do that, because Master Audio is a dynamic audio system and as such it is no possible to pre-determine length nor sample a specific audio clip since clips are determined on the fly.

    Join us on Discord: https://discord.gg/97q2Rjh

    #2282
    chopjzl
    Participant

    Yeah, the callback is the way I said about do by myself. If there is no other built-in feature, I will Stick to this path.

    At least for one-shot sound, if the time gap is longer than the length of the audio, then just stop the audio. If the PlaySound is not triggered yet, trigger it first and check the length. This will suit most of the need. As the audio I want to sample is mostly BGM and Dialogue

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.