1 registered members (1 invisible),
1,498
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
New kind of entities
#408188
09/27/12 03:33
09/27/12 03:33
|
Joined: Aug 2011
Posts: 58 Colombia/Bogotá
wdakfenixx
OP
Junior Member
|
OP
Junior Member
Joined: Aug 2011
Posts: 58
Colombia/Bogotá
|
I need to create a huge amount of entities, but i have to remove a lot of them at the same time, and that destroy the FPS. Is it posible to declare a new kind of entity,"lighter", so when I remove them it wont be too laggy?
CAUTION :The content above could blow your mind
|
|
|
Re: New kind of entities
[Re: Ch40zzC0d3r]
#408216
09/27/12 15:03
09/27/12 15:03
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
The usual approach here is to cache the entities and recycle them, i.e. make unused entities invisible and passable and reuse them when new entities are required.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: New kind of entities
[Re: sivan]
#408230
09/27/12 19:07
09/27/12 19:07
|
Joined: Aug 2011
Posts: 58 Colombia/Bogotá
wdakfenixx
OP
Junior Member
|
OP
Junior Member
Joined: Aug 2011
Posts: 58
Colombia/Bogotá
|
do they still use the same memory space if they´re passable and invisible?,
CAUTION :The content above could blow your mind
|
|
|
Re: New kind of entities
[Re: wdakfenixx]
#408326
09/29/12 14:37
09/29/12 14:37
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
do they still use the same memory space if they´re passable and invisible? I don't know what you mean by memory space. If you're talking about the address, yes, it remains the same of cause. PASSABLE and INVISIBLE are just two flags. They can't reallocate memory.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: New kind of entities
[Re: Ch40zzC0d3r]
#408342
09/29/12 20:29
09/29/12 20:29
|
Joined: Oct 2005
Posts: 4,771 Bay City, MI
lostclimate
Expert
|
Expert
Joined: Oct 2005
Posts: 4,771
Bay City, MI
|
yeah, and memory All your c_trace functions will not loop through them for impact, also the renderer will not loop through them, this will save 80%of your memory he wasnt talking about the amount of memory, hes talking about allocation address of the memory, as destroying, and creating memory sections is a slowish process. What your referring to is a savings in cpu processes. still will help though
Last edited by lostclimate; 09/29/12 20:30.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|