Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lag when using .start() #10

Open
piemanguy opened this issue Nov 21, 2022 · 12 comments
Open

Lag when using .start() #10

piemanguy opened this issue Nov 21, 2022 · 12 comments
Assignees

Comments

@piemanguy
Copy link

Starting a new dialogue freezes the game for 300ms

Im using dialogic 1.4.5 (Godot 3.4)
When i trigger the dialogue event, everything freezes for 300ms,
i looked into the profiler when running the game and it points to the Dialogic.start() function.

this is how i start my dialogue

func start_dialog():
var dialog = Dialogic.start("timeline0")
get_parent().add_child(dialog)

If anyone would be able to help with this it would be great :)

@TaofeekS
Copy link

TaofeekS commented Jan 6, 2023

hi,

i also have the same problem where on my android exports,
i don't notice such lag while running the game on my pc.

i think i has to do with multiple loads happening at the same time. my pc can handle it but my android phone cant without some micro lag

@ii4y-studios
Copy link
Contributor

it is due to multiple loads, yes. I am still working on it, but dialogic-godot/dialogic#1271 should resolve this issue once I finish hooking the pieces all together

@sealionnn
Copy link

Hi @thebardsrc, will this still be fixed in a future update?

@ii4y-studios
Copy link
Contributor

Hi @thebardsrc, will this still be fixed in a future update?

it took a lot longer then I hoped becuse of life issues, but dialogic-godot/dialogic#1271 is nearly complete to be merged hopefully this week. go ahead and try using that branch and let me know how the performance is for you with that! 🙂

@zaknafean
Copy link
Collaborator

zaknafean commented Mar 6, 2023

Feel free to join the testing and discussion in discord.

@sealionnn
Copy link

sealionnn commented Mar 6, 2023

@thebardsrc Thanks for the link and your contributions to this project. That version seems slightly faster, but the freeze up is still very noticeable. The comments for prepare() make it seem like the prepared dialog is supposed to stay in memory, but prepare() runs anytime I call start(). Is this intended? Also, it looks like the documentation broke after I copied your changes over.

As a quick fix for the freezing, I am looking at not letting the dialog delete on fade-out, and modifying change_timeline() to start the fade-in. If I am off-base, let me know if you don't mind.

@zaknafean Is it within the Godot discord? I can't find any discord connected to Dialogic.

PS: First time using Dialogic, and I have practically zero Github/Discord experience.

@zaknafean
Copy link
Collaborator

@sealionnn Its its own thing. You can get to it here https://discord.gg/6hShRw6J

@ii4y-studios
Copy link
Contributor

@sealionnn I'll take a look later this evening to see if I screwed something up with it, prepare() should run the first time start() is run, and then not any subsequent ones after that because it should be resident in memory from prepare(), unless you deliberately clear it for some reason

@ii4y-studios
Copy link
Contributor

@sealionnn I did in fact have that screwed up, lol. Single line, line 50 in DialogicClass.gd, change it to:

if !Engine.get_main_loop().has_meta('dialogic_tree'):

@sealionnn
Copy link

@thebardsrc Thanks, that did speed it up, but I still get a noticeable lag. Maybe Dialogic has too much going on for my computer. I’m going to focus on a custom dialogue system instead.

@Jowan-Spooner
Copy link
Collaborator

@exelia-antonov or @zaknafean is this resolved? Or should we keep this open?

@zaknafean
Copy link
Collaborator

zaknafean commented Aug 26, 2023 via email

@Jowan-Spooner Jowan-Spooner transferred this issue from dialogic-godot/dialogic Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants