Page 1 of 1
Slight Lag on Startup
Posted: Fri Jun 26, 2015 3:00 pm
by Rocco
So our game is just about complete! We are going through some final optimization steps and we realized that there is a slight lag at the very begin when a scene is first loaded for the first time. Currently the beginning of the game is our character appears and speaks a couple of lines of dialogue. However there is a slight lag at the beginning, presumably the entire DSDB loading up. Is it possible to access this loading process or know when it is complete and THEN begin the game?
I will keep digging in the mean time! Thanks ahead of time.
Re: Slight Lag on Startup
Posted: Fri Jun 26, 2015 6:03 pm
by Tony Li
Hi Rocco,
Congrats on getting close to completion! As you wrote, the lag is either due to loading the database or loading the dialogue UI. You can preload both with these commands (or their PlayMaker/plyGame/etc. equivalents if you use visual scripting):
Often the dialogue UI is what takes the longest, since a single large texture can sometimes be bigger than your whole dialogue database.
These are both blocking operations, meaning they don't run asynchronously, so Unity pauses while they run. (It's a limitation of Unity's ScriptableObject system.)
You may want to throw up a loading screen to distract the player just before you call these methods.
By preloading them, you can control when the lag occurs instead of hitting the lag the first time a conversation starts.
Re: Slight Lag on Startup
Posted: Mon Jun 29, 2015 11:15 am
by Rocco
Thanks a lot for all the help Tony with Dialogue System! The project has nearly come to a close with our web release on YTV.com. You can check out the web version of the game at the following link!
http://www.ytv.com/game/the-stanley-adventure
Note: It currently only works in every browser but Chrome due to WebPlayer plugin problem with Unity and Chrome. We also have received some reports of things not working in Firefox on Windows Based Systems. Hope you enjoy it! Keep in mind the age group range is most likely younger then yourself.
Re: Slight Lag on Startup
Posted: Mon Jun 29, 2015 5:08 pm
by Tony Li
The Stanley Adventure looks great!
May I add some screenshots to the Dialogue System's Games Showcase page?
I didn't play too far into it, but it seems to work fine in Firefox and IE 11 on Windows 7 x64 over here.
Re: Slight Lag on Startup
Posted: Mon Jun 29, 2015 5:25 pm
by Rocco
Hey Tony. I will need to clear permission for that request through management. I will make sure to get back to you shortly!
Re: Slight Lag on Startup
Posted: Tue Jun 30, 2015 11:44 am
by Rocco
Hey Tony,
So I just cleared permission. You are indeed allowed to post some screenshots of the game on your gallery. Once again, thanks a lot for all the help you having provided throughout the development of the project! All the best in your future endeavors with Dialogue System!
Re: Slight Lag on Startup
Posted: Tue Jun 30, 2015 10:10 pm
by Tony Li
Thanks! And all the best for The Stanley Adventure!