Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,280 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Ent_Preload #155091
09/18/07 11:42
09/18/07 11:42
Joined: Jul 2006
Posts: 503
Australia
A
adoado Offline OP

User
adoado  Offline OP

User
A

Joined: Jul 2006
Posts: 503
Australia
When I create an entity (a sprite using ent_create), there is a slight glitch. I know this can be solved by using ent_preload, but I am not sure how to use it?

you = Ent_Create("pic.tga", vector(0,0,0), null);
Ent_preload(you) ??

This does not seem to make much sense

Thanks,
Adoado.


Visit our development blog: http://yellloh.com
Re: Ent_Preload [Re: adoado] #155092
09/18/07 13:13
09/18/07 13:13
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline
User
demiGod  Offline
User

Joined: Mar 2006
Posts: 752
Portugal
Humm,

From the manual:

Quote:


Video memory is automatically preallocated for entities placed in the current level, but not for entities that are created during gameplay through ent_create...





As far i can understand you cant use it with ent_create.

Probably, you can attach an action to each entity placed in the level assigning a pointer to it. Then in main function and before level load you may use ent_preload to preallocatte video memory...

Re: Ent_Preload [Re: demiGod] #155093
09/18/07 13:18
09/18/07 13:18
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
well, but seriously, for whatelse than entities generated via ent_create one would need ent_preload ? it is those runtime generated entities that cause problems to the performance

Re: Ent_Preload [Re: ello] #155094
09/18/07 14:49
09/18/07 14:49
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline
User
demiGod  Offline
User

Joined: Mar 2006
Posts: 752
Portugal
Yeah, you´re right it doesnt make much sense..

Maybe you can reduce loading time at level load / change level, but its not much relevant anyway.

Re: Ent_Preload [Re: demiGod] #155095
09/18/07 15:45
09/18/07 15:45
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
dejavu ... almost ... the engine cannot know which entities need to be preloaded until you create them. maybe the solution is like the one discussed in this thread from last week:

http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/783140/page/0/fpart/2/vc/1

cheers

Re: Ent_Preload [Re: tindust] #155096
09/19/07 05:38
09/19/07 05:38
Joined: Jul 2006
Posts: 503
Australia
A
adoado Offline OP

User
adoado  Offline OP

User
A

Joined: Jul 2006
Posts: 503
Australia
Well, basically I am trying to create a certain level of custom LoD of a sprite. I just get a glitch when the sprites are created - its meant to be a smooth transition.


Visit our development blog: http://yellloh.com
Re: Ent_Preload [Re: adoado] #155097
09/19/07 07:53
09/19/07 07:53
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
That's interesting, I thought that the whole LoD series of a used sprite entity was loaded into the video memory when first using the entity. This does not seem to be the case then. Or if you mean by custom LoD that you have to morph from low to high res entity entirely, then I think you would have to find a way to preload the higher res ent into video memory. The engine could not do that unless told exactly which ents (sprites in this case) to preload. So, you would have to script that part in which your sprites-to-be-used are preloaded and the removed from the level. The entities are thereby initialized and preloaded into the video memory and there should not be any time delay when you eventually create and use your entity in the level.

I know, this seems cumbersome, but it seems to be the only way IMO to avoid the time delay when morphing or creating ebtities that were not in the level to begin with.

Re: Ent_Preload [Re: tindust] #155098
09/20/07 05:36
09/20/07 05:36
Joined: Jul 2006
Posts: 503
Australia
A
adoado Offline OP

User
adoado  Offline OP

User
A

Joined: Jul 2006
Posts: 503
Australia
Yeah thanks

Yes, I am trying to do a custom LoD - it is not related to the 3dgs LoD system.
I guess I will just try a few different things, and post back

Thanks!
Adoado.


Visit our development blog: http://yellloh.com

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