How do I make a loading screen so I don't have to render the entire game at once?

I was programming my game while thinking about loading screen. so I thought of bigger games and saw that they didn’t crash so much when i opened the game i played my game i opened it and it took a long time to get started but this is not supposed to happen.
How can I make a loading screen to fix this?

Try Cotaks’s Loading Template -

It uses the Python function Libload() to load in (Scenes, Meshes, Actions)

I didn’t quite understand how it works

Oh, I forgot you don’t know Python.
My bad, & certainly not your fault (really)

Here is a good tutorial for a loading-screen with just Logic Bricks from @ Thatimster -

if I do logic bricks, my game will fail to render everything at once

What?
Where did you hear that? :slight_smile:

is that the loading screen is not just for you waiting for the game to open, it is also for rendering, and if I just open a scene called load and after a while replace with the game scene, it will end up rendering everything at once.

This is basically what the tutorial says & solves -

  1. When you first enter the game scene, Blender freezes, why is this?
  2. Because anything the camera has not seen, is not created yet (because it’s still processing it)
  3. The solution in the video is for the camera to basically travel all over the map so the rendering is already finished when you are just on the loading screen, that way Blender won’t lag when you first see it in-game.
  4. Once the animation for moving the camera is over, the loading screen disappears, & you can play as usual.
1 Like

What do you not understand?

# Change the .blends(line 23) and the path (line 75) if needed. 

so line 75 got the path, in this case it looks for a folder called libload

            path        = logic.expandPath('//libload/' + blend_name)

you can change the libload name to any name you like, as long as you have the .blends that you want to load inside it.

then we get to line 23

def blend_files():
    
    #all your blend files can be placed here whitout the .Blend extention
    blend_files = ['test', 'test2', 'test3', 'test4', 'test5', 'test6'] 
    
    return blend_files

inhere you put all the blends you want to load and are in the folder you created at line 75, but you leave the extention away (.blend), so blabla.blend wil be placed in that list as blabla.

And it will load your blend.
Simple as that, can’t be simpler.

I had gone to test after saying I didn’t understand, but I saw some future issues.
As it does not find the folder because the game will be on the desktop, if I want to fix it, the game would have to install each file into the .Moonlight folder.

the script looks for a libload folder where the blend is opened from, so your blend is on desktop then create a libload folder there and put the blends you want to load in it, simple as that.

It’s not that simple, the player will not want to do a lot of things just to play, and what will be on the desktop will be an executable file.

Yes, but your executable will run your “game blend” that you packed as exe, but the logic in this exe will be to dynamically and asynchronously load another blend file, without freezing the game.

So the blend file that ends up as an executable will only have the minimum inside it to display a loading screen, and run the code to load your actual game in a folder next to it but without freezing.

This will be done using Python, your player will start the exe and the Python code will do everything.

It is not to have any folder on the desktop just the game, the folder with the files should be in the folder where the player installed the game.
the desktop executable is a shortcut.

Yes, the shortcut to the actual place where all your game files will be located, you can have everything there.

when i did this with my first game it didn’t work.
it was another command and such but it worked in a similar way.

Then you simply did it wrong because it should work :slight_smile:

What did I do wrong?

If you had references to different game files within your game folder but weren’t able to access them, then you must have made something wrong somehow. I cannot tell what exactly since I don’t know what you did. But this irrelevant for now, since your current problem is to load a game without freezing.

I created a folder just for the game and export it to the folder and put everything you need in it.