What exactly affects scene loading time?
I'm having some issues with scene loading times in my project, Feed the Rats.
For example, when restarting a level, it takes quite a significant number of seconds (triggers the Reset Scene behavior). Also slow when going into levels (Change Scene behavior).
I am trying to figure out what exactly slows down the scene loading time.
1. Is it the total number of actors within the scene that is loaded? According to my tests, this MIGHT be true.
2. Is it the size on disk of my art assets within that scene?
3. Does it relate to the complexity of the rules within the scene that is being loaded?
My game is quite complex, since I have been adding stuff and polishing for over 6 months. Any hints would be valuable, and I am pretty sure I would not be the only one wanting to know this
Comments
Might read this thread. It has a bit of info that should be somewhat helpful.
http://forums.gamesalad.com/discussion/88896/load-time-culprits
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
Thanks, interesting read. That does not really apply to me though: music isn't the culprit, and I also tried checking and unchecking Preload Art. The code is as optimized as it can be. I know that it's a bit complex though.
I am curious how art assets/ number of actors/ size of actors affects this... any drops of knowledge?
It has to do with how the code is complied once published. GS is working on this issue.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I really hope so. I started receiving negative reviews because of loading times, after so much hard work ...
While I hope that the GS team will be on it because it is a MUST-IMPROVE (this is the main reason why Unity is looking better and better), I still hope that there is something that I can do in the mean time. I don't want low ratings because of this to sink the whole project.
That being said, if anyone has any ideas, please let's gather them in this thread and I will compile all of them and post them in a nice list for everyone to refer to. I think this would help a lot of GS users!
So, what affects scene loading times? ...
You say your code is optimized, I'm not sure what that means. There is bloated code and integrated or efficient code. How do you know your code is highly efficient? It might be efficient to the level of your coding ability but that does not mean it is highly efficient. When I see people say this It is always a red flag. Have been around here for years and seeing tons of people's project, I can say rarely is the code integrated. Most people watch a video and write code based on the method they saw for a specific thing. Then they replicate this over and over for each thing. This is not writing integrated efficient code. Writing efficient code comes from understanding all the methods and ways things can be coded in GS and as a whole building a code with a mix and match of those methods streamlined.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I stopped using scenes in all. At least until loading times speed up. It takes longer to do, but makes your game overall better.
What does 'stopped using scenes in all' mean ?
Yeah, the load time thing is a real deal breaker for smartphone players. If you port to say Mac App or any robust platform, the load time is 2 seconds for something that was 10 to 20, but I guess it defeats the purpose if your main goal is to publish to smartphone.
Unity 'looks' better, but it does come with some probs{it's said to be poor for html5 for example, as it's minimum footprint{with no graphics} is a whopping 15mb.}
A quick search on Unity and mobile load times gave this:
http://answers.unity3d.com/questions/174357/level-load-times-are-off-the-chart-unacceptable.html
"To my dismay, I am clocking a shockingly bad 2:26 to load a relatively simple level on iPhone 4. The same level takes 25 seconds on iPad 2. Both are obviously unacceptable."
These are from the early days though, read another post from 2013, clocking 10 second load times for iphone 4 on their game, and now heres a post from 2015.
http://answers.unity3d.com/questions/939060/how-to-reduce-scene-load-time-on-mobile.html
"All my shaders are optimized for mobile. I'm not using mip maps. My texture are on 2 sprite atlases. On a Galaxy Note 4 loading time is about 7 sec. On a Galaxy S3 loading time is about 15 secs. I set it to load game scene first in build setting to see if one scene would have helped, but then unity screen stayed up for about 8 sec on Note 4."
There isn't any game engine that is superior to any other at the moment, they all have their share of problems that will impede any developers progress. I guess that is what the saying "grass is greener" refers to. No matter what game engine/sdk you pick, it will come with it's share of challenges, sometimes in relation to it's strengths.
I'm hoping the best for GS and it's quest in destroying the evil load times, if they are reduced by even half, we will see prosperity and good fortune in the mobile lands.
My guess is tappwater means putting all actors and actions in one scene, then only letting the needed actors be visible. I'm trying to do the same thing with my game. So far it seems to require adding an "Object Attribute [Visible] = True" type rule on top of the mouse-inside and mouse-down rules for every button, and then finishing each instruction set by making the current menu object's Visible = False and the next menu object's Visible = True. So basically it means a tonne of juggling, which means a lot of bugtesting and fixes. The benefit is no more loading times after the first for a smooth gameplay experience.
Ah, I see, yes that's always a good idea, I do the same.
You could - depending on your particular project - just place the menu / main scene / intro title / etc next to each other in a large scene and jump the camera for one location to the next ?
Look even with unity if you don't become a good efficient coder you will have crappy frame rates and crappy load times. I rarely have horrible load times. Step up your skills and your games will run better.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Hello guys,
I will need to find a few ways to optimize my main scene in my game too. I can tell this much so far. I had an actor in the scene that spawned all of the menus( called Menu Spawner). The scene took 8 seconds to load. I then decided to delete this actor from the scene and create another Actor called Menu Spawner Spawener. So this Actor spawns the Actor that has actually the Spawn rules. The loading times were slightly faster by 2 seconds. However when tested on Kindle Fire... (the reason why I test it on an old device is because if it loads fast on that it will only be faster on newer devices) ... the loading times were again somehow slower, but still faster then if I had only the first actor with all the spawns.
I will do more tests in regards to this and post my finds here.
I will test again but I'm almost positive that with zero changes to code, my scene change loading times doubled as a result of the most recent creator builds. I believe the GS staff is looking into this
POLAR ROLLOUT (New Line-Drawing Physics Puzzler!) - FREE Download
That is true. They are working on reducing them. But we must also understand how we do things also effect the results as well. So we must do our part and they will do theirs.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Hmm this is even more elusive than I initially thought, since nobody seems to know exactly what impacts loads speed.
@Lost_Oasis_Games I get what you're saying, but the code is as optimized as I could make it. Anyway you put it, it is not THAT complex to warrant such long loading times. It just doesn't really add up. I am pretty sure that other things affect loading times.
What I am trying to figure out is whether or not art assets' size-on-disk affects it, or total number of actors within the scene being loaded - or both. I made some testing scenarios which I will try and analyze further, and will update.
What I know so far is that inserting one actor multiple times in the scene slows the loading time: I used to have 'modular' backgrounds which I could piece together based on the level that I worked on. Having 10 pieces in the backgrounnd (same actor put multiple times with changed image) warranted MUCH longer loading times than one huge actor with everything in it.
Does snyone know if unused actors in a project slow down loading times? In other words, if an actor is not placed in any scene, or referenced in any of the logic, is it still loaded into memory?
@Lost_Oasis_Games While what you say about well planned and efficient logic is true, it's a tiny factor in load times. The engine overhead, loading of image, loading of music in particular, it all takes much too long. And as someone else noted, recently increased significantly. Not too long I did an experiment where I had a game that was taking 20 seconds to load (i.e. 15 seconds longer than the longest acceptable duration). I'm going to be approximating here as I don't have my exact results to hand, but I found:
Stripping the artwork - Load time reduction of about 3 seconds.
Stripping the music - Load time reduction of about 7 seconds.
Stripped the logic - Load time reduction of about 0.3 seconds.
Sometimes logic is so bad it ties GameSalad up in knots and really is a big factor, but the vast majority of the loading time people are experiencing is outside of their control.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
In this case, based on my observations, only the initial app load time is affected (i.e. the one with the loading image). Not using an actor in a scene does not add to scene loading times, which are really the bummer here.
I noticed that if you put many small actors in a scene (more than 15), the scene loading time will take a big hit.
Yes I agree the main culprit is how GS is doing things with images and music as those are the most heavy items to load. Bad code more effects the frame rate during gameplay aka lagging.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Yes, GS has serious problems with loading scenes (even relatively simple ones). Makes the elevator transitions in Mass Effect seem like a pleasant pastime.
This is one of the reasons why I build my apps almost exclusively as one-scene projects, though of course that can then have a negative impact on memory use. It's always a juggling act.
I would say this is a very important issue, as it often directly affects the user's experience and isn't something we as developers can do much about. If you are making a game for retina devices, like it or not, you will use a lot high-res images, which will impact loading time. If you reduce the image size, or hack GS to use JPEGs, on high resolution screens you will end up with muddy graphics and/or artifacts.
As much as I love GS, there is a lot left to be desired in this department.
@pHghost You can say that again! I sketched out my next project and you can bet it's gonna be a continuous-play (i.e. non level based), 1-scene kind of app.
However, I still need to make Feed the Rats as fast as possible and I am open to trying anything to speed it up. I mean, in the focus groups that I've done to test this game, 20% of the interviewees said something about load speeds. This is not really acceptable, especially considering that it is not very clear what exactly causes such long load times. If we knew, we could find workarounds for those specific things.
EDIT - maybe this could be useful for you too, until GS improves the Creator: I've read some studies on the topic, and you can use some psychological tricks to have users think that the loading is quicker than it actually is - give them something interesting to stare at while the loading happens. For my Feed the Rats project, I will add in the next update some interesting game-related random quotes that you can read while you wait for the level-scene reset. Hope this helps!
That helps at first, but once those quotes get burned into your memory, the effect wears off, at least in my personal experience.
For Feed the Rats -- one practical suggestion: move the reset level button from the pause menu to the level UI. Having it in the pause menu means you have to wait through TWO load times if you know you messed up and want to restart.
Feed the Rats could be done as a one-scene project, though it would have its own complexities, but could be worth considering if the main issue you have is loading times.
Just had a chat with my partner, and this is definitely going into the next update. Thanks for the tip!