Basically, i have a global script in which i preload() every room the player can enter. So if the player enters a door, i just call the autoload to instantiate the scene the player's supposed to end up in. It works pretty well, but i'm not sure if this is a good practice?

As i understand it, preloading something keeps the scene loaded even when it's not being used, so would having a lot of rooms preloaded eventually lead to performance issues?

  • SnapCracklins replied to this.
  • Squiddy i am doing a project with an architecture similar to yours. I have seen no issue. If it is doing what you need it to do, I wouldn't overthink it.

    For larger scenes, you may want to load upon reaching them, but I hardly have to do this.

    Worry about the problems when they show up and actually affect the game.

    Certainly increases the memory used, but unless you hit virtual memory where it starts swapping to disk cache I don't think it should affect performance all that much as such... though if you are constantly loading and unloading data to/from the GPU that can indeed affect performance as well. To really know you need to profile it.

    Squiddy i am doing a project with an architecture similar to yours. I have seen no issue. If it is doing what you need it to do, I wouldn't overthink it.

    For larger scenes, you may want to load upon reaching them, but I hardly have to do this.

    Worry about the problems when they show up and actually affect the game.