|
Re: Models loading when seen?
[Re: Kenchu]
#187217
03/05/08 23:23
03/05/08 23:23
|
Joined: Aug 2007
Posts: 44 QLD, Australia
Serex
Newbie
|
Newbie
Joined: Aug 2007
Posts: 44
QLD, Australia
|
Code:
ent_preload ( ENTITY*); Quote:
Preallocates texture memory and mesh for the given entity. This prevents a delay when the entity is visible the first time. Video memory is automatically preallocated for entities placed in the current level, but not for entities that are created during gameplay through ent_create or ent_morph, and not for global entities. In a multiplayer system this instruction is only effective on the client side.
|
|
|
Re: Models loading when seen?
[Re: Kenchu]
#187218
03/05/08 23:29
03/05/08 23:29
|
Joined: Apr 2004
Posts: 516 USA
Trooper119
User
|
User
Joined: Apr 2004
Posts: 516
USA
|
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.
A clever person solves a problem. A wise person avoids it. --Einstein
Currently Codeing: Free Lite-C
|
|
|
Re: Models loading when seen?
[Re: tindust]
#187220
03/06/08 12:51
03/06/08 12:51
|
Joined: Jan 2008
Posts: 49 Sweden
Kenchu
OP
Newbie
|
OP
Newbie
Joined: Jan 2008
Posts: 49
Sweden
|
Quote:
Code:
ent_preload ( ENTITY*);
That might come in handy. Gonna try it right away.
EDIT: Yup, that did the trick.
Quote:
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.
It's the water tank thingie. As soon as it is within the view frustum the first time, 3dgs stops for just a little while (very short).
Quote:
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
I dunno if thats it, since it doesnt matter where my mouse pointer is when 3dgs stops for that split second of loading.
Last edited by Kenchu; 03/06/08 12:58.
|
|
|
|