I have a good amount of Data Tables for my game that has Dialogues, face animations, body animations, subtitle text etc. Now every chapter and chapter’s segment calls it’s own DT Like Ch1 Seg1, Ch4 Seg5 etc.
I use my GameInstance to sort out DT as needed, and play dialogues as needed (dialogues along with animations, subtitles etc).
That’s how DTs are sorted
Initially, I was using hard references then I saw the Size Map and it was around 27Gb for Disk and 6Gb for Memory. Then I switched to soft ref. Now it’s 3.5Gb disk and 1.5Gb memory. But due to that, I had to use a new node called AsyncLoadAsset then Cast to DT Class then set the Required Data Table in the variable.
This is the Set DT Fn, that fetches whichever DT is required according to Chapter/Segment. Converts soft Ref to hard ref
Now it does work, but there are 2 issues .
First, it loads slowly . It’s not instantaneous like hard ref were.
Second, it still creates hitches as it loads (unreal shows on top right “preparing sound wave preparing animation asset” etc).
Now keeping in mind, I re-installed Windows a few days ago so maybe there’s no Asset Cache memory of all the DTs, hence this loading issue. But my question is, will this be a problem when I build the game?
This screenshot shows the Play Dialogues Fn that loads the DT and fetches data
The game is intertwined to dialogues like let’s say a new Chapter is triggered. There’s a Dispatcher that is called inside the current level to do task accordingly (like lets say its Ch3 Seg1 and NPC A needs to go here B needs to do this etc).
The screenshot below shows external scenario for updating Ch/Seg. First node sets the Chapter/Segment and calls all dispatchers/TriggerBoxes and updates them about the same. Second node simply Plays the dialogues.
So like in the above screenshot, there are a good few moments when Dialogues are played instantly after setting new Ch/Seg. The problem is, it will cause issues bcz Level will run it’s code assuming dialogues are playing. But it won’t look proper as there will be a delay + hitching as game loads the DTs.
In some cases, dialogues are played right after triggering the next chapter node, whereas in other cases, there may be some delay in playing dialogues. The latter case is fine but the former is not, as there will be a disparity as DT is loaded and then dialogues are played, due to the delay of loading. Not to mention the hitching.
So now, again, will the final build have this issue ? That’s my main concern. I can continue my work knowing the final build won’t be affected.
And, is there a way to load certain assets (esp DTs) on the main menu as the game loads so that hitching is prevented?