Posted By: Kenchu
Models loading when seen? - 03/05/08 22:33
I noticed that some models make 3dgs sort of "stop" for a split second just before they are seen on screen for the first time, like if they were being loaded or something. Can this be prevented somehow? Like loading everything in one go? I though level_load would take care of that?
Posted By: Trooper119
Re: Models loading when seen? - 03/05/08 23:29
I'd like to know what is making your game "stop", considering usually nothing requires that much time to be created or rendered besides possibly a shader or something else on that scale. It also depends on what type of game your playing, a indoor game is specially make by 3DGS to create only the rooms you can see, and therefore doesn't waste resources on things that can't be seen, so upon walking into a large detailed room essentially this could cause the halt in time. level_load creates all entities and there actions at startup, so anything built within the .wmb file will be loaded then however if the game is told to ent_create upon a given condition then it will do so as well. I don't see many games that go through that kind of trouble, usually if your trying to save space an entity will be rendered as invisible and static until it can be seen. Then it will be flagged as active and visible. None of these actions are really noticable in game speed though unless you are doing these actions in mass or are working on a old or lower end computer. If you explain exactly what is happening (a pic with imageshack.com for example) would help. However if I had to make a random guess, I would guess that its something else, not the character is causing your lag. However i've been wrong before, so feel free to elaborate.
Posted By: tindust
Re: Models loading when seen? - 03/06/08 04:02
One possible cause for a "freeze" delay if you have a few fairly complex models is the trace that is routinely sent out by the mouse pointer. You can test if this is the cause by placing a few of you models around you, then when you rotate them into view see if the position of the mouse arrow makes a difference as to when exactly the freeze occurs.
The way to eliminate this problem is to make sure the UNTOUCHABLE flag is turned on for each model.
my.UNTOUCHABLE = ON; // C-Script
my.flags2 |= UNTOUCHABLE; // Lite-C
Drawback is that the model is not detected by the mouse any longer in case you need it to be.
cheers