Start main scene first time with lags

Only first time the main scene started with stand alone player show lags and after seconds normalize but if i go to another local of map still persist lags few seconds till normalize.if player dead go to game over scene.if i restarted game no have any lag.This can be problem with load textures do objects?cache?

lol ,it took me a while before i realized you where not talking about legs but lag.

Yes thanks about that

is this the same problem in a new thread?

and it is normal to have a few spikes in the first second or so of loading…unless it is a simple game…you really only need to worry about how it is performing after the first few seconds…that is my opinion…you can also just disable gameplay and have a load screen until the game fully initializes…

The player when i try move rotate is stop very hard lag at first time started game or when i go to new area of map in stand alone player only.
How can disable player enemies?I have laoding game scene wait around 15 seconds then actuator set scene to main work. The problem ocurr with player moving rotating understand in first time only very strange and why not in embled player?the lag only in stand alone player

you didn’t answer my question.

Yes same problem.just trying solve this for can create a good video without lag

problem ocurr with player moving rotating understand in first time only very strange and why not in embled player?the lag only in stand alone player

I know what you mean, some texture get’s loaded and it freezes for a second. I have the same thing with a texture i created.
1 easy way is use a load screen, then when load screen is up you fly with camera trough scene, so it loads in the textures.

Or you can do what i do, ignore it. once texture is loaded in it should run fine 9/10 times.

Yes but i need stop time game of hud and stop ememies they starting at 6 seconds by 6 seconds on random empty pos

use a state.

state 1 loading screen, do your stuff on background, when that is done go to state 2.
at state 2 you got your enemy scripts etc.

but i need put the camera player only that cause have more of 10 ray checking objects and this cause lags too i think

how can use in case the all player object for walk to all map with camera looking objects and textures and back to init position of player in a level? animation? path? the problem is how stop mouse and keyboard till finish walking of player in map?

and this is for 1 map but have more a i will need create for every map?

Just add a second camera just for the fly trough purpose, set this camera active on start(so you look trough this camera).

  • add loading screen
  • let camera fly trough to see all textures you use (not 1 plane with all textures on it, that does not work, tried it myself) it can fly trough very fast like a second or so.
  • then when camera is done, remove loading screen, remove camera, switch player to the player camera.

For you movement scripts etc, you can build in a check with a boolean property like:


use_script = own[property]
if not use_script:
    return

Welcome in the game building world haha.
I would start by using states for this. But also use it in general.

For example, use state 1 to use as loading state, when game start execute everything needed and when done switch to state 2, state 2 being the game state, where all script works like they need/should (to) work.

I prefer to use 1 master object(an empty) that uses it’s states in conjunction with a property/dict entry.
That property is the master toggle for the game, as soon as it hits True, all my other scripts starts running. So in state 1 i use libload when done it goes to state 2, state 2 is placing 3000 assets, when that is done we go to state 3, state 3 is the game state, so i set the property/dict entry on True. You can see my method here: https://youtu.be/yldoqw1HpYw?t=65

Then any camera can navigate around the scene map loading textures to memory?
Will try a test made up then rotate 360 with animation?when complete animation done?need set distance to 400 for cover all scene when rotate

Nice your video but i cant see the second camera to load scene.
I have a bit more hehe of objects in my game the textures many have AO cycles and render bake and shadows too with 2048X2048 then 6 textures = 100MB only in blend file this is a problem. textures go to blend file this is cost performance after in to the games :frowning:

@ cotacs and linuxfree: the single plae with all the textures on it may not work…but what does work…

setup a small group of planes that fit inside the camera frustum and place the textures on them…usually you do not need all the textures just the larger ones e.g. 2048 pow 2 and after the first frame move it out of view or to another layer…I tried doing this…if I remember correctly it worked fairly well…but since then I have made a lot of simplifications useing atlases and such and I no longer had the need to do it.

You said for i put this planes with my 6 large texture inside of new camera? In main scene? Not on a camera player?please clarify this please

My all scene with all layers have 18000 vertices and 13000 faces.i reduce after start P end objects not using dont start scripts of enemies from level 1 then my 10 point dynamic lights all start with 0.00 of energy i think only the Big Textures 2048x2048 around of 10 causing this lag on level 2.
Obs: if i uncheck the shadows in render properties the blender close.this is a bug or error?

directly in front of the camera, after scene start simply move the plane outside of view…somewhere in the level whaere it will not be seen again.

unchecking shadows and crashing is likely a bug.

But the textures is 2048x2048 will need scale is a 10 textures need show all in same time in one front plane?in this case need put all 10 textures in 1 plane then scale to ajust front camera?

no, 10 smaller planes(as individual objects)…you can just parent them to an empty and after first frame move the empty out of view.

Nice your video but i cant see the second camera to load scene.

True, because it does not use a fly trough camera (as i said in my first post). The loading screen is there, behind it, everything gets loaded and are in the camera view (the green wall texture causes my lag) so that actually took care of my lag problem.

I just wanted to show you, how to setup something like that with states.

And about justinbarret how put 10 textures with 2048x2048 in 1 plane at front camera player?