Forum rules - please read before posting.

PreLoad all?

Hi,

Is there a way to pre load everything, or in acts, on first load?

I find that all scenes take a while to load, and I wonder if there is a way, to purge old scenes or files if not necessary anymore as the game progresses. Games like Thimbleweed Park (which I know are newly built programs) load so swiftly. I cant seem to get pre load scenes to work, no matter if I use pre load scene data on start in a scene. 

It's odd because even when you have visited a scene it seems to reload from afresh every time....

Any ideas on this, or is there a way to write a bespoke script?

cheers

James

Comments

  • edited November 2017
    The Manual has a "Performance and optimisation" chapter for things you can do to improve performance on the AC side of things.  If you have an issue with scene-preloading, then please share more detail so that it can be looked into.

    In general, however, this is a question for Unity rather than AC.
  • Hi,

    Thanks. My scenes take a while to load. I want to avoid this and pre-load all scenes at the beginning go loading the game, or when you press start in the first scene.

    Things I have tried:

    1. Putting in a loading scene, using scene:switch 'pre-load scene' in some scenes to pre-load the next two scenes/rooms that can be accessed, but this doesn't seem to speed up loading?
    2. Not having a loading scene - just black with same time to load.

    I wouldn't say my scenes are overly complex, and judging by todays games of similar ilk, I'm sure there is a way to speed up/pre-load all scenes in start somehow?

    Any ideas?

    Thanks

    James
  • AC ActionLists don't run in loading scenes - they're for display purposes only and will close as soon as they finish loading the next scene.

    When it comes to preloading, you generally use it in the previous "proper" scene once you know what the next scene is going to be.  e.g. if there's a Cutscene that ends with a scene-change, you'd preload the next scene at the start of it.

    I can't speak for how Unity works but I'm not sure if it's possible to preload multiple scenes - it might be that preloading another causes the first to be "forgotten".  But again, this is a Unity topic rather than one specific to AC.  The usual habits of compressing textures, packing sprites, etc all need to be considered for a high performance.
  • Thanks Chris, so, here is an example of my 4 scene demo and a pre load I’d set up if I’ve got this right:

    1. Title scene (leading to control room scene)
    Set up pre load for control room in title scene on-start. This should then preload control room, ensuring no load time.

    2. Control room (leads to play room and dock scenes)
    Set up a pre load for dock and play room scene on on-start of Control Room scene.

    3. Play Room (leads back to Control Room scene)
    Surely this Play Room scene won’t need to pre-load the Control Room as it has been already loaded on the Title Scene?

    4. Dock (leads back to Control Room)
    Same as 3. Play Room?

    Hope that makes sense?

    So my question is, do the scenes stay pre loaded once the player goes into the play room scene? Or, will it re load the control room when coming back? Therefore ruining my pre load set up?


    Also, for this to work, so I need it on asynchronous or off?

    Thanks chris!
  • Again: I can't speak for Unity as the code is still leveraging Unity's features, so it's still down to Unity.  However, I would guess that multiple preloading is OK, but data is lost once a preloaded scene is opened and then closed.

    Asyncronous loading is necessary for preloading.  Also be aware that while preloading should indeed improve load times, it doesn't make them disappear completely.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.