Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Models loading when seen? #187216
03/05/08 22:33
03/05/08 22:33
Joined: Jan 2008
Posts: 49
Sweden
K
Kenchu Offline OP
Newbie
Kenchu  Offline OP
Newbie
K

Joined: Jan 2008
Posts: 49
Sweden
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?

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 Offline
Newbie
Serex  Offline
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 Offline
User
Trooper119  Offline
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: Trooper119] #187219
03/06/08 04:02
03/06/08 04:02
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
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

Re: Models loading when seen? [Re: tindust] #187220
03/06/08 12:51
03/06/08 12:51
Joined: Jan 2008
Posts: 49
Sweden
K
Kenchu Offline OP
Newbie
Kenchu  Offline OP
Newbie
K

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.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1