Thank you sooo much for this tutorial. I spend a days on figure out why after start is everything lagging, and now I understand why its loading screen in games :)
I alway made a loading screen like this but I added a charge indicator with a animated beam to the overlay scene. The animation of the beam was as long as the animation of the loading camera and I counted the frames of the camera with a property. I assigned the value of this property to the value of a property of the beam who pretened the frame of its animation. This was a exatcly indicator for how long the scene will loading.
+AniProGuy Yeah I was thinking about using this as an 'alternative' the only problem is if there is any sort of frame drop and the animation/timer gets desynced, then it could switch too early and the loading bar would be incorrect. This is also why using an actuator sensor could be better than a property as the animation and logic are slightly out of sync by default.
Since the BGE actually doesn't have asynchronous loading as far as I know, all of the data is loaded in upon starting the scene... so this is more of an unnecessary delay. In a production level game all of the scene graph hierarchy and common data is loaded in while the scene hasn't actually started yet. then (in some more open-world games or engines suited for large environments) more data is streamed in from a background thread based on the active camera's distance from sectors of the world or sort of cached reference points while the game is running. The BGE as far as I know doesn't have the ability to run another scene while loading resources on a separate thread. (8:08 also as a note: lights are just points in space with properties therefore they barely take up any memory at all and are loaded at the start) I'm not sure how the Level of detail works perhaps there is some benefit but why wouldn't you just hide the LOD meshes somewhere in the level just to ensure its loaded without any additional delay? So correct me If I'm wrong but this is more of a "smoke and mirrors trick" really than an actual sequence during a background process.
+ast r (astr125) Yes it is more of a 'hack' instead of a proper loading sequence. This is because BGE doesn't allow access to any of the modules loaded unless you are using LibLoad which crashes often. As mentioned in the video BGE loads everything at once which (depending on the file size) can cause long white screen's. To avoid this we can simply show the user what is happening by putting 'loading' at the start. Regarding LoD, while putting them in the same level would ensure quick loading, it would not work well in the long run because the game has more idle vertices to deal with that can't even be seen so it would sort of be a waste of resources.
ThaTimst3r I'm not sure how the BGE handles that kind of data pooling but I would imagine if the mesh was occluded or out of the view frustum that the performance impact would be minimal. (I've seen games for the Sega Saturn and N64 use the same technique by just hiding it under the level through out of bounds glitches, and they have a fraction of the power of the lowest end mobile devices) but my knowledge isn't with the BGE mainly its with Unity, so I'm not sure how its handling of that data is different from Unity, Unreal, or even my own in-house engine. you might be totally right with this. But I still think it would be beneficial to just "teleport" those Objects to the camera over just a few frames or just have different cameras to switch between just not to interfere with other camera mechanics for your main camera. Perhaps just load a level loading.blend file level, load the desired .blend level, stop the render loop from updating before the frame is rendered (I'm not sure if blender allows access to that with Python), and while the renderer is paused, destroy those existing LOD placeholder objects and then resume rendering. (It would be a one or two frame static image or black screen if you prefer but its still faster than flying around and the closest thing to a legitimate loading screen in the BGE) Sorry about the massive wall of text...
I'm slightly confused. Do you have to have the load camera run through the scene? Does blender have to "see" objects in order to load them? I've never experienced that, but I haven't made any large scenes before. If the camera isn't directly needed, wouldn't it be easier to play your level on a slightly slower computer and get the actual amount of time it takes to load up properly (no lag) and then set the loading screen to load that full amount of time?
+Nickolas George That is the problem, blender doesn't allow you to 'preload' anything unless you are using libLoad, which crashes very often. Therefore we load everything in realtime but do not show it to the player, instead we 'blindfold' them with a loading screen until the scene is ready.
sir. it's me again. thank you for your help. I'm just gonna ask 1 last question, how can you connect a mysql database in blender, that can record the player name and other things? Thanks sir.
ThaTimst3r oh, thanks anyway sir.. i appreciate your help, you're a lot of help sir. thanks. i liked your facebook page.. just waiting for your next tutorial sir.. i just hope that it is related to what i have ask lately. xD :D thanks anyway
if i have an object with sound it will play while loading, how do i stop that from hapening?, and how do i disable all the movement of the player, because the player can still move while loading
+blend egg I tried both, but the interfaces are un-intuitive and hard to learn. I'm going to finish my game (Marble Expedition) and then I might consider putting more time into learning how to use the other engines. For now I will only be using BGE
+ThaTimst3r I'm really looking forward to you doing some Unity tutorials! I am learning the BEG and Blender in general now for some years to make assets and games, but as for the game making side I always end up at a point where I'd have to reinvent the wheel to make something happen in the BGE (e.g. no particles, no realtime GI, no native networking,...). So I was really struggeling to move to another engine but I am learning Unity 5 now, which really becomes more and more intuitive when using it. I was also afraid of not be able to code in Python any more, but you can choose between C#, JavaScript and Boo, and it so happen to be that Boo is just like Python! :) (although I got used to C# now). I also really like the massively object orientated programing style you use in Unity. Now three cool facts on top of it: With Unity 5, they implemented everything you really Need for making games in the free Version of it! You still need to use Blender for making assets, as Unity is really only a game engine. Unity 5 can open *.blend files! You can have both programs opened, modify your asset in Blender, save it and it will automatically be updated in Unity. :)
+Maister2677960 Awesome that sounds very useful! I'm not sure how many 'Unity' tutorials I can do as I will have to learn how to use the engine first. While it is great to have the features all there, I think it is also good to create them from scratch so you can learn how everything works. The only downside to unity apart from the interface is the cost if you want to try and commercialize the game. You are expected to pay for the commercial license, each new release, and a cut of the profit that your game makes. This could easily lead to half of the games earnings being lost due to fees. Either-way as I mentioned, I want to try and finish a commercial game in BGE to 'complete' my BGE career, before moving onto other engines such as unity, godot, unreal etc.
ThaTimst3r That is right. I also like to learn how to do those things from scratch, but I also like to implement the game I have in mind without having to create all the features in the first place. I am really looking forward to seeing the finished game you will come up with ;) But I think you are slightly wrong about the commercial license. I just looked up in the unity faq: Q: "Are there royalties or a per-title fee?" A: "No, Unity does not charge on a per title basis and you do not pay royalties or pay revenue share, even for games and applications made with the free Version." Q: "Can I make Commercial games with Unity Personal Edition ? (the free one)" A: "Yes, if you meet the requirements to use Unity Personal Edition, mainly, that you did not earn/receive more than $100,000 in revenue/funding in the last fiscal year." So if you earn more than $100,000 Revenue per year, you will have to buy a comemrcial license in order to continue using Unity.
THANK YOU. My game now runs way smoother! Finally what I was looking for!
thanks!! this is one of the things the people ever ask but no one knows!!
Thank you so much! This STILL works 2 years later!
RUclipss algo is wrank. Could of done with this one few years ago, but will still help today.
Thank you sooo much for this tutorial. I spend a days on figure out why after start is everything lagging, and now I understand why its loading screen in games :)
Thanks so much for this! It really improved the speed of my game!
whats your game name
I alway made a loading screen like this but I added a charge indicator with a animated beam to the overlay scene. The animation of the beam was as long as the animation of the loading camera and I counted the frames of the camera with a property. I assigned the value of this property to the value of a property of the beam who pretened the frame of its animation. This was a exatcly indicator for how long the scene will loading.
+AniProGuy Yeah I was thinking about using this as an 'alternative' the only problem is if there is any sort of frame drop and the animation/timer gets desynced, then it could switch too early and the loading bar would be incorrect. This is also why using an actuator sensor could be better than a property as the animation and logic are slightly out of sync by default.
In my games there is only a little bit "lagg" but it's like in real games ^^
Just what I expected!!!!!
Can you make a tutorial on how to create a Fog of War, like in mobas. For example in League of Legends.
if you want to make fog go to the world settings and enable mist that will make fog but it also consumes a lot of cpu memory
Nice tutorial ! Thank you
Since the BGE actually doesn't have asynchronous loading as far as I know, all of the data is loaded in upon starting the scene... so this is more of an unnecessary delay. In a production level game all of the scene graph hierarchy and common data is loaded in while the scene hasn't actually started yet. then (in some more open-world games or engines suited for large environments) more data is streamed in from a background thread based on the active camera's distance from sectors of the world or sort of cached reference points while the game is running. The BGE as far as I know doesn't have the ability to run another scene while loading resources on a separate thread. (8:08 also as a note: lights are just points in space with properties therefore they barely take up any memory at all and are loaded at the start) I'm not sure how the Level of detail works perhaps there is some benefit but why wouldn't you just hide the LOD meshes somewhere in the level just to ensure its loaded without any additional delay?
So correct me If I'm wrong but this is more of a "smoke and mirrors trick" really than an actual sequence during a background process.
+ast r (astr125) Yes it is more of a 'hack' instead of a proper loading sequence. This is because BGE doesn't allow access to any of the modules loaded unless you are using LibLoad which crashes often. As mentioned in the video BGE loads everything at once which (depending on the file size) can cause long white screen's. To avoid this we can simply show the user what is happening by putting 'loading' at the start. Regarding LoD, while putting them in the same level would ensure quick loading, it would not work well in the long run because the game has more idle vertices to deal with that can't even be seen so it would sort of be a waste of resources.
ThaTimst3r I'm not sure how the BGE handles that kind of data pooling but I would imagine if the mesh was occluded or out of the view frustum that the performance impact would be minimal. (I've seen games for the Sega Saturn and N64 use the same technique by just hiding it under the level through out of bounds glitches, and they have a fraction of the power of the lowest end mobile devices) but my knowledge isn't with the BGE mainly its with Unity, so I'm not sure how its handling of that data is different from Unity, Unreal, or even my own in-house engine. you might be totally right with this. But I still think it would be beneficial to just "teleport" those Objects to the camera over just a few frames or just have different cameras to switch between just not to interfere with other camera mechanics for your main camera.
Perhaps just load a level loading.blend file level, load the desired .blend level, stop the render loop from updating before the frame is rendered (I'm not sure if blender allows access to that with Python), and while the renderer is paused, destroy those existing LOD placeholder objects and then resume rendering. (It would be a one or two frame static image or black screen if you prefer but its still faster than flying around and the closest thing to a legitimate loading screen in the BGE)
Sorry about the massive wall of text...
I think this is a very useful tutorial. I was gonna ask if you'd like to have your name in the credits but I already did.
pretty dope man!
I'm slightly confused. Do you have to have the load camera run through the scene? Does blender have to "see" objects in order to load them? I've never experienced that, but I haven't made any large scenes before.
If the camera isn't directly needed, wouldn't it be easier to play your level on a slightly slower computer and get the actual amount of time it takes to load up properly (no lag) and then set the loading screen to load that full amount of time?
+Nickolas George That is the problem, blender doesn't allow you to 'preload' anything unless you are using libLoad, which crashes very often. Therefore we load everything in realtime but do not show it to the player, instead we 'blindfold' them with a loading screen until the scene is ready.
ThaTimst3r Ok. Thanks. By the way, you're about the most helpful blender tutorial-er on youtube, and I'd love to see any game that you make.
sir. it's me again. thank you for your help. I'm just gonna ask 1 last question, how can you connect a mysql database in blender, that can record the player name and other things?
Thanks sir.
I'm not sure I haven't tried this before, I would google this to see how it is done. Otherwise you can use a text file to save the values.
ThaTimst3r oh, thanks anyway sir.. i appreciate your help, you're a lot of help sir. thanks. i liked your facebook page.. just waiting for your next tutorial sir.. i just hope that it is related to what i have ask lately. xD :D thanks anyway
I feel privileged to have witnessed the most polite person on the Internet.
that´s pretty cool!
How would you do this for a giant house? Would you move it all around the house?
+Eman EL Yes or through each room. The 'loading' animation can be very fast, it doesn't have to be as slow as in the video.
if i have an object with sound it will play while loading, how do i stop that from hapening?, and how do i disable all the movement of the player, because the player can still move while loading
+nahuelisimo1197 Use a property that is switched to True once loading is finished. Then plug this into the movement etc. (with an and controller)
thanks ;)
are you use unreal engine or unity engine?
+blend egg I tried both, but the interfaces are un-intuitive and hard to learn. I'm going to finish my game (Marble Expedition) and then I might consider putting more time into learning how to use the other engines.
For now I will only be using BGE
ThaTimst3r
thanks for comment.
yes ,i think unreal engine is very hard(to many node!!).
+ThaTimst3r I'm really looking forward to you doing some Unity tutorials!
I am learning the BEG and Blender in general now for some years to make assets and games, but as for the game making side I always end up at a point where I'd have to reinvent the wheel to make something happen in the BGE (e.g. no particles, no realtime GI, no native networking,...).
So I was really struggeling to move to another engine but I am learning Unity 5 now, which really becomes more and more intuitive when using it. I was also afraid of not be able to code in Python any more, but you can choose between C#, JavaScript and Boo, and it so happen to be that Boo is just like Python! :) (although I got used to C# now). I also really like the massively object orientated programing style you use in Unity.
Now three cool facts on top of it:
With Unity 5, they implemented everything you really Need for making games in the free Version of it!
You still need to use Blender for making assets, as Unity is really only a game engine.
Unity 5 can open *.blend files! You can have both programs opened, modify your asset in Blender, save it and it will automatically be updated in Unity. :)
+Maister2677960 Awesome that sounds very useful! I'm not sure how many 'Unity' tutorials I can do as I will have to learn how to use the engine first.
While it is great to have the features all there, I think it is also good to create them from scratch so you can learn how everything works. The only downside to unity apart from the interface is the cost if you want to try and commercialize the game. You are expected to pay for the commercial license, each new release, and a cut of the profit that your game makes. This could easily lead to half of the games earnings being lost due to fees.
Either-way as I mentioned, I want to try and finish a commercial game in BGE to 'complete' my BGE career, before moving onto other engines such as unity, godot, unreal etc.
ThaTimst3r That is right. I also like to learn how to do those things from scratch, but I also like to implement the game I have in mind without having to create all the features in the first place.
I am really looking forward to seeing the finished game you will come up with ;)
But I think you are slightly wrong about the commercial license. I just looked up in the unity faq:
Q: "Are there royalties or a per-title fee?"
A: "No, Unity does not charge on a per title basis and you do not pay royalties or pay revenue share, even for games and applications made with the free Version."
Q: "Can I make Commercial games with Unity Personal Edition ? (the free one)"
A: "Yes, if you meet the requirements to use Unity Personal Edition, mainly, that you did not earn/receive more than $100,000 in revenue/funding in the last fiscal year."
So if you earn more than $100,000 Revenue per year, you will have to buy a comemrcial license in order to continue using Unity.
the load screen does not appear
Make sure you added it as an overlay scene while the camera moves.
i did but nothing appears no loading screen just shows my title screen
Oggy Cather Is the loading scene for your title screen or for the game?
yep
Oggy Cather If its for the title screen then don't set an overlay, instead start on the loading scene and on the loading scene load the title scene.
Awesome
HAHAHAHAHA The game is white hahahah
5:36
=o